Page 1 of 1

Q4: Linking flares to flickery lights

Posted: Thu Oct 05, 2006 3:29 am
by Kaz
Sorry if this is a bit of an easy one, but I've been searching in a number of places and can't find how to make a flare flicker in sync with a light. Thanks in advance ;)

Posted: Thu Oct 05, 2006 5:20 am
by GODLIKE
I don't have specifics.. but when I did this in Doom3, I had to match the light texture to the actual flicker.. So to do this with a flare, I'm guessing you need a flare texture that flickers.

However, if it's a relatively FAST flicker, the fact that the flare doesn't follow the change might not be annoyingly obvious..

Posted: Thu Oct 05, 2006 2:13 pm
by hemostick
You may be able to find something digging in q4dm9 - it has some of these on the rail curves, mh room jump pad and in other places (the red chiclet lights).

In a nutshell - they're made of
-a light whose shader depends on some "sound" parameters, and has a sound shader attached to it (s_shader key),
-a generic flare (i.e nothing special about it),
grouped together.

according to iddevnet :
sound: The current sound amplitude of the entity using this material. This is used to create light materials that pulse with the sound.

Posted: Thu Oct 05, 2006 3:14 pm
by rgoer
You want to use the "combine" function. Create a light entity, give it a light shader that blinks/flickers (using a sound-modulated shader and applying a buzzing/popping sound works well for this), create your flare quad and position it near the light, then select the light first and your flare second, then use the "combine" menu function to combine your flare into your light. I'm not exactly positive what is going on under the hood, but your flare quad will become a part of the light entity definition, and it will flicker in tune with your light.

It's been a while since I did that, though, I hope I am remembering the process correctly.

Posted: Thu Oct 05, 2006 5:02 pm
by hemostick
Looking at the .map file, things look like this (roughly)
{
light def
{
flare def
}
}

(i.e the flare is defined within the light)
Ungrouping them does evil things... the separated bits become worldspawn

Posted: Thu Oct 05, 2006 9:39 pm
by rgoer
yeah, once you combine the flare and the light, they both become part of the light entity

Posted: Sat Oct 07, 2006 2:04 am
by Kaz
Thank you all very much for the quick replies... quite helpful!

It should be noted that the flare will not flicker in the Radiant preview, only in-game. (This confused me for awhile.)

Image

Posted: Sat Oct 07, 2006 7:59 am
by o'dium
It will, you jsut have to enable realtime preview. I cant remember which button it is now, but its in the rendering options. It lets ou view particles and shader animations from the editor (Although for Quake 4, because they messed up particle previews, it will jsut show animations).

Posted: Sat Oct 07, 2006 8:25 am
by Kaz
It's "material animation". I'm talking about the flare not actually flickering in the editor, while it does in-game. Several other people I've talked to have had the same issue. :)

Posted: Sat Oct 07, 2006 8:28 am
by o'dium
Kaz wrote:It's "material animation". I'm talking about the flare not actually flickering in the editor, while it does in-game. Several other people I've talked to have had the same issue. :)
Really? Thats odd, they animate for me in the editor, I've viewed them before... Strange? I do remember having to refresh the entire scene before it would work though.

Posted: Sat Oct 07, 2006 8:38 am
by Kaz
Yeah, it doesn't make sense to me either :o