Advertisement

Maya lightmap generation

Started by December 06, 2006 05:25 PM
1 comment, last by reuomi 18 years ago
Hi, My problem is quite simple: We use maya for modelling and animation, but the artist doesn't know how to generate lightmaps within maya. I've tried and googled along, and all the solutions I found baked the texture+ilumination, when I just want the ilumination. If I just baked ilumination without the original texturing, I got a lightmap as I wish to be exported, but I couldn't preview the lightmap+texture in maya. As you may have noticed, I'm not fluent with maya :) So, what I would want, is a way to get lightmap (or baked ilumination, as you wish to call it) separated from the other textures (diffuse, etc), and still being able to preview it in the viewports from maya. I would prefer to avoid using external tools for that, because somewhat slows down productivity, imho. And that's all, thanks in advance
shash / Collapsehttp://collapse.scenesp.org
Hi Shash,
I've been struggling with this problem as well, and the only solution I've found for visualizing lightmaps in Maya is to create a layered texture to plug into the color channel of your materiel. You place the lightmap on the top layer and set it to multiply. You'll also have to go into the UV linking window and link the UV sets with their coorisponding bitmap. It's kind of a poor solution, mainly because you'll have to have a unique material for every object, as well as because it's a cumbersome process. I use it just for testing, but plan on bypassing the materiel entirely and having the lightmaps associated on a per object basis in the engine itself. Hope this helps!
-Josh
Advertisement
No problem there. Let me jsut fire up maya and guide you through. personaly I dont use Maya software renderer to bake. i use mental ray or Turtle Renderer by illumination lab (provides far higher quality bakes.) but I can show you how to generate light maps per object rather easily. First, make sure your UV's have no mirroring, the engine i am using (kaneva Game platform) has multi-layer support for textures so on models with mirroring i generate a specific uv map directly for light maps and what not. secondingly scalled textures are a no-no for lightmap generation, everything needs to be layed out in the uv pane betreen 0 and 1. so this will require multi textureing of some sort, there is no way around this besides using full realtime lighting.

Now first thing, I dont bother with weird setting for illumitation and such. I find it easyer to make a copy of a project, identical to the original one, except one is only for lightmap generation. I set each material to a white color, then for each object i assign a texture bake set to each object. to do so, go to the Rendering mode (do so by selecting it fro mthe little drop down box to the top left of window, by default it should say modeling) then across the menu bars up top you will see a menu called "lighting/shading" under there is where u will set your bake sets. so select you object, go under "lighting/shading" and "assign new bake set"->"texture bake set" and adjust the poperties (the attribute editor should pop open from the right.) I use Tiff 8 bit for my lightmap generation, beause i have gotten use to it, i dont really see any rendering time differences, pretty much only difference between tiff and Jpeg in this respect is that jpegs come out pixelated and grainy. also make sure you check "bake to one map". thats about it. set up your lights, do some regular test renders to get everything right.

One thing you should concider is soft shadowing, you can eather set up your lights to do it (for outdoor scenes use a directional light and adjsut the ligth angle to get soft shadows) and there is somthign for ambeint lights too but i forget at the moment. what you want to concider do you want to generate soft shadow maps directly, and have the slow render time. or do you want to generate quick maps and take them through a blurr pass in photoshop or other image editor, it all depends on which is fastest and easyest for you. once you have desided go to batch bake under lighting and shading and it will save all your textures (make sure to give them a prifix) to the lightmap folder. for 7 this is under my docs>maya>projects>renderdata>mentalray>lightmaps, earlyer is under my docs>maya>projects>lightmaps
Indy to Pro: Journeyhttp://phiendstudios.blogspot.com

This topic is closed to new replies.

Advertisement