Follow Me

Dropbox. ?Spread the word.  The first 2GB is free!

Journal Index
« 3ds Max Doesn't Start -- Unknown property: "getMenu" | Main | Walking Dead - VFX Article »
Friday
Nov192010

Understanding 3ds Max's Normals

Bad Normals

 The other day someone asked me, "I cut a poly object in half, but when i render, I get a seam. Why is that?" If you've ever tried to make something the was two individual parts, look like it was one, you've run into this problem. This can happen when destroying something or making a hidden door appear from nowhere. (See the example to the right.)  I can try to explain why. Lets first start by understanding normals, and then how 3ds Max deals with normals.

Faceted and SmoothedWhat the hell is a "normal" anyway? I can only explain it the way I understand it.  Imagine we have 3 vertices that make a polygon.  That polygon has a direction, and that direction is where each of the verticies store a normal vector. (Imagine a little arrow point out of each vert on that polygon.) Now no polygon is truly smooth. Even when you have millions of polygons, they are all made up of small flat surfaces and therefore, are never really smooth. When the renderer (viewport, scanline or ray-tracer) hits the surface, it uses the interpolated normal direction when calculating how light hits the surface.  This can make it look smooth in the render than it actually is.   This will make all the little flat polys look like they are continuous across a surface when hit with light.  However, this easily breaks down when you have very few polygons.  Try smoothing all the normals on a cube, for example.  When smoothing across very hard angles the illusion looks silly.  

3ds Max has calculated normals.  I say "calculate" because max doesn't store normal information by default.  You see, back in the early days, it was decided that max would calculate the normals on the fly, instead of having to deal with them with every step in the modifer stack.  The benefit is that max can stack many modifiers and not have to deal with normals at all, until the end result.  This is why we have something called smoothing groups.  Smoothing groups are the idea that any 2 faces can share a group, and the normals will be averaged over those 2 polygons.  Smoothing groups may seem like a mystery, but think of it as a simple puzzle. Here are the rules...

Smoothing Group Rules:

  1. Faces that are welded together can be smoothed.  Faces that are separate elements will not be smoothed. (This is why separate parts don't smooth.)
  2. Each face can be part of 32 different smoothing groups.
  3. Any polygons that share a group number will smooth across the faces, assuming they are touching. (Rule #1)

 Here's an example of smoothing groups at work.

 Notice how the #1's and #2's all smooth together, and then in the third example, the center faces with #1's and #2's all smooth together.

 

Select Faces

Detach Faces

Now let's deal with our example where smoothing groups break down.  Lets take a few faces and detach them to a new object.  This is where the normals start looking broken and non-smoothed again since the faces are no longer connected. 

Now, Lets fix the problem we created. Select both of the objects and add an Edit Normals modifier on top.  Now, open the normals sub-object, and select the normals on each side of the break.  Press the average "Selected" button in the Edit Normals modifier.  This will make the poly across the different object smooth together. Do this with the rest of the polygons on the objects and you now should have a smooth surface across 2 separate objects.

 

 

 

 

 

 

 And finally, the result of fixing the normals on the iPhone transformer. If you look close, you can still see something going on there, but it works enough for what I'm doing.

 

PrintView Printer Friendly Version

EmailEmail Article to Friend