Notifications
Clear all
[Closed] 3ds max normals
May 22, 2011 10:48 pm
Hi can anyone tell me the correct way to apply normals to an imported model.
If i just set the normals with no modifiers or anything they disappear when the scene is updated how do i tell max to keep the normals on a mesh.
Do i use the edit normals modifier?
If i need to do this can anyone tell my the syntax to set the normals and make the explicit and stay.
Thanks so much
1 Reply
May 22, 2011 10:48 pm
BUMP
I'm also having problems with normals. I understand that 3dsmax frequently and constantly recalculates the normals on the go for every operation on the model. I also understand that the normals are more or less govern by the smoothgroups, and that import of normals is somewhat pointless.
however, I'm trying to import a model not for editing.. but for animations. So I'm trying to import a model, and have it setup, rigged, materials set, etc.. all the users has to do is animate..
for that to work normals from the original imported file is very important. that way the user doesn't need to rework the model to repair various normal problems that may have occurred when max recalculated.
since the model requires the SKIN modifier present to maintain the skin weighting, it forces normal recalculation on the model. so the only way I'm able to hold the normals onto the model is by using the "Edit Normal" modifier.
Below here is the script I wrote to apply the normals from my binary file to the "Edit Normal" modifier
what I had to do was loop through the normals by faces on the mesh, and find the vertex id
cause when I tried using setNormal <Mesh> <ID> <Point3> per vertex, the normals don't import properly.
the script code is extremely inefficient, I'm hoping someone can help suggest a better method to apply the normals. or suggestions on optimizing my present script.
thx in adv
-mariokart64n
clearSelection()
select msh
normMod = Edit_Normals()
addModifier msh normMod
for n = 1 to (normMod.GetNumFaces node:msh) do(
vertID=getFace msh n
normMod.displayLength = 0
subobjectLevel = 1
modPanel.setCurrentObject normMod
for c = 1 to 3 do(
normID=normMod.GetNormalID n c node:msh
normMod.EditNormalsMod.SetSelection #{normID}
normMod.EditNormalsMod.SetNormal normID vertBuffer.normal[(vertID[c])] node:msh
normMod.SetNormal normID vertBuffer.normal[(vertID[c])] node:msh
normMod.EditNormalsMod.MakeExplicit ()
normMod.EditNormalsMod.SetSelection #{}
))
subobjectLevel = 0
-- update msh
modPanel.setCurrentObject normMod