can lightmaped meshes react on dynamic lights?(THEY CAN)

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
needforhint
Posts: 322
Joined: Tue Aug 30, 2005 10:34 am
Location: slovakia

can lightmaped meshes react on dynamic lights?(THEY CAN)

Post by needforhint »

hi all irrlichters, I have a dilema wheter lightmaped meshes can react on ingame lights...and if not wheter their lighmap can be disabled so that they will.........doesn't have to be the my3d meshes :?: :?: ,
Last edited by needforhint on Tue Sep 06, 2005 1:21 pm, edited 1 time in total.
what is this thing...
Midnight
Posts: 1772
Joined: Fri Jul 02, 2004 2:37 pm
Location: Wonderland

Post by Midnight »

take a look at the render to texture tutorial I think that will answer your questions about lighting.. i think.
Masdus
Posts: 186
Joined: Tue Aug 26, 2003 1:13 pm
Location: Australia

Post by Masdus »

Isn't a lightmapped object simply one that has a lighting effect already applied to it, so the lighting becomes part of the stored texture? In that cause dynamic lights would affect the mesh, but the result would be funny, as the precalculated lighting can not be changed, so basically the result would be the combination a a static light and a dynamic light.
GX

Post by GX »

Look at the material flags.

LIGHTMAP (lightmaps only)
LIGHTMAP_LIGHTING (lightmaps + dynamic lighting)
and there x2 x4 versions.

Set the required one for the mesh in question and it "should" do both (according to the docs)
Guest

Post by Guest »

Does anyone know how to toggle the display of the lightmaps, when i switch a dynamic light on?
I think that would answer the question.
needforhint
Posts: 322
Joined: Tue Aug 30, 2005 10:34 am
Location: slovakia

Post by needforhint »

Thanks GX for those useful flags, but they seem to not do the trick, I can't even turn the lightmap off by EMT_SOLID, the texs still are visible sort of (but without shadows, that's a fact) and doesn't react to lights still....i use my3d format (and in Zdimitor's examples I sow no light reaction on a lightmaped mesh too)....is there any irrway how I could set a global ilumination for the scene right in the engine? or do exist any material flags setting a shiness or visibility of a texture?
..cause you see..I won't lightmap my scenes outside of irrlicht if they are not able to use irrlicht lights then, couse i am losing the very essence of irrlicht then :cry:
what is this thing...
GX

Post by GX »

You must also use:
SetMaterialFlag(EMF_LIGHTING,true) (you may have set this to false because of the lightmaps but try it at true) to enable dynamic lights. Used in combination with the other flags is supposed to do the trick. Not sure what is going wrong there.

good luck
needforhint
Posts: 322
Joined: Tue Aug 30, 2005 10:34 am
Location: slovakia

Post by needforhint »

Geee, kisses GX, kisses, I'm through it, the lightmap stays and it reacts to lights :D
what is this thing...
Post Reply