| 01-20-2007, 09:27 PM | #1 |
How to: fix disapearing models on the edge of the screen Introduction In this tutorial I will tell you how to fix models that disapear when they come too near the edge of the screen, a lot of models that are either very big or are long or tall can have this problem. For this tutorial I'll use my Orthanc model as example because it's a good example of a model that is so tall that it disapears when it comes too near the edge of the screen. I will explain how to fix this problem both in mdl editing and in Magos' model editor Tools needed For editing: Notepad or Magos' model editor For finding coordinates: Vertex Modifier For model viewing: Magos' model editor or Wc3 Viewer For converting: YobGuls' file converter Getting started If you want to edit the model in mdl code you'll need to convert the model to .mdl format if it's still .mdx and if you want to edit the model in Magos' it doesn't matter if the file is .mdx or .mdl, so it's easiest to just use .mdl Once the file is .mdl format we can begin. To fix the problem you have to edit the Minimum and Mazimum extent of the model. In Magos' model editor you can find it by clicking on "Edit, Model Properties" Then you'll see this window Here you'll see the coordinates of the Minimum and Maximum extents. If you are editing in .mdl you need to find this portion near the bottom of the code Code:
}
MinimumExtent { -86.1265, -82.6042, -1.52796 },
MaximumExtent { 81.0091, 78.4363, 143.519 },
BoundsRadius 113.928,
MaterialID 0,
SelectionGroup 0,
}The X axis is from front to back The Y axis is from left to right And the Z axis is from top to bottom But, 0 is the center of the model, so for example; 10 would be above the center of the model, but -10 would be below, this aplies to all axis' But before you modify the coordinates of the extents, you need to know to wich number you have to change it. This is where Vertex modifier comes in. Open the .mdl file in Vertex Modifier On the picture you can see my Orthanc model loaded in Vertex Modifier, if you look at the coordinates (at the bottom of the picture), it says it's about 600 at the top of the tower. Now roughly know the coordinates we can go back to Magos' Model Editor or .mdl code So, the height of the tower was about 600, but to be sure I'm gonna increase the number a little bit further to be sure the model doesn't disapear anymore, so I changed Z axis Maximum Extent to 615. Not only do I have to change the height Extent coordinates, but also the horizontal coordinates, my Orthanc model is mostly symmetrical at the base, so the coordinates for both X and Y axis should be the same here. In the picture and code below you can see the height coordinates I changed first, and the other coordinates Code:
}
MinimumExtent { -85, -85, -1.52796 },
MaximumExtent { 85, 85, 615 },
BoundsRadius 113.928,
MaterialID 0,
SelectionGroup 0,
}And now the problem should be fixed. Now all you need to do is convert the model back to .mdx and import it in a map and see if you got the coordinates correct. |
| 01-21-2007, 09:57 AM | #2 |
Excellent, exactly what I needed. :] Good job. |
| 01-21-2007, 12:12 PM | #3 |
Quite useful tutorial ^^ Just to be a little sceptical; it seems like your tutorial lacks a bit of intervals between the lines -- Good job nonetheless |
| 01-22-2007, 01:38 PM | #4 |
Cool, approveloled. ![]() |
| 01-25-2007, 03:10 PM | #5 |
| 01-26-2007, 11:56 AM | #6 |
Well thanks to both olof and Nasrudin. I've often had problems with models dissappearing :) |
| 01-28-2007, 05:51 PM | #7 |
lol, though my tutorial could still be useful if you wanted to fix it in mdl. |
| 01-31-2007, 04:12 PM | #8 |
Does this affect doodads with large scaling value modified with WE object editor? |
| 02-07-2007, 10:33 AM | #9 |
Yes, it should |
| 05-02-2007, 07:00 PM | #10 |
Yay no more disappearing trees or units! Thanks olof, and Nasrudin (I always wondered what that button did...) |
