Lightmaping questions and geometry exporting

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
crhro
Posts: 9
Joined: Tue Dec 05, 2006 9:24 pm

Lightmaping questions and geometry exporting

Post by crhro »

Hi , i spent all day looking arround the forum searching but i couldn't find an answer for my issue.

I am modelling a scene to increase my game modelling skills and i want to test the models in irrlicht. Atm i'm trying to bake Light Tracer GI and use it as lightmaps to see what it would look like in realtime.

In IrrEdiit i import the .X of the model , i add Diffuse to slot 1 and Light to slot 2 , change material type to lightmap but it doesn't seem like the second map influences the diffuse map , i wonder what am i doing wrong.

Model hass 1 uv set in channel 1 and the textures are TGA 24bit 1024x1024
like this :

Image
Image
harukiblue
Posts: 49
Joined: Sun Dec 10, 2006 6:23 pm

it is offset by 1

Post by harukiblue »

I may have read your post wrong, maby some code snippets or screenies would help. BUT when setting the material texture the 1st slot is 0 and the second is 1, I am not entirely sure what you used.

what material type are you using? I suggest either EMT_LIGHTMAP or EMT_LIGHTMAP_LIGHTING. They both are light maps but the second supports dynamic lighting

Code: Select all

node->setMaterialType(EMT_LIGHTMAP_LIGHTING);

Code: Select all

node->setMaterialTexture( 0, driver->getTexture("...") );
Difuse

Code: Select all

node->setMaterialTexture( 1, driver->getTexture("...") );
Lightmap
crhro
Posts: 9
Joined: Tue Dec 05, 2006 9:24 pm

Post by crhro »

EMT_LIGHTMAP_LIGHTING is verry dark , after manipulation in photoshop i found out that irrlicht handles light maps diffrentlly then i expected + the max light map size seems to be 512x512 for me or i did something wrong , anyway i decided to just bake the light map in the diffuse map .

btw the light map you see there doesn't light the model , except in lightmap_m4 where it makes the model appear a little bit , while in max foe example it makes the model look bright like day light , anyway thnx for the answer.

my question was mainlly about what format should be used for light maps (and how manny bits to) and what would be the max size , but now it doesn't matter as it seems to much of a hassel in irrlicht to get these light maps to work like i expected them.
Jeevan Singla
Posts: 8
Joined: Mon Oct 16, 2006 4:02 pm
Location: India

Post by Jeevan Singla »

yes, i m also facing the same problem
can nebody.. suggest someting ......?
crhro
Posts: 9
Joined: Tue Dec 05, 2006 9:24 pm

Post by crhro »

I baked all the maps in to 1 in the end , the way irlicht does the lightmaping i do not understand but it doesn't seem to like gray/gradient style wich i needed so i decided to bake everything in 1 texture and if i want day/night use 2 individual textures , nothing more i can suggest .

http://www.duat.ro/test.rar

Not much to see , use WASD to move arround and check the simple geometry.
Post Reply