This tutorial demonstrates how to use the 3DS Max 'Render to Texture' feature with OgreMax materials to create light maps.
First, create a simple scene. In this tutorial, a target directional light has been created, and its shadow casting property has been turned on:
Perform a render to make sure the shadows are visible:
Now it's time to create an OgreMax material. This material will later be applied to all the objects:
Next...
Apply the newly created material to all of the objects in the scene. If you set up the View/Render material to use the same bitmap as the OgreMax material, the scene will look something like this:
In order for the 3DS Max 'Render to Texture' feature to work correctly, all of the objects need to have their own material. This is because each object receives its own rendered texture. Make sure all the objects are selected, and select the Create Master/Slave Materials item in the OgreMax Menu.
Now it's time to choose where 3DS Max sends its render-to-texture bitmap for each OgreMax material. With all of the objects selected, select Set Render to Texture Destinations... from the OgreMax menu. For the texture unit, choose 2 since texture unit 1 is already being used by the BeachStones.jpg bitmap.
With all of the objects selected, bring up the 3DS Max render-to-texture window. This is found under the Rendering -> Render to Texture... menu. Make the following changes:
Press the Render button. That's it! That light maps are now generated.
At this point you can export the scene and load it into the OgreMax Scene Viewer to see the finished results. Note that there was no need to modify the blending settings for the texture units created to hold the rendered textures because the default mode is modulate, which multiplies the light map with the previous texture unit (which uses the BeachStones.jpg bitmap).