Ok, i don't generally write tutorials or publications however a ot of people have contacted me with the same problem. Instead of letting you sit up to 4am to work out the problem i'm going to do it for you.

Ok, the reason for lightmapping and what is it

Basically lightmapping (baking textures) is to render out a single map for your level with lighting already applied to it. The idea is that instead of creating lights in the programming application which can drain the cpu, we could just render out the level with the light and shadows already burnt onto the texture.

Ok, firstly open 3ds max (i find opening the program helps me work in it). I'm not going to go into how to model... there's hundreds of them out there.

Ok, so we have our level

And after we have built this we are probably thinking, "hmm, lacks any textures" were not going to go into applying textures UV mapping or Unwrapping, were just going to light this scene and make it work in a development engine.

Ok, what we need to do now, is take all the objects we want to lightmap, in my case it was everything so i attached everything together using Convert to Editable Mesh-->Right Click--> Attach--> Select all the object(s) we want to attach.

Now, everything is one nice neat object. I just applied a default gray material to the object. Also add a few lights to the scene, make sure shadows are on. I used a Skylight and One Omni light.

Getting to the juicy bits

On the menu at the top click "Rendering" scroll down the list to "Render to Texture" (Shortcut 0 on the keyboard) This will open up this new window..

Ok, this window is our next stop!

Firstly we don't need to mess around with all the settings bar a few, so firstly the "Output" setting. Change this Directory to the same directory to were your model is saved and will be exported

(Development applications when loading a .3ds file will need the texture in the same directory as the .3ds file although this can be changed later)

So in simple, if your model is stored in C:\3dsmax6\scenes\model1 put it there!

Ok, in the "Objects to Bake" Section click in an empty space then click on your model, and its name will appear here, if you notice mine was called Box12.

Please note, mess around with all the setting if you want, but i'm not going to go into them in this tutorial as were only going to get you started and working away so you can play with it yourself.

Ok, so next Scroll this menu down, so we can see all the render options at the bottom (See next image)

Ok, after scrolling down, past "objects to bake" to the output setting.

Click on the button that says "Add" this will present al list of options for this purpose click on Complete Map.

After clicking this it will place some new information in the two empty box's in this picture.

Firstly the output section shows all the objects we are going to bake with all the types of textures on them and the map size.

The boxs......

Name: Enter the name of the texture, (ie freddy, bobby, jack...)

File Name and Type: Ok, enter the name of the file you wish to export and click the three dots next to select the file type (i usually use .jpg)

Ok, make the target map slot Diffuse Color.

For map size. now this is for user's to decide it depends on the level size and quality over how fast it needs to load the larger the map the longer it will take to load.

Make sure shadows is ticked.

And the "Baked Material Section" Select Output to Source. After that, select render, and it will start rendering an image of the map.

This may look confusing on larger object however 3d studio max is going to do all the calculations we need so don't worry.

Ok, after this save the file.... you will notice in the object modifier stack you will see a new modifier "Automatic flatten UV's" This is a real beast and does all the hard work.

Ok, go into this modifier and select "EDIT" this will open up a UV map editor, don't move anything, just go to "file" and "Save Uv's" and save out the file into the same directory, as your model, and texture.

Next Export the model.

Save Max and reset.

Import --> Your model. Now you will notice the only selection in the modifier stack is "Editable Mesh" now, add a new modifier, called "Unwrap UV Map".

In the Unwrap UV Map options go into edit, so it loads up the UV edit window, go into File and Load uv's. Select the UV file you just saved out.

Now you should notice that all the green lines (splines) have all gone back to the position they were in in the "Automatic Unwrap" settings.

Now, open up the material editor (M) click on an empty sample sphere, in the diffuse slot, select "Bitmap" and load up the texture you have just baked.

Now, apply this to your model. Now make a render and all the shadows should appear but without lights, yay.

Export this new model to a new .3ds file. and done!

I understand this isn't the easiest of tutorials to follow, i apologize if you have any problems do not hesitate to contact me i would be more than willing to help fix the problem. My email is kieranbelkus@gmail.com.