When I originally prepared this page on how to render a normal map using
Cinema 4D, I had some complex instructions on how to do it using the bhodiNUT
Falloff shader coupled with some fancy footwork with bhodiNUT's Fusion
shader. This method is still available here.
However, an ingenious guy by the name of Frank
Plohmann has written a little COFFEE shader called NLinShader. You
can get it here or from Frank's
site. Drop the NLinShader.cob file in your Cinema 4D Plugins folder, and
the shader will be available to you in C4D's Material Editor. I've modified
this page accordingly to demonstrate the method using Frank's shader.
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.
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.
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 choose the NLinShader from
the popup menu.
The default values for the shader are preset
to produce a standard normal map:
Be sure to modify each texture used in your
setup in a similar way - add the NLinShader to the luminance channel and
turn off all other channels except for the bump channel.
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. Here is an example of a rendered
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.