Autodesk 3ds Max - how to extract already baked LightMaps?

Anonymous

Autodesk 3ds Max - how to extract already baked LightMaps?

Anonymous
Not applicable

Hello. I want to know, is that possible to extract LightMaps, that are already baked/generated (not by me)? I was just converting some models from one video game, and I noticed that some of them containing already generated LightMaps. And I wonder, can I export these LightMaps to an image file? 

0 Likes
Reply
Accepted solutions (1)
1,121 Views
8 Replies
Replies (8)

Alfred.DeFlaminis
Alumni
Alumni

Hello @Anonymous,

 

I'd like to help you with your issue regarding these maps.  My experience with lightmaps is that they usually *are* image files already.  It's a bit hard to tell, but that sort of looks like vertex shading plus a texture, or... just a texture.  Can you please check the Asset Tracker for me?  File->References->Asset Tracking

 

How many items show up in there?

 

I think it's hard to diagnose without a part of the file to investigate.  Would you be willing to send me a few polygons from one little section to take a closer look at please?  I don't need the whole model, just a part of it.  If NDA is an issue, I can set you up a box account that would be private between us.  

 

Thank you and best regards,

0 Likes

Anonymous
Not applicable
I will give you all the info that you need in a few days. Thanks for answer.
0 Likes

Anonymous
Not applicable
Alright, so Asset Tracker shows up only textures that model had to load, and nothing else. And second... I guess it would be better, if I will upload the whole model. This is for Max 2017. https://mega.nz/#!bBEglIjY!NewOREiQxMWT7zoyMYvhuDw1Wqgjpe2nRwrcwxfL-KI
0 Likes

Alfred.DeFlaminis
Alumni
Alumni

Hello @Anonymous,

 

Thank you for posting the file, it helps a lot to be able to take a closer look.  I think we were both on target here, the lightmap information has been baked into a vertex channel so what we're looking at here is baked info on a channel (-1, -2) that we can't normally access.  We can see that this info is on those channels by using the Channel Info Utility.  The main trick here since we can't access that channel for baking out via Render to Texture by default is to use a trick detailed here by Louis Marcoux on the Area.  The sound quality is a bit spotty but the information is great and I actually learned some new stuff researching this info for you.  I hope this helps!  

 

It looks like you may have to setup new uvs on one channel to bake to as many of the uvs for these parts live outside the 1:1 uv square.  If I had to guess I'd say some middleware baked the current vertex maps between Max and the engine.  Hard to say.  

 

Please hit the "Accept as Solution" button if my post fully solves your issue or answers your question. This lets me know that I was effective in helping you, and thank you for doing so.

 

Best Regards,

Alfred.DeFlaminis
Alumni
Alumni

Hello @Anonymous,

 

I just wanted to follow up here, did this fix your problem or make it possible to bake out those lightmaps yourself?  I just wanted to be sure so I can add this thread to the solved threads.  This is a unique and advanced issue and I am very interested in the final outcome.  Thank you!

Best Regards,

0 Likes

Anonymous
Not applicable
Well, I learned more about my game engine where I actually trying to import these models, and it's actually supporting Vertex Colors pretty well. But the main problem is that I cannot export these ones from our, or any other converted model. And it's basically because these Vertex Colors are baked or something, since I can't edit them with the Vertex Paint. And so... I guess it's impossible to export them? Because I tried a multiple game engines, and they're all have the same results. And they're all supporting models with the vertex paint inside them. And if I'll try to edit model's UVs and will try export it, it will mess everything up! On example with terrain! Is there a solution to this whole problem..?
0 Likes

Anonymous
Not applicable
Accepted solution
Oh, nevermind! Everything is working PERFECT! I just... Didn't include Vertex Color in my materials! 😄 Thanks for your big help!

Alfred.DeFlaminis
Alumni
Alumni

Hello @Anonymous,

 

Hey I'm glad this worked out for you!  I've been working on this for an hour or so, learning more about the vertex channels and how to access them via script, and I even found a bug.  I'm going to post what I had in case it may help future users, but you're good to go.  (If the previous post was helpful, "accepting as solution" will eventually turn it into an Autodesk Knowledge Network article and future users will learn from our interaction.  And thanks for that!)

 

What I was writing before your post came in:...

 

Interesting.  Which engine are you using?  

 

It seems we need to find a way to remove that info, and the channel info tool doesn't seem to do it.  You can use this command with an object selected to blow away the vertex channels:  "(channelInfo.ClearChannel $ 0)"  That will add a UVW Mapping Clear mod to your stack must then be collapsed to 'cement' it into place.  It won't affect channel 1, so the uvs will still be there above channel 0.  

 

***Note: Well what do you know, I found a bug while looking into this for you. Apparently, you MUST use this command for this to work.  Simply adding the UVW Mapping Clear doesn't seem to do the trick here unless you've run this command once already (even if you delete the mod it creates)  Can I use your file to submit to the bug tracker to get this looked at?

 

Best Regards,

0 Likes