Search Home Members Contacts
About Us
Products
Downloads
Community
Support
Pages: [1]
  Print  
Author Topic: Lightmaps UV data  (Read 778 times)
Leon_
Customers
Community Member
*****
Posts: 65


WWW
« on: November 08, 2007, 01:43:22 AM »

Hello,

I'm using 3D studio MAX to create lightmaps for my objects and then export the meshes accompanied with the lightmaps UV data.

I would like to ask when I have a specific mesh that I use in multiple scenes and the resulting lightmap is ofcourse different, is the UV data that is saved with the mesh different for each scene?

So basically what I want to know is if I have to load different versions of that mesh for each scene.

Thanks,
« Last Edit: November 08, 2007, 03:38:10 AM by Leon_ » Logged

sybixsus
Customers
Community Member
*****
Posts: 1048


WWW
« Reply #1 on: November 08, 2007, 02:07:08 PM »

Not unless you're letting 3dsMax auto-generate the UV coordinates each time you render, in which case it could generate different UV coordinates each time. ( It shouldn't, I know, but I've seen it and it does sometimes do this. ) If you only generate the UV coordinates once and then leave them be for all subsequent lightmap renders, the same mesh will be fine.
Logged
Leon_
Customers
Community Member
*****
Posts: 65


WWW
« Reply #2 on: November 08, 2007, 04:32:38 PM »

Not unless you're letting 3dsMax auto-generate the UV coordinates each time you render, in which case it could generate different UV coordinates each time. ( It shouldn't, I know, but I've seen it and it does sometimes do this. ) If you only generate the UV coordinates once and then leave them be for all subsequent lightmap renders, the same mesh will be fine.

sybixsus, thank you for your reply.

One more clarification, when you say that 3dsMax auto generates the UV coords you mean the modifier that is applied to all objects after a render-to-texture is complete? That's how I'm doing it at the moment. How do I manually generate the UV coords?

Best regards,
Logged

sybixsus
Customers
Community Member
*****
Posts: 1048


WWW
« Reply #3 on: November 08, 2007, 07:44:34 PM »

Yes, I mean the UnwrapUVW modifier which is added to the stack of objects with render to texture applied. You don't have to do it manually. Just only let 3dsMax do it once.

Once you've lightmapped the first level/scene, you want to disable the automatic unwrapping, and make it use the existing UV data. Now the first thing to do is to save the UV coordinates out to a file because 3dsMax has a bad habit of accidentally forgetting where it put things and you don't want that to mess anything up. So with the UnwrapUVW modifier ( which 3dsMax added automatically the first time you lightmapped ) still on top, scroll down the modifier panel and there should be an option to export or save UV's. Do that now.

Ok, now every time you want to lightmap another level/scene, you load up your model. Apply an UnwrapUVW modifier and load those UV coordinates from file. You can flatten the modifier stack at this point if you wish, although it should not, strictly speaking, be necessary.

Now in the Render To Texture dialog, look for a section headed "Mapping Coordinates". Under here you have radio boxes. The first one is "Use Existing Channel" and the second one is "Use Automatic Unwrap". By default the second one is selected, so set it to use existing channel instead. Now it will render your lighting from your new scene, but it will use the UV coordinates which you saved from the first scene in order to do it. So all your lightmaps will be able to use the same model.

Hope that helps.
Logged
Leon_
Customers
Community Member
*****
Posts: 65


WWW
« Reply #4 on: November 09, 2007, 03:22:47 AM »

Thank you, that was a helpful guide.
Logged

Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks