Sign in to follow this  
GamerSg

getFaceRNormals in Maxscript not working correctly?

Recommended Posts

The function meshop.getFaceRNormals is supposed to return a 3 element array with each element referring to the normal of one of the 3 vertices used to make up a polygon. meshop.getFaceRNormals( faceIndex) However, there are times when the array it returns contains only 1-2 element(s). It seems the function is broken, so is there any other easy way to get the normals for every index in Maxscript?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
This won't help you much but there are many functions in Maxscript that seem to be bugged to the bones. For example, the rotation and scale of a mesh according to its parent worked with 3DSMax5 but no more with 3DSMax6 (wrong values, NULL,...).

That's a shame, Maxscript looked like a good and easy system. I think you should use the SDK and write a plugin in C++ otherwise you'll end up with a lot of bugs not even coming from your code.

Share this post


Link to post
Share on other sites
If the face does not have any smoothing groups assigned to it then the getFaceRNormals functions returns bogus(no?) info. I believe this may be why it's returning only 1 or 2 elements. The workaround is to check the smoothing groups of the face first. If there's no smoothing groups then get the normal of the face itself and use that for all three verts. If it does have one, or more, smoothing groups then getFaceRNormals should return the correct results.

-John

Share this post


Link to post
Share on other sites
Thanks alot John, that was a pretty easy solution, there is infact a auto-smooth button which automatically assigns a smoothing group to all selected polygons.

I was almost about to start finding a way to calculate the normals by myself based on the smoothing groups, looks like i won't be needing to do that.

Thanks again.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this