Q4: Linking flares to flickery lights

Discussion for Level editing, modeling, programming, or any of the other technical aspects of Quake
Post Reply
Kaz
Posts: 1077
Joined: Wed Mar 08, 2006 3:43 am

Q4: Linking flares to flickery lights

Post 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 ;)
GODLIKE
Posts: 387
Joined: Tue Nov 30, 1999 8:00 am

Post 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..
User avatar
hemostick
Posts: 203
Joined: Wed Feb 14, 2001 8:00 am

Post 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.
rgoer
Posts: 798
Joined: Sun Aug 17, 2003 7:00 am

Post 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.
User avatar
hemostick
Posts: 203
Joined: Wed Feb 14, 2001 8:00 am

Post 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
rgoer
Posts: 798
Joined: Sun Aug 17, 2003 7:00 am

Post by rgoer »

yeah, once you combine the flare and the light, they both become part of the light entity
Kaz
Posts: 1077
Joined: Wed Mar 08, 2006 3:43 am

Post 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
o'dium
Posts: 11712
Joined: Sun Mar 25, 2001 8:00 am

Post 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).
Kaz
Posts: 1077
Joined: Wed Mar 08, 2006 3:43 am

Post 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. :)
o'dium
Posts: 11712
Joined: Sun Mar 25, 2001 8:00 am

Post 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.
Kaz
Posts: 1077
Joined: Wed Mar 08, 2006 3:43 am

Post by Kaz »

Yeah, it doesn't make sense to me either :o
Post Reply