Occlusion Confusion
Baking high resolution (fake) Ambient Occlusion maps onto a low resolution model. In 3ds Max.
Firstly, you will need two things, your high res model, and your low res model [low res needs to be fully unwrapped]. In this example, I will be using a human type character. I find that it is easier to model the high res version first, and then dependant on the level of detail in the high res, either spend a wee while manually optimising it down, or just modelling a low res version over it.
Ensure that both models are as closely resemblant of each other as possible (where polygon restrictions apply), paying close attention to the outline and shape of the model. Finally you need the models to be in the exact same position as each other. Easiest way to achieve this is to set their pivot points to the centre [via the hierarchy tab – effect pivot only – centre to object]. And then with the move tool enabled, right click its icon and set the world coordinates to 0 along every axis.
As previously mentioned, your low polygon mesh needs to fully unwrapped in order for this to work to perfection. This mesh has already been unwrapped, so I will not be going though any unwrapping methods in this tutorial.
Next up, we will place an unmodified Skylight anywhere in the scene [Create Tab – Lights – Skylight] and activate the Light Tracer via the Advanced Lighting in the Rendering menu.
Once the light tracer dialogue pops up, the light tracer is automatically activated, so you can close this dialogue box now.
With your low mesh selected ( Note : it's a wise idea to name the two meshes, and then select the correct one via the Hierarchy panel rather than clicking in the same area 20+times to select a mesh that's underneath the one already selected ) open up the Render to Texture dialogue via the Rendering Menu and enable Projection Mapping. In the drop down box where it says (No Projection Modifier) click the 'Pick' button and select your High Res mesh. Under the mapping coordinates, ensure that ' Use Existing Channel ' is enabled, as this will use the same channel your unwrap is on.
| |
Underneath this in the Output roll-out, choose 'Add' and select LightingMap from the list. Now you need to specify the file name, file type and destination of your light map. ( Note : To make life easier, I usually just save it in the same folder as whatever Max file I'm working on. ) Next, select the desired output size of your map, ensure that “Shadows”, “Direct Light On” and “Indirect Light On” are all ticked . Finally, in the Baked Material roll-out, click the “ Output Into Source ” radio button, this stops Max from making a shell of the material. |
| |
| |
|
Keep the Render to Texture window open .
If you were in the modify panel on your low poly mesh when we were doing the Render to Texture , you would have noticed a messy blue cage envelope your model when Projection was enabled.
 |
|
This blue cage represents how the high res details with be projected onto the low res, and by default, it's usually pretty messy. In the modify tab scroll down to the Cage roll-out and hit the 'Reset' button. This will snap the cage to the exact positions on your low poly mesh.
|
Now we need to push the cage out slightly, I find it is usually quite helpful to enable 'Shaded' when doing this, as with Shaded enabled we can see its effect more clearly on screen. You would usually stick to a pretty low value of Push, I've gone for 0.07 in this case, but it will constantly vary. If you need to manually edit the cage, just expand the Projection Modifier and Select “Cage”, this will allow you to push and pull at the vertices of the cage.
Just to make sure we're on the right track here, you should have something similar to this by now:
Now go back to your Render to Texture window and whack that 'Render' button like there's no tomorrow ( Note : J ust once will do ). A message will pop up saying “ The following elements do not specify a Target Map slot ” you can safely ignore this and click the 'Continue' button. Your Lighting Map will now be baked. ( Note: The image that draws on screen is not the one you will be using, so there is no need to save this ) Once the render is complete, close down the render window. Your Light Map will be in the location you previously specified in the Render to Texture window. If you did not specify a location, then your file will be in the 'Images' folder in the 3Ds Max installation directory ( Common : C:\Program Files\Autodesk\3dsMax8\images )
Your Light Map should look similar to this: ( Note: I've rendered two, as that is how my mesh is unwrapped )
Usually these maps would be used in conjunction with a 2D editing program, where you simply slap the light map on a texture and adjust the blending modes to create accurate shading, thus reducing the need to always render your mesh with additional lights in the scene. This particular Light Map that I have generated could use some touching up in post-production, but even without a single edit, you can see that it still works wonders.
|