Flickering lights
Moderator: Moderators
- Axion
- Major General
- Posts: 683
- Joined: Mon Sep 29, 2003 5:14 am
- Location: Northern California
- Contact:
Flickering lights
Is it possible to make lights flicker intermittently?
"The work of a thousand years is nothing but rubble."
- Dr. Carl Goerdeler (1943)
Visit my mapping site: http://www.freewebs.com/axion9

- Dr. Carl Goerdeler (1943)
Visit my mapping site: http://www.freewebs.com/axion9

-
omniscient
- Major General
- Posts: 694
- Joined: Tue Sep 16, 2003 12:02 am
-
omniscient
- Major General
- Posts: 694
- Joined: Tue Sep 16, 2003 12:02 am
-
omniscient
- Major General
- Posts: 694
- Joined: Tue Sep 16, 2003 12:02 am
http://dynamic4.gamespy.com/~map/mohaa/ ... flickering and
viewtopic.php?t=1721&start=0&postdays=0 ... highlight=
was probably the same topic.
the result was that this would have to be scripted and that these lights don't care much about walls and their ability to stop light
so, axion, what do u want to use these lights for? the torches at the recyclingbin do not flicker, but u won'T get light spots at the backside of the walls. scripted lights can flicker but they go through walls...
viewtopic.php?t=1721&start=0&postdays=0 ... highlight=
was probably the same topic.
the result was that this would have to be scripted and that these lights don't care much about walls and their ability to stop light
so, axion, what do u want to use these lights for? the torches at the recyclingbin do not flicker, but u won'T get light spots at the backside of the walls. scripted lights can flicker but they go through walls...
- Axion
- Major General
- Posts: 683
- Joined: Mon Sep 29, 2003 5:14 am
- Location: Northern California
- Contact:
Well, I'm working on an objective map for a Shipping Facility/Storage House, and one the objectives is for the Allies to make their way underground to the basement where the facilities' power generator is housed and destroy it. I was seeing if it was possible to make some of the lights in the facility flicker or shut off after the generator was destroyed. So far, it looks like it's going to be more trouble than it's worth, but I wouldn't mind placing a few broken lights around for atmospehere.
And thanks to everybody who has replied, you've been very helpful!
And thanks to everybody who has replied, you've been very helpful!
"The work of a thousand years is nothing but rubble."
- Dr. Carl Goerdeler (1943)
Visit my mapping site: http://www.freewebs.com/axion9

- Dr. Carl Goerdeler (1943)
Visit my mapping site: http://www.freewebs.com/axion9

shouldn't be too difficult to set some flickering lights in your factory building.
jv's example map is good to start with and it includes everything u'll need. You will just have to keep in mind that these lights are visible on both sides of the wall they are attached. So u will probably just place them on walls where just one side can be seen.
jv's example map is good to start with and it includes everything u'll need. You will just have to keep in mind that these lights are visible on both sides of the wall they are attached. So u will probably just place them on walls where just one side can be seen.
Dynamic light
While dynamic lights add cool effects to your map, they also lower the frame rate badly. I added eight small flashing dynamic lights to Wacko's UFO map and saw that the FPS drops by about 20 points whenever they are on (50 down to 30 range).
So, don't use dynamic lights to light your map, and only use them for effects sparingly.
So, don't use dynamic lights to light your map, and only use them for effects sparingly.
Ok how about this, and this took me a while to come up with. Lets say the light doesnt flicker but the corona you put around the light does?
Try this. Edit the shader that is used for the corona.
This would require a secondary texture named here as blankcorona.tga. Now the light would be on for a bit then off, and repeat. You could play around abit with it to create a more elaborate flickering effect.
If you need to know more just ask and i will see what i can do.
Random
Try this. Edit the shader that is used for the corona.
Code: Select all
corona_reg
{
qer_editorimage textures/sprites/corona_reg.tga
deformVertexes lightglow
cull none
{
animmap 4 textures/sprites/corona_reg.tga, textures/sprites/corona_reg.tga, textures/sprites/blankcorona_reg.tga
blendfunc add
}
}
If you need to know more just ask and i will see what i can do.
Random
Moderator


- Axion
- Major General
- Posts: 683
- Joined: Mon Sep 29, 2003 5:14 am
- Location: Northern California
- Contact:
I'm afraid that I don't understand this part. Do you mean that I need to create a custom texture and rename ir ro blankcorona, or can I just use any texture?Random wrote: This would require a secondary texture named here as blankcorona.tga. Now the light would be on for a bit then off, and repeat. You could play around abit with it to create a more elaborate flickering effect.
If you need to know more just ask and i will see what i can do.
"The work of a thousand years is nothing but rubble."
- Dr. Carl Goerdeler (1943)
Visit my mapping site: http://www.freewebs.com/axion9

- Dr. Carl Goerdeler (1943)
Visit my mapping site: http://www.freewebs.com/axion9

Yes you will have to create a custom texture and you can use any names you like. Just make sure the shaders are correct.
What i should have done is explain more how a flickering light is possible without a giant fps hit. That shader i provided wouldnt work anyways but i was just tryin to nudge you in that direction.
Also you may try to set one of the textures to emit light in the shader and the other one not. Not to good for creating shadow but again its an option.
What i should have done is explain more how a flickering light is possible without a giant fps hit. That shader i provided wouldnt work anyways but i was just tryin to nudge you in that direction.
Also you may try to set one of the textures to emit light in the shader and the other one not. Not to good for creating shadow but again its an option.
Moderator


The light from a light emitting texture is calculated in the light stage of compileing and it takes a lot longer to compile . I think the corona or the dynamic lights with a small radius are the only options . I made a traffic light as a test once and used about 16 small dynamic lights for the signal and walk lights I didn't notice a big drop in fps but it was a small test map .
You can download it and have a look if you want the pak has the map in it .
http://members.shaw.ca/bdbodger/bdb_traffic_light.pk3
You can download it and have a look if you want the pak has the map in it .
http://members.shaw.ca/bdbodger/bdb_traffic_light.pk3

