Dynamic Light problem..

Blitz3D Forums/Blitz3D Programming/Dynamic Light problem..

Naughty Alien(Posted 2006) [#1]
..I did level with lightmap.. now I want to make additional effect with dynamic lights (flickering) on places where light comming from torches...I create just one light and position it a little bit higher than torch, but its seems that dynamic light not affecting lightmapped surface, or I'm doing something wrong..in order to make flickering, I put this in main loop

glow#=Cos(MilliSecs())
lum#=(Abs(glow*Sin(glow))*255)*0.8
LightColor Light_Source1,220+lum,160+lum/2,100+lum/3
LightRange Light_source1,((lum*1.8)+232)

..any help??


big10p(Posted 2006) [#2]
Your lightmapped surface(s) are probably set to 'fullbright', so will not be affected by vertex lights.


Naughty Alien(Posted 2006) [#3]
how to fix this big10p? Do I have to go back and export again from 3DSMAX and check settings, or I can do that in Blitz??


big10p(Posted 2006) [#4]
Sorry, NA - this isn't really an area of my expertise.

However, as I understand it: mixing static lighting (lightmaps) with dynamic lighting (vertex lights) is troublesome. When using a lightmap, you want the lightmap alone to define the lighting, which is why lighting is 'turned off' on a lighmapped level by making it fullbright. Having a lightmapped level also be affected by vertex lights looks plain wrong, I understand.

I think you need to come up with a different method to show the torch flicker. Apha'd decal sprites, maybe? I don't really know TBH - as I say, not really my area. :)


Naughty Alien(Posted 2006) [#5]
..ok..I fix it...I did what you suggest, just disable fullbright flag, and everythings working fine...coooll :) Looking much, much more better now..


D4NM4N(Posted 2006) [#6]
I managed to do this once, its a real mission to get the ballance right. If you have exported something from giles or cs you must set up a recursive functionm, to go through each branch of the mesh and turn the fullbright off.

Also you must recreate a DX light for each light your lightmapper used to shadow it, in the same positions. (otherwise its too dark).

Finally, i found this method is only really effective with subtle shadows. Shadows that are too dark will look weird, as they wont be lit by any non static lights (torches etc).