func_static not lit.


(=PoW= Kernel 2.6.5) #1

Hi,

I made a patch mesh textured with a .tga image with transpearancy.

It looks GREAT in-game and the lighting is fine.

== THEN ==

I make the patch mesh into a func_static so I can trigger it’s visibility.

Now I see the image but it’s not lit properly.
Seems like the only light it’s getting is from the worldspawn minimum light setting.

I placed light and lightjunior entities in front of it but the image is still dark.

Am I missing something?

The image is in the middle of a well lit room BTW.

Thanks for any help.


(kamikazee) #2

I think you need to give it a key/value pair “rs” “1”, though I haven’t tried this.


(=PoW= Kernel 2.6.5) #3

I tried both rs and _rs but it made no difference. No lighting on the texture. Very strange.


(Shallow) #4

func_statics should be treated as regular geometry and get lit normally much as a func_door etc. would do.

Does the shader apply lighting? Either as a lightmap or vertex lighting. Sometimes alphaed surfaces can look brighter than they should do when lightmapped, in which case applying vertex lighting as well might help (even though it sounds crazy!)

A screenshot would give us a much better idea of what we’re dealing with.


(=PoW= Kernel 2.6.5) #5

I’ll get screenshots on later tonight - got to get to work now.

I did change it from a patch mesh to a no draw brush with the image on one face.
Same results. Image looks perfect when it’s just a brush but becomes un-lit when made into a func_static.


(RayBan) #6

you vould also make it a script_mover instead of the func_static, which should retain its lightmaps.


(=PoW= Kernel 2.6.5) #7

All I’m trying to do is make a brush invisible until the end of the game. Then it becomes visible. (It has our server logo on it).

Will script mover do that for me?


(RayBan) #8

yes, you can setstate it invisible then default when needed


(Flippy) #9

dont forget to give your script_mover a scriptname (even though it uses the targetname for setstating) and a origin brush!


(=PoW= Kernel 2.6.5) #10

script_movers are one of those spooky things (like phong and terrain) that I have stayed away from.

Guess it’s time to start working on it.


(Flippy) #11

Script_movers are not hard at all :slight_smile: they can be used as movers, but are often used as simple brushes that can dissapear/ appear at will… such as the construction materials. Although func_statics seem to be the same (when you ditch the moving) they’re not often used… maybe because of your problem? i dont know :stuck_out_tongue:

anyway, if you need some help send me a pm and ill help


(=PoW= Kernel 2.6.5) #12

OK - I changed the func_static to a script_mover.
I selected the triggerspawn flag so it won’t be visible until triggered.
I give it a scriptname.

Problem is, how to trigger it or alert it if it doesn’t have a targetname?


(.Chris.) #13

give it a targetname?

then at end of round you can do something like:


trigger timelimit_hit
    {
	    setstate logo default
    }

have this somewhere in your game_manager spawn block with logo being the targetname you give to the script_mover.


(Flippy) #14

sorry if you thought you couldn’t give your script_mover a targetname because of my post… :stuck_out_tongue: I was merely pointing out that ALL script_movers should have a scriptname, even if it’s not used. The map won’t load if they don’t have a scriptname.

However, (im not sure about this though) if you set your script_mover to triggerspawn, a simple “setstate [targetname] default” (as post above this) might not be enough. You might need to “alertentity [targetname]” it instead of setstating (or even both).

I usually don’t touch the spawnflag settings (only solid if i need it to be solid) and simple do in it’s own “spawn” block:


[scriptname of script_mover]
{
   spawn
   {
        wait 300
        setstate [targetname of script_mover] invisible
   }
}


(=PoW= Kernel 2.6.5) #15

I’ll give it a targetname and try again.

The entity description didn’t list targetname as one of the options but I’m guessing it’s still available from what you’re saying.


(Flippy) #16

yes its still available… many things are not listed in the entities list, but a targetname shouldn’t cause any trouble (except with team_CTF_red/blueflags)


(=PoW= Kernel 2.6.5) #17

OK - it’s working. Thanks for the help all.

For the record:
I gave it a target name and alerted the entity when I wanted it visible.

The lighting is perfect now. Looks like what ever problem I was having was with the func_static.
I won’t be using that one again.


(=PoW= Kernel 2.6.5) #18

UPDATE:

DOH!!! It happened again.

I moved the brush (script_mover) to a slightly different location and once again it is not lit.
I placed a bright light entity in front of it and no difference.

Tonight I’ll try deleting and re-adding it to see if that helps.

No one else ever have these problems?


(Flippy) #19

nope… never, not even with func_statics

it might be some problem in your lighgrid settings or something… but i dont know much about lighting yet… so sorry cant help you :frowning:


(=PoW= Kernel 2.6.5) #20

ARGHHHHH - I’m gonna start shaving my skin off with a potato peeler !!!

So I convert the entity back to a regular brush, recompile and all is well. Lighting looks great.
I make it back into a function_static and it becomes unlit after compile.
I make it back into a regular brush, recompile and it looks great
I make it into a script_mover, recompile and it’s dark again.

Man this is frustrating. Is there something about how entities are lit I’m not aware of?