Page 1 of 1
Dynamic lightmap?
Posted: Thu Sep 16, 2010 10:55 am
by Noruen
I was always convinced that q3 engine doesn't suppor dynamic lightmaps (blicking lights) but today I probably created one. Doesn't know if it is error or something normal what I haven't known?
Re: Dynamic lightmap?
Posted: Thu Sep 16, 2010 11:23 am
by neoplan
you probably just found out about lightstyles. As far as i know, q3map2 exports various lightmaps and produces a shaderfile. So its just a shader that gives the illusion of a dynamic light.
Re: Dynamic lightmap?
Posted: Thu Sep 16, 2010 11:33 am
by Noruen
Probably yes, but I have never read about possibility of flashing lights in quake III. I'm annoyed...
Re: Dynamic lightmap?
Posted: Thu Sep 16, 2010 12:06 pm
by dichtfux
You could already do that in Quake 2.
Just select a light entity, then define key=style, value=1 - 12.
http://panjoo.tastyspleen.net/rust/tuto ... /yeesh.htm
Re: Dynamic lightmap?
Posted: Thu Sep 16, 2010 12:21 pm
by Eraser
Yeah but this is Quake 3, not Quake 2

Wasn't lightstyles something that wasn't introduced to the Quake 3 engine until other games used the engine and implemented it?
Re: Dynamic lightmap?
Posted: Thu Sep 16, 2010 1:35 pm
by Noruen
Eraser - Yes! I thought that, but really, it works in quake 3 , but not correctly (only one type of blinking and not all surfaces are affected by this light.
Re: Dynamic lightmap?
Posted: Thu Sep 16, 2010 2:15 pm
by neoplan
Other lighstyles do work! And i think that you could control the affected surfaces by using func_groups.
Re: Dynamic lightmap?
Posted: Thu Sep 16, 2010 3:04 pm
by jal_
Eraser wrote:Yeah but this is Quake 3, not Quake 2

Wasn't lightstyles something that wasn't introduced to the Quake 3 engine until other games used the engine and implemented it?
Yup. Raven added "true" lightstyles to the Q3 BSP format for the Jedi Knight games. Also used it for RTCW. But they aren't available in Q3, ID didn't implement the new format back.
Re: Dynamic lightmap?
Posted: Thu Sep 16, 2010 3:29 pm
by obsidian
Light styles will oscillate between values of any Q3 waveform function.
Will not affect vertex or lightgrid, so you'll have to work around this with light_junior or something.
Affected surfaces need q3map_styleMarker, lightmap and diffuse stages need to be ordered specifically lightmap first.
Q3Map2 will generate a bunch of external shaders and stuff. Make sure you include these with your PK3. I think it will also generate some error messages in the game console, you can (probably) safely ignore these.
Also, there is a pretty big performance hit on older systems and there is a fixed value of 3 lightstyles per surface. I don't know what happens if you do more than 3, probably nothing good (like makes your computer explode - Q3Map2 is not a supported product, remember).
http://robotrenegade.com/q3map2/docs/sh ... tyles.html