Re: Light intensity & player proximity
Posted by hl_world on
Sun Aug 19th 2007 at 10:52pm
Posted
2007-08-19 10:52pm
144 posts
144 snarkmarks
Registered:
Jan 30th 2007
How would I make a light that glows brighter as the player approaches it in Spirit?
Please help
Re: Light intensity & player proximity
Posted by Cash Car Star on
Mon Aug 20th 2007 at 5:02am
1260 posts
345 snarkmarks
Registered:
Apr 7th 2002
Occupation: post-student
Location: Connecticut (sigh)
To reiterate in a more technical sense: HLRAD in the compiling process
generates ALL of the lighting information from your uncompiled map and
computes "lightmaps", which determine how a textured surface will
appear in game. For a toggled point-based entity light, RAD calculates
both the ON and OFF brightness of the light. This is a binary, ON
or OFF. The engine, as far as I know, cannot allow a dynamic,
shifting value. Theoretically, through a ridiculously heavy
entity set-up to locate and manage where the player is, you could have
several of these lights with increasing and decreasing 'steps' of
brightness, but the end result would be very messy and ultimately
unsatisfying, not to mention ten tons of headache.
Re: Light intensity & player proximity
Posted by fishy on
Mon Aug 20th 2007 at 10:11am
Posted
2007-08-20 10:11am
fishy
member
2623 posts
1476 snarkmarks
Registered:
Sep 7th 2003
Location: glasgow
and then there was the old "too many light styles on face" error that pops up when there's more than a couple of named light entities anywhere near the same brushwork.
is it the env_glow that sort of gives the effect that hl_world is asking about? the glow is big and faint from a distance, but the closer you get to it, the smaller and brighter it appears. doesn't cast any real light though.
i eat paint
Re: Light intensity & player proximity
Posted by Cash Car Star on
Mon Aug 20th 2007 at 8:43pm
1260 posts
345 snarkmarks
Registered:
Apr 7th 2002
Occupation: post-student
Location: Connecticut (sigh)
Probably. To use an env_glow property, you have to choose a good
round sprite, and set the rendermode to "additive". This will
make the black disappear. Give it a color with your rendervalue,
white if you just want white. It will not gnerate light, but it
looks nice when paired with a condensed light source (small but bright
texture light, point-entity light, light_spot). I believe I used
this on my HLDM map Vernon for the spotlights. Spirit is actually
not required for this entity.
That is, if env_glow is what you're looking for.
Re: Light intensity & player proximity
Posted by hl_world on
Wed Aug 22nd 2007 at 9:34pm
144 posts
144 snarkmarks
Registered:
Jan 30th 2007
OK, what about if the player enters a trigger_multiple to switch the light on. How would I make it so that the light gradually reaches full brightness over, like, 2 seconds, and said light is actually a texture light? (I dont know how to set up texlights in Spirit)
Re: Light intensity & player proximity
Posted by Cash Car Star on
Thu Aug 23rd 2007 at 8:15am
1260 posts
345 snarkmarks
Registered:
Apr 7th 2002
Occupation: post-student
Location: Connecticut (sigh)
I don't think the much heralded breakthrough of switchable texture lights ever happened. In a map, lights do NOT exist. What exists are faces of surfaces, with information on how much to darken/lighten the texture. These are calculated during the compile process. They are not recalculated. Sorry, but if you want to map for an engine nearly a decade old, this is the kind of 'It can't do it' thing that you're going to have to deal with.
Oh, and it is my opinion that a good multiplayer map for HL does not use switchable, flickering, or otherwise dynamic lighting at all. It chews up resources that could better be applied elsewhere, doesn't look good, and hardcore gamers will adjust their gamma anyway.
Re: Light intensity & player proximity
Posted by hl_world on
Fri Aug 24th 2007 at 8:56pm
144 posts
144 snarkmarks
Registered:
Jan 30th 2007
Holy s**t. Calm the f*** down CCS, I just figured it could do this, what with being able to set an appearance, you know like a slow pulse which I had in mind would be similar to what I was originally asking about, so the brightness of a light is dynamic. I don't ask for what is obviously impossible.
Anyway, back to the trigger_multiple idea. I was thinking of having a volume, which if the player entered would gradually switch the texlight on with a custom appearance setting like abcdefgh and the opposite effect when the player leaves the volume but I don't know how I would do this.
Thanks for all the help and suggestions so far. Please keep them coming.
Re: Light intensity & player proximity
Posted by Cash Car Star on
Sat Aug 25th 2007 at 2:01am
1260 posts
345 snarkmarks
Registered:
Apr 7th 2002
Occupation: post-student
Location: Connecticut (sigh)
I just said you can't switch texlights on. I'm not trying to jump down your throat, but I feel like you're not listening to what I'm saying about an engine I spent three years wrangling with.
Edit: and if I seem irritated with you, perhaps it's because you marked information that is completely correct with a giant red "This Is Wrong" tag.
Re: Light intensity & player proximity
Posted by Cash Car Star on
Sat Aug 25th 2007 at 7:06am
1260 posts
345 snarkmarks
Registered:
Apr 7th 2002
Occupation: post-student
Location: Connecticut (sigh)
You marked wrong fully accurate information on using an env_glow. The proper thing to do if something is right, but not what you're looking for, is to not do anything. As soon as a real answer is chosen, it will revert to a normal post.
Edit:I'm reading through the tutorial.... still not sure what to make of it. It seems to infer at the end that Zoner's takes the texlight, turns it into a point-based light entity, and then has that turn off and on. Editing the FGD without doing additional coding also rarely results in any change in behavior. Adding a damage field to a trigger_multiple is not going to make the trigger_multiple hurt people. I would have to play around to see what's really going on here, but I no longer have HL or QuArK installed.
Further edit: The comment the tutorial writer makes about having to distribute a lights.rad file with a map if you don't use an info_texlights makes me question his knowledge. Cause that's definitely inaccurate.
Re: Light intensity & player proximity
Posted by hl_world on
Sat Aug 25th 2007 at 8:42pm
144 posts
144 snarkmarks
Registered:
Jan 30th 2007
Well, I thought that was the point of those options to either accept, reject or reset a suggestion. Although you obviously know about env_sprites and env_glows, it was still irrelevant to what I was asking for - I was enquiring about actual light sources, not additive sprites which don't actually illuminate the map. I rejected the answer because that's the point of this topic, so I can get help that answers basically what I originally asked.
By following the tutorial correctly, editing the Opposing Force FGD, getting the lights.rad out of the way for the info_texlights entity and setting it all up in Hammer, I was able to achieve switchable texlights like I mentioned earlier so the tutorial was a nice find. Thus, the tutorial writer knows what he is talking about. So unless you actually follow the steps to the tutorial yourself, you can't question it.
I'm done arguing. I just want some help.
Re: Light intensity & player proximity
Posted by fishy on
Sat Aug 25th 2007 at 11:08pm
Posted
2007-08-25 11:08pm
fishy
member
2623 posts
1476 snarkmarks
Registered:
Sep 7th 2003
Location: glasgow
Arguing? Did I miss something?
The only reason that I mentioned the env_glow in the first place, was that it appears in-game with the similar characteristics to those that you described. From a distance it appears thin and faint, but as you get closer it becomes brighter and more focused. That's enough of a similarity that someone could ask about it in much the same way that you asked your original question.
Anyway, a quick look at the tut seems to indicate that setting a lights appearance to custom, and using a string of letters from a-z, would bring the light to full brightness in 2-3 seconds. Another light with an opposite string, z-a, would give a 'fade to black' over the same time period. With a 3rd light set at normal, you should be able to have a trigger brush that targets a multi_manager that turns the a-z light on for the 2-3 seconds that it takes to reach full brightness, then replaces it with the fullbight light. Another trigger (targeting another m_m) could toggle the fullbright light back off, replacing it with the z-a light for the few seconds of fade, before toggling it back off.
i eat paint
Re: Light intensity & player proximity
Posted by hl_world on
Sat Aug 25th 2007 at 11:51pm
Posted
2007-08-25 11:51pm
144 posts
144 snarkmarks
Registered:
Jan 30th 2007
I wasn't arguing with you, fishy. Good idea about the separate lights. Thanks, I'll try that.