Flickering lights

If you're looking for mapping help or you reckon you're a mapping guru, post your questions / solutions here

Moderator: Moderators

Post Reply
User avatar
Axion
Major General
Posts: 683
Joined: Mon Sep 29, 2003 5:14 am
Location: Northern California
Contact:

Flickering lights

Post by Axion »

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
Image
omniscient
Major General
Posts: 694
Joined: Tue Sep 16, 2003 12:02 am

Post by omniscient »

go to wackos mohaa trashbin and check out the torches, look at the shader and stuff to see how its done.
Random
Moderator
Posts: 401
Joined: Sun Jun 01, 2003 11:00 pm

Post by Random »

Sad part is there are many other games based on the same engine that have dynamic lights that can flicker. BUt in mohaa you need to do it with scripting.
Moderator
Image
omniscient
Major General
Posts: 694
Joined: Tue Sep 16, 2003 12:02 am

Post by omniscient »

very sad but very true. u have a lot more freedom in mohaa editing than in any other game ive seen, the downside to that is the easy stuff is complicated.
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

Have a look at this post

/forum/viewtopic.php?t=5396
omniscient
Major General
Posts: 694
Joined: Tue Sep 16, 2003 12:02 am

Post by omniscient »

boger hes looking for a flickering light. its says at the top that this is for a pulsating light, not a flickering one. cool find though.
Image
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

I guese you are right my mistake I just remember that post so I posted the link .
User avatar
wacko
Field Marshal
Posts: 2085
Joined: Fri Jul 05, 2002 8:42 pm
Location: Germany

Post by wacko »

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...
User avatar
Axion
Major General
Posts: 683
Joined: Mon Sep 29, 2003 5:14 am
Location: Northern California
Contact:

Post by Axion »

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!
"The work of a thousand years is nothing but rubble."
- Dr. Carl Goerdeler (1943)
Visit my mapping site: http://www.freewebs.com/axion9
Image
User avatar
wacko
Field Marshal
Posts: 2085
Joined: Fri Jul 05, 2002 8:42 pm
Location: Germany

Post by wacko »

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.
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

Dynamic light

Post by tltrude »

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.
Tom Trude,

Image
Random
Moderator
Posts: 401
Joined: Sun Jun 01, 2003 11:00 pm

Post by Random »

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.

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
	}
}
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
Moderator
Image
User avatar
Axion
Major General
Posts: 683
Joined: Mon Sep 29, 2003 5:14 am
Location: Northern California
Contact:

Post by Axion »

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.
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?
"The work of a thousand years is nothing but rubble."
- Dr. Carl Goerdeler (1943)
Visit my mapping site: http://www.freewebs.com/axion9
Image
Random
Moderator
Posts: 401
Joined: Sun Jun 01, 2003 11:00 pm

Post by Random »

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.
Moderator
Image
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

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
Post Reply