PpHammer
12-13-2006, 08:47 PM
Hi guys,
Still trying to get around to learn some max scripting in my spare time.
I am working on a "exporter"-like script. It works decently at the moment, but there are still some issues I'd like to solve. At the moment I am kind of stuck and perhaps someone can help me.
To cut a long story short; at one point in my script all vertices of a single object are broken. Although this doesn't modify the smoothing groups, all vertices are assigned a "general" normal. This results in a flat-shaded looking object. I would like to average those normals, just like it is possible with the edit normals modifier. And preferably even based upon smoothing group. It doesn't need to be 100% perfect. So for example I select all faces with smoothing group 1, use the edit normal modifier to average these vertexnormals, select all faces of smoothing group 2 etc. Only automated in a nice way :)
One of the issues I encountered is that I can't assign the edit normals modifier to a specificly selected amount of faces. It is all or nothing, it seems. Is it possible to select the faces of SG 1 in edit poly, put those in a list, add the edit normals modifier and use the list to select the faces and then average the normals? Is this a valid way to go or are there any easier/better solutions.
I hope I made myself a bit clear in the above. Feel free to ask anything if I wasn't clear enough. I am absolutely no advanced max scripter so I am kind of confused on how to continue. Any tips?
Thanx in advance!
Pieter
Still trying to get around to learn some max scripting in my spare time.
I am working on a "exporter"-like script. It works decently at the moment, but there are still some issues I'd like to solve. At the moment I am kind of stuck and perhaps someone can help me.
To cut a long story short; at one point in my script all vertices of a single object are broken. Although this doesn't modify the smoothing groups, all vertices are assigned a "general" normal. This results in a flat-shaded looking object. I would like to average those normals, just like it is possible with the edit normals modifier. And preferably even based upon smoothing group. It doesn't need to be 100% perfect. So for example I select all faces with smoothing group 1, use the edit normal modifier to average these vertexnormals, select all faces of smoothing group 2 etc. Only automated in a nice way :)
One of the issues I encountered is that I can't assign the edit normals modifier to a specificly selected amount of faces. It is all or nothing, it seems. Is it possible to select the faces of SG 1 in edit poly, put those in a list, add the edit normals modifier and use the list to select the faces and then average the normals? Is this a valid way to go or are there any easier/better solutions.
I hope I made myself a bit clear in the above. Feel free to ask anything if I wasn't clear enough. I am absolutely no advanced max scripter so I am kind of confused on how to continue. Any tips?
Thanx in advance!
Pieter
