Lightmap Tutorial
A tutorial for applying a lightmap to an object
Written by kortt
First we will create our colour texture and Lightmap texture.
Below are the textures i will be using
|
Colour Texture |
Lightmap Texture |
|
|
|
Now we will open 3ds max and create our object. In this case a cube for simplicity.

Convert the object to and Editable Mesh

Open Material Editor and name our Material. In this case I named it Light Map Test

Now we add our colour texture to the Diffuse Color area.



Once our colour textue is added to the Duffuse Color we can set the Map Channel to 1 (note: it will be set to 1 by deault)

Now we add our Lightmap texture to the Material. Add it to the Filter Color area. Choose Bitmap as with the colour texture.


Once the Lightmap texture has been added set it's Map Channel to 2.

When we view our Material Light Map Test we see we have both Diffuse Color map (our colour texture) and Filter Color Map (our lightmap texture) added.

Now we apply our Material to our object. I do this by dragging the Material from the Material Editor and dropping it on the object.
Now we will add our Mapping Modifieres. In this case I add a UVW Map modifier and set the Map Channel to 1 (default). This represents the Diffuse Color map since it was also set to Map Channel 1. Adjust the mapping as you need to. In this example I have set the map type to Box. (not shown)

Do
not collaps the stack yet. (NOTE: You can add each Modifier seperately and
collapse the stack in between if you want.
When I wrote
this I didn't know you could do this.
Just be sure to set your modifieres on the appropriate Channels according to your what you
Materials are set to.)
Add a second Mapping Modifier. In this case I have added another UVW Map modifier. Set the Map Channel to 2 to correspond with our Light map which was set to Map Channel 2 in the Material Editor. Adjust your map accordingly. In this case I set the mapping type to Box (not shown)
Note: It will be hard to see how the lightmap is being applied. You may have to turn the Diffuse Color map off in order to be able to see the light map on the object for application)

Once your maps have been applied and adjusted to your specifications you can go ahead and collapse the stack (Convert to Editable Mesh). Save your project, and export your model. (you will of course need to add your LOD's and nodes to do this)
Now open your model in Previewer. When we apply the materials we apply our colour texture to the Color Texture area, and our Lightmap texture to the Lighting Texture area as shown.

The end result will likely take some trial and error to get the effects you want. Here is my ed result. Yay!, a cube with some strange looking lighting effects!

This is just an example. You will undoubtedly find a better use for a light map. If I have done something incorrect during this procedure please contact me and let me know.
Good Luck!
kortt