Viewing Normal Maps


We can now create a new shader that we will apply to the low-resolution polygon plane.

1.

Start by moving the HighRes plane across again in the X axis, so that you can see each model separately.

2.

In Hypershade, create a new Lambert material and call this NormShader. Apply it to the LowRes plane.

When you created the normal map, Maya also created a new texture file node pointing to it. You can see this in the Hypershade Textures tab and in Figure A.6. We now want to connect this to our new Lambert shader.

Figure A.6. Maya also creates a file node pointing to the normal map.


3.

Open the Connection Editor (Window > General Editors > Connection Editor), and load the texture node, which should be called file1, into the Outputs section. Load the NormShader into the Inputs section.

4.

As demonstrated in Figure A.7, connect the Out Color attribute of the file1 node to the Normal Camera attribute of the NormShader node.

Figure A.7. Connect the Out Color attribute to the Normal Camera attribute.


5.

Now the material is set up; all we need to do is configure the view so that we can see the normal map. Go to the view's Shading menu and turn on High Quality Rendering, Smooth Shade All, and Hardware Texturing.

Figure A.8. Configure the view panel so we can view our normal map.


Now you will see the normal map applied to the geometry. As you can see in Figure A.9, bottom, this works quite well and gives the flat plane the illusion of detail. Next let's see how it reacts to light.

1.

In the view's Lighting menu, activate Use Selected Lights. The geometry will go black because there are currently no lights in the scene.

2.

Create a new Point Light by going to Create > Lights > Point Light.

3.

Move this new light around, and you'll notice that both objects' surfaces react to it as if they had the same topology; yet there is a difference of 798 faces (Figure A.10).

Figure A.10. Both objects react the same to the light as it moves around the scene.


Figure A.9. The normal map is now visible in the view.


The only drawback to normal maps (as with bump maps) is that they don't physically alter the geometry, so when the plane is viewed from the side, as in Figure A.11, the illusion is shattered.

Figure A.11. When not viewed directly, the normal map does not work as well




    Game Character Development with Maya
    Game Character Development with Maya
    ISBN: 073571438X
    EAN: 2147483647
    Year: 2004
    Pages: 169
    Authors: Antony Ward

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net