Saturday, March 1, 2008

3D made easy #1 Surface Normals

This is the first in a series of tips and hints that I'm going to call "3D made easy" As you can guess, I'll make it easy for you to understand important concepts that you need to know to make your own 3D animated films. Let's start with today's topic:

Surface Normals

The image to the left shows your typical 3D animation scene. In this case, a sphere is being viewed by a camera (the eye)

The blue area shows the area of space visible to the camera. The front of the sphere is visible, the area behind the sphere is not visible.

The red arrows poking out from the sphere represent our surface normals. Each red arrow is perpendicular to the surface at that particular point.

In a similar fashion, 3D models made out of polygons will have one surface normal per polygon, pointing perpendicular to the surface of each polygon.

Surface normals tell the 3d renderer which polygons are visible or invisible in the rendering:

In the second image, as far as the camera is concerned, the back facing half of the sphere doesn't even exist.

The only surface normals visible are those pointing towards the camera

(well, technically speaking, normals between 0 degree and 90 degrees to the camera)

This has many practical applications, assuming your 3D application lets you set the surface normals of the polygons in your 3D models.

Cartoon rendering
I'll get into this later, as it's a bit involved, but still simple to achieve

If you have a room where the walls are the inside of a cube, with the surface normals pointing inward, then you can dolly the camera 360 degress around the room, only ever seeing the walls opposite from the camera (and contents of the room), ignoring the walls directly in front of the camera. This is difficult to duplicate in real life.

Read more on Wikipedia

No comments: