Modelling tools and preserving normals

Status
Not open for further replies.
I use Mdlvis to do bone/animation stuff for models, but the program automatically recalculates normals upon opening a model and overrides any previous normal values on the mesh. Magos's editor and Matrix Eater are the 2 programs that don't automatically recalculate mesh normals, however they are not as powerful as Mdlvis when it comes to bone or animations. How do I preserve mesh normals?
 
Level 34
Joined
Sep 19, 2011
Messages
2,123
I use Mdlvis to do bone/animation stuff for models, but the program automatically recalculates normals upon opening a model and overrides any previous normal values on the mesh. Magos's editor and Matrix Eater are the 2 programs that don't automatically recalculate mesh normals, however they are not as powerful as Mdlvis when it comes to bone or animations. How do I preserve mesh normals?

I'd say - animate it first and then save normals in a normal tool that is capable of re-doing the normals, unlike MDLVIS.
 
Level 21
Joined
May 29, 2013
Messages
1,566
There is a way to restore normals after Mdlvis screws them up. This might seem complicated, but it's really simple.
1. Before opening a model in Mdlvis, make a copy of it.
2. Open the original model in Mdlvis. You can edit the model's animations and bones, but don't add or remove any vertices in any of the geosets. You can use other programs to add, clone or delete parts of the model's mesh (E.g Matrix Eater).
3. When you're done, save the model and close Mdlvis.
4. Now use MDLX Converter or any other model converter to convert both your edited model and the unedited copy you made earlier from .mdx to .mdl. Delete both .mdx files, because you won't need them anymore.
5. Open both .mdl files in Notepad (Right click > Open with).
6. Go to Edit > Find (or press Ctrl+F) and type Normals
7. You'll see something like this:
Normals 301 {
{ -0.027317, -0.985985, 0.164580 },
{ 0.268592, -0.242219, 0.932302 },
{ 0.151069, 0.145734, 0.977722 },
{.........
{.....
...
...
...
{ 0.966276, -0.004067, 0.257478 },
{ -0.471760, 0.881689, -0.008180 },
}
TVertices 301 {
*Geosets in different models have a different number of normals. As you can see, in my example above it's 301.
Now copy everything (normal values) between
Normals 301 {
and
TVertices 301 {
from the unedited copy (you made in the first step) and PASTE it in the same place in your edited model, so you overwrite the normals Mdlvis made.
8. Repeat step number 6. and 7. multiple times, depending on how many geosets your model has.
9. Save and close Notepad.
10. Convert your model back to .mdx
Your model will then have it's former normals, but you'll need to do this every time after you edit it in Mdlvis.
 
Last edited:
Status
Not open for further replies.
Top