Entity lighting prob


(demonspawn) #1

In my SP map I have an entity that is triggered to appear when the player walks through a trigger volume. The sequence is a lightning strike followed by an explosion and a flaming fire. Everything works great except that I have just discovered that the area that the event takes place has the light given off by the fire before the trigger happens, in fact its there at the beginning of the map.
Is there a command line I can put in the shader to omit the light given off from it? Then I can add a triggered dlight to achieve the flames lighting.
I’m sure there is but my brain can’t seem to figure it out, I’ve tried several blendfunc and nothing has worked.
The entity is a func_static, I have tried keying the light diameter to “0” but that didn’t help either.

Any suggestions?


(demoneye) #2

I’ve seen problem mentioned a few other times on anther forum (MP related, and I can’t remember where).

There suggestions that came back basically involved a script mover to put the flame shaded brush into place when required, and then dlights to provide the lighting, that get turned on when the fire moves into place.

Sorry, not much detail there, but better than nothing :smile:

DeMoNeye


(demonspawn) #3

Yea I was hoping that i could solve it with the shader but I figured I’d have to use a script_mover.
Thanks for the help


(demonspawn) #4

Ok after playing all day I figured out how to fix the problem.
I was given the suggestion that maybe have the entity move into place with a script_mover. Have it hidden in the ground and then rise-up when triggered. This is a Band-Aid fix to the problem but is a solution. The issues I have with this is that it would require me do add more elements to the already very long scripted sequence. As a matter of fact I would have to break the script up to have this new element triggered properly.
Not good. Everything has been timed to activate in sequence and this would force me to spend many more long hours timing everything again.
I knew the answers lied in the shader that I was using and it did. The flame effect that I was using was one of the flames shaders in the SFX folder. If you notice there are many different flame shaders in there, I asked myself why? and looked deeper into the differences in the shaders.
Each of the shaders had these commands

surfaceparm nolightmap
surfaceparm nodlight
q3map_surfacelight (and a number)

The q3map_surfacelight command tells the engine to light the shader to a certain intensity during the light compile phase of the build. A value of “0” is no light, a value of “10000” is a really bright light and all the numbers in-between are degrees of emitted light between “off” and “super-bright”.
So I set the value at “0” which is no light and I’ll add a “dlight” to the sequence that will give me the flaming light I will need when the entity is triggered both on and off. :fing24:

Thanks for the suggestion demoneye, but I think you’ll find the solution I found much easier and more valuable to use.

My headache is now gone.
Back to Mappin


(digibob) #5

A (possibly) better solution than using a script_mover is just to use a func_static, which can be triggered to make it visible/invisible :eek:


(demonspawn) #6

djbob it is a func_static but it still was creating its light data in the light compile even though it started in an “off” state.


(digibob) #7

that is compiled light, wolf has no “real” dynamic lighting save from teh rather pants looking dlights, you’ll need to make a copy of the shader without the light emitting properties if you want to remove the compile time light.


(demonspawn) #8

Thats what I did, and your right the dlight is a bit hard to make look good. I’m trying a new stylestring as I write this to hopefully improve the look. I wonder if multiple dlight’s around the same area would give me a better look than what I’ve got so far, because what I’ve got isn’t very good.
Thanks for the advice
How’s work progressing? Well I hope :smile:


(kat) #9

<font size=“2”>eeep…! careful with using too many dlights in the same area as that’ll kill the fps esp so if the ‘light’ cast by the dlights goes anywhere near script_movers, func_explosives and other similar entites… (can you tell I’ve just found this out…!!)

There should also be a flame shader by default that doesn’t cast any light in the sfx folder (can’t recall which one it is though…)</font>


(demonspawn) #10

Thanks for the heads up Kat, I am using the xflame_nolight shader already.
I must admit that I’m getting quite a rats nest of entities in the same area, i had to remove the spotlight as its cone was getting boinked by texture collision with something else.
Hmmm… must stop adding things and finish this up. :wink:

Map on