3ds max and vertex normals

Started by
2 comments, last by Foofles 14 years, 8 months ago
I've created my (very primitive-looking) model and loaded it up in my renderer (via a wavefront obj file). Generating face normals and flat shading looked good initially, but I wanted something better. So I set up some smoothing groups and tried gouraud shading. What happened was that faces were being lit where they weren't supposed to be (facing away from the light source, etc). So I re-checked my smoothing groups (which were okay) and told my renderer to also draw vertex normals for reference. Here's what I found: 1) some faces have correct normals; at the same time the same mesh has faces that have inverted normals or in many cases normals that are parallel with the face (!!!). I mean, after setting up smoothing groups, you'd expect it wouldn't be that hard to get the normals facing at least roughly in the right direction, would you... 2) visually, this only seems to apply to one mesh out of about 15 - this happens to be the one that I ran through two boolean operations... (which I would not expect to have too much of an effect on normal calculation, though). Since I'm only just tinkering with 3ds max for pretty much the first time and have no real prior experience with creating model art, is there something I might be forgetting? Can I have max show me vertex normals (that is the smoothing groups in max seem to shade just fine when I select them)? Or is there no more reliable method than scanning the entire model and calculating vertex normals myself?
Advertisement
Put an 'Edit Normals' modifier on the object, you can view normals etc then. Edit normals also allows you to use AutoSmooth where you can set an max angle to smooth to. Check the help for info.
Hmm - max shows the normals as they should be; which means either my loading code is at fault (which I refuse to believe :D - mainly because it loads almost everything quite ever so nicely); or that max's obj export script is at fault (which also seems unlikely after all those versions). Blah - I might read in the smoothing groups exported by max and calculate my own vertex normals...
Hmm... if your mesh has really sharp edges then the normals and tex coords will act odd. If you have 90 degree angles happening you might want to detach the adjacent faces so they do not rely on the same vertices where they meet at 90 degrees. This will insure that the normal exported with each vertex is what you'd expect.

This topic is closed to new replies.

Advertisement