Page 1 of 1

Exporting with Max6 lightmaps.

Posted: Fri Nov 12, 2004 7:33 pm
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

Success!

Posted: Sat Nov 13, 2004 5:56 am
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

Posted: Sat Nov 13, 2004 11:30 am
by afecelis
hey Testur,

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

Lightmaps

Posted: Sat Nov 13, 2004 12:08 pm
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.

Re: Lightmaps

Posted: Sat Nov 13, 2004 11:29 pm
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.

Max6 Lightmaps

Posted: Sun Nov 14, 2004 1:19 am
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

Posted: Sun Nov 14, 2004 9:13 am
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....

Posted: Sun Nov 14, 2004 2:17 pm
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.

How to keep the smoothness of my 3dsmax lightmaps?

Posted: Fri Feb 25, 2005 10:39 pm
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.

I found it!

Posted: Fri Feb 25, 2005 11:12 pm
by PixelFox
driver->setTextureCreationFlag(video::ETCF_OPTIMIZED_FOR_QUALITY,true );

Posted: Mon Feb 28, 2005 10:18 am
by Testur
Never experienced that phenomenon myself, glad things worked out for you in any case.