Friday, March 6, 2009

solution to ugly protrusions..fixing the NORMALS










This post is a solution to the issue referenced in the crater project update #10.
If you have seen the pictures closely, there were protrusions along the sides of 
the geometry. This was happening because I messed up the geometry's normals 
when I extruded in the negative direction. 
Since the normals were pointing inwards, they were rendering out wrong as normals control the Lighting of a geometry. Normals essentially point towards the direction of the surface of the polygon. So if the normal is pointing away from the camera, camera will see
backside of the face being rendered.
Here's a picture for the solution to the issue, which is very simple but equally 
interesting.
I have also added pictures of the same geometry rendered with both Inverted Normals as well as Corrected Normals.

PS: thanks to StevenNong (at odforce) for great help with this..(also for similar concept/ideology, check out the Attribute Transfer tutorial at SideFx's site.)

No comments: