creating normal maps with cinema 4d part 3

Preparing a texture
You've created some geometry for a game texture, and the time has come to render it out for use in Tenebrae. I recommend you create two versions of your file - one to create the color map, and another one to create the normal map. This is recommended because you will be alterning the textures and lighting setups for these two versions.

Camera placement
Create a camera in the scene. Be sure to link the perspective view to the camera object. The camera should be set up for "Parallel" projection. This eliminates all trace of perspective parallax error in the rendering of your texture. Place your texture geometry dead in the center of the render space, centered at 0,0,0. Then place your camera in front of the geometry at a location of 0,0,-500. You should then adjust the zoom factor of the camera until just the portion of your texture geometry that you want to render is framed in the perspective view.

Global Lighting
To eliminate directional shadows in the rendering of the texture geometry, we are going to be using a technique called "global lighting". The entire scene is going to be surrounded by a luminous sphere, which will provide even lighting on the geometry from all directions. Here is how to set up global lighting in Cinema 4D:

1) Create a sphere object. Give it a radius sufficient to completely encompass the geometry of your scene, and the camera. Eliminate any light objects you may have created while building your scene.

2) Create a luminous texture, and apply the texture to the sphere. See the illustration for how this texture should be set up:

3. Edit your rendering settings to perform these edits: Eliminate Cinema4D's automatic lighting system - this is the light that turns "on" when rendering any Cinema 4D scene that contains no lights. Since ours doesn't have any lights, and we don't want the auto light, turn it off. You will also need to activate radiosity rendering. See the settings below:

Your scene should look like the following setup:

In this shot, you can see the parallel camera framing the texture (green) and the white sphere surrounding the scene, providing global illumination. You should now render out the color map for your scene. Here is an example of a globally rendered color map:

When this is done, save the scene file under a different name because we are now going to change things to render out the normal map from this same setup.

Normal Map Setup
Go to the render settings, and turn radiosity off. We won't be needing it anymore. Delete the white sphere, and texture from your scene. All you should have left in your scene file at this point is your original texture(s), geometry, and camera. We will be modifying the textures to enable the creation of the normal map.

Here is an example of the settings for the texture used in this scene:


To modify this texture, turn off all of the channels except for the bump channel. Turn on the Luminance channel, and you can begin to build the normal map texture.

Cinema 4D comes with a rich set of texture plug-ins from bhodiNUT. One of these textures, called Falloff, renders color into the surface according to the surface's normal, with respect to the scene "world" space. We will use three sets of the Falloff texture to create normal coloration in the X, Y, and Z directions, and combine these textures using the bhodiNUT "Fusion" texture. Here is the setup:

Since Fusion can only combine 2 textures at a time, we will have to nest two Fusion materials in order to combine 3 of them for our normal texture. Here is the first level of the Fusion setup:

Here, the base channel is set to bhodiNUT Falloff, with the following parameters:

As you can see here, the vector is set to the X direction, and we set up a linear gradient from black on the left, to 100% red on the right. This corresponds to what we know about how a normal map is constructed.

The blend channel is set to bhodiNUT Fusion again, where we can combine our two other normal textures. Here is the setup for this second Fusion level:

Both channels of this Fusion setup are bhodiNUT Falloff. The top one is set up in the following way:

The vector is in the Z direction, and the shading goes from 100% blue to black. Since no part of the surface pointing away from the camera will be visible, the blue channel will only contain values from 100 to 50%

The base channel setup is as follows:

The vector is in the Y direction, and the shading goes from black at the bottom, to 100% green at the top.

The blending modes for both levels of Fusion should be set to "Screen". This allows all the normal texture colors to be added together.


Rendering The Result

Since we applied the normal shading to the Luminance portion of the original texture, we will not need light sources to render it out. By keeping the original texture's bump channel, we allow the details contained there to be incorporated into the normal map - bump maps work by wiggling the normal vector of a rendered surface, and because we kept the "Use Bump" checkbox in the Falloff texture checked the bump channel is represented. Here is an example of a rendered normal map:

This normal map now completely encodes all of the surface vector information, including bump map information, from the original Cinema 4D geometry.

I hope this information is informative and helpful as you work with Tenebrae and other 3rd generation game engines.

James Hastings-Trew

close window
normal map pages: 1 2 3


this site works
best on Firefox: