Exporting with Max6 lightmaps.

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
Post Reply
Testur

Exporting with Max6 lightmaps.

Post by Testur »

Howdy.

I've been experimenting with the Irrlicht engine for a couple of weeks now and begun to really like the idea of exporting lightmaps directly from 3Dmax to a format Irrlicht can load. Now, the two formats that looks most promising are the .my3D and the .x formats. Here's where the problems start. The aforementioned problem with the .my3D Max6 exporter not exporting the lightmaps since I'm using Max6, and the Panda eXporter doesn't output a format that Irrlich (or any other X file viewer I have) can read.

I like the .my3D format and it's potential, if it where to support full export from Max6 with Tbaker lightmaps I'll be very happy, but if that's not gonna happen, what are my options? Wait for good .x support in Irrlich, or is there a way to get MAX lightmaps imported into Q2/Q3 files?

-W
Testur

Success!

Post by Testur »

Waddayaknow, as soon as I wrote that message, I found a way to do it. It was a bit tricky, but it works.


Have a look: Image
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

hey Testur,

you got that in max6? I'm also having problems with it. What's the trick?
Testur

Lightmaps

Post by Testur »

Set it to put the baked lightmap on the self-illumination slot and make sure the shell material you get is applied when you export.
Guest

Re: Lightmaps

Post by Guest »

Testur wrote:Set it to put the baked lightmap on the self-illumination slot and make sure the shell material you get is applied when you export.
Testur,
could you, please, write some brief instructions (but not as brief as above... maybe just a little bit expanded). This is very useful info.
Testur

Max6 Lightmaps

Post by Testur »

1:Bring up the Render-To-Texture Dialog. (Keyboard shortcut:0)
2:Mark a mesh you want to bake.
3:In Output Rollout, click on the 'Add...' button in the RTT dialog and chose LightingMap
4:Assign 'Target Map Slot:' to Self Illumination
5:Set whatever width and height you prefer
6:In the Baked Material Rollout, set 'Save Source (Create Shell' and 'Create New Baked')
7:Repeat steps 2 to 6 until you have all the setting for all the meshes you want to bake and hit the 'Render' button in the RTT dialog.
8:Watch your maps be rendered. :)
9:Now you should have a very bright scene with many colors. You can use the 'Pick Material from Object' to check if it now has a shell Material, if it does It's lightmap under 'Baked Material' "<meshname>LightingMap.tga" should be exported with .my3D as a lightmap.
10: Load it up in Irrlicht and enjoy. :)

That should be it. If I have fergotten anything or there's more questions just ask away.

-W
vermeer
Posts: 2017
Joined: Wed Jan 21, 2004 3:22 pm
Contact:

Post by vermeer »

Panda works well...it's all about the settings.


The fact is...not with irrlicht. As it's all about x files being able to export 2nd uv channel via fvf data, which I think irrlicht can't read.

With my3d, looking in ur steps, seems what u're doing is...baking the lighting and shadows into texture in channel1 ? That is you add it as a material property -self illumination- , property to whcih you link to the actual lightmap...


I suppose I deduced well....
Finally making games again!
http://www.konekogames.com
Guest

Post by Guest »

vermeer wrote:Panda works well...it's all about the settings.


The fact is...not with irrlicht. As it's all about x files being able to export 2nd uv channel via fvf data, which I think irrlicht can't read.

With my3d, looking in (yo)ur steps, seems what (yo)u're doing is...baking the lighting and shadows into texture in channel1 ? That is you add it as a material property -self illumination- , property to whcih you link to the actual lightmap...


I suppose I deduced well....
Panda didn't work at all for me. The files I exported couldn't be view by a single X file view I tried to load it into.

No, the lightingmap is on channel 3, try it yourself and you'll see.
PixelFox

How to keep the smoothness of my 3dsmax lightmaps?

Post by PixelFox »

Hi Testur, many thanks for your step by step explanation on lightmaps in 3ds max. That all works fine and I can load up everything in Irrlicht.

Now here is one thing I can't figure out, maybe you know an answer:
Inside Irrlicht on objects with a plain white texture I don't get the same smooth shadows / light fades like I have on my generated lightmaps from 3ds max. It looks like color steps. Like I didn't switch to 24-bit, which of course I did in the max render to texture setup, also while exporting and of course also in my source code when initializing the Irrlicht device. But nothing changes, the steps of colors instead of smooth light fades remain...

Any input is greatly appreciated.
PixelFox

I found it!

Post by PixelFox »

driver->setTextureCreationFlag(video::ETCF_OPTIMIZED_FOR_QUALITY,true );
Testur

Post by Testur »

Never experienced that phenomenon myself, glad things worked out for you in any case.
Post Reply