PDA

View Full Version : TUTORIAL Maya Light Bake Mental Ray GI Prelight Texture


EricMLevy
12-30-2004, 07:21 PM
This tutorial will teach you how to use Maya's Prelight with Mental Ray to bake your GI lighting to textures. I just finished a project where I baked the lighting to save on ridiculous render times. I thought I'd share the process with you because it gave me loads of trouble. I modeled in Max, so this will take that into account.

Step 1. Model your scene

Step 2. UVW map every single thing you've modeled, as if you were going to export them to a game engine. There are hundreds of tutorials on this. Even if it looks like your object displays the texture correctly without any UVW mapping, it still needs to be done. The reason why is that Maya needs to be able to apply the lighting information to each polygon, and if the UWV map overlaps, Maya won't know what to write at that point, and it'll output garbage.

http://www.pages.drexel.edu/%7Eeml29/careyfig01.jpg
This image was taken from “http://www.siggraph.org/publications/newsletter/v32n2/contributions/images/careyfig01.jpg” in order to illustrate my meaning. It's not mine. It sure it pretty though.

Step 3. Export your models as FBX. Some models require the check box about normals per vertex to be checked. Some don't. If it looks wrong, try it the other way. I don't know why this happens. I don't have to know it, so back off. Import them into Maya.

Step 4. Light your scene.

Step 5. Apply textures to your models. It is recommended that if you are using procedurals, you bake them out to textures before baking the lighting. I have read that the light bake goes better if every object has a bitmap on it in the first place.

Step 6. Edit Polygons -> Colors -> Prelight Mental Ray

Step 7.

http://www.pages.drexel.edu/%7Eeml29/prelightbox.jpg


Step 8. Wait, because this process takes a LONG time.

Notes. The resolution that you bake at makes the biggest difference on how long this process takes. For my project I made a few selection sets, 128x128, 256x256, 512x512, 1024x1024. Think about how big the texture will be on screen. If it will never get up close or distorted due to perspective, give it a small texture. If you're working in video resolution, and the textures are going to be motion blurred, you can get away with lower resolution. The project I worked on had 1600 objects, so that's 1600 textures that Maya has to load up at render time. The renders were not as fast as I'd imagined them, but 5 minutes per frame is better than 35 or 40 it would have take without baking the lighting. If your object is reflective, I would not recommend baking the reflections. Do those at render time. If you'd like more information on this, feel free to email me @ eml29@drexel.edu.

BillSpradlin
12-31-2004, 05:20 AM
One thing to note is that you can smooth the object first that you are baking then do the bake. After the bake is done you can use the lightmap that was generated for the smoothed mesh on the lower res mesh. This is more desirable simply because the light information is based on the verts and the more verts you have the better it will look.

Also, you might want to try converting your texture files to .bot (maya software) or .map (mental ray) before rendering. This will save you an even more amount of rendering time.

CGTalk Moderation
01-20-2006, 07:00 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.