Lighting demonstration
Plaguebearer
Join Date: 2002-03-21 Member: 338Members, NS1 Playtester, Contributor
<div class="IPBDescription">Light_spot and additives in action</div>First, there's the basic hall, with some textures with lights built into them along the bottom. I've given that texture a 100 125 255 100 radiosity level, so it emits a pretty blue light.
<img src="http://pwp.clearsource.net/sloyd/_lights/image2.gif" border="0">
Problem being, the whole texture fullbrights when you have it radiate light. Oh, bummer.
Looks pretty bland, too, doesn't it?
<img src="http://pwp.clearsource.net/sloyd/_lights/halflife01.gif" border="0">
Same hallway, but with LIGHT_SPOT entities added. In front of every light, I've added a LIGHT_SPOT with inner cone 20, outer cone 33, pitch -20, and the same light colour and intensity of the light texture.
Angling the light slightly down helps limit the spread of the light, as I'm mostly shooting for the effect of the light spread across the floor, not to actually add more illumination to the hallway.
In retrospect, I probably should have made two spotlights in front of each of the light textures, because the little light bar on there is so wide. Anyway...
<img src="http://pwp.clearsource.net/sloyd/_lights/halflife02.gif" border="0">
Same hall, only I've switched off the radiosity of the texture on the wall completely, and added a FUNC_ILLUSIONARY right in front of it, 1 unit thick, and on the front of the illusionary I placed a texture which is, basically, the exact same texture as the one with the light bar in it, only it's all black save for the actual light itself, and a little bit of glowiness.
<img src="http://pwp.clearsource.net/sloyd/_lights/image3.gif" border="0">
This FUNC_ILLUSIONARY I then gave the attributes of ADDITIVE render type, and 255 for the effect amount. Probably should have used less, but for the purposes of a demonstration, it works.
After that, I put this <i>new</i> texture in the .rad file, and gave <i>it</i> the 100 125 255 100 radiosity setting.
So, instead of the wall texture emitting the light, we have the illusionary in front of it doing so; the rendering properties (additive) of the illusionary brush are what actually brightens the light bar and the halo around it on the wall.
<img src="http://pwp.clearsource.net/sloyd/_lights/halflife03.gif" border="0">
Same hall, again, only with white lights in the ceiling, with the same additive-illusionary-brush effect in front of them, and spotlights as well (still 20/33 cones, -90 pitch, but only 50 or so brightness). The contrast of the white light against the blue helps make the lit areas along the hall feel brighter without actually brightening them much.
<img src="http://pwp.clearsource.net/sloyd/_lights/halflife04.gif" border="0">
And finally, switching some of the lights off. Because the light is being generated by the illusionary additive brushes and the light_spot ents, randomly deleting a brush and it's corrosponding light_spot gives the effect that the light isn't switched on (is broken, whatever), varying the pools of light down the hall.
<img src="http://pwp.clearsource.net/sloyd/_lights/halflife05.gif" border="0">
This is what I mean every time someone asks what their hall needs, and I say 'light_spot'. With the alternating bands of bright light and much darker shadow, the light/dark/light/dark effect you can get looking at someone (something? <!--emo&:bob:--><img src="http://www.natural-selection.org/iB_html/non-cgi/emoticons/bob.gif" border="0" valign="absmiddle" alt=':bob:'><!--endemo--> ) barrelling down that hall can be pretty nice.
<img src="http://pwp.clearsource.net/sloyd/_lights/image2.gif" border="0">
Problem being, the whole texture fullbrights when you have it radiate light. Oh, bummer.
Looks pretty bland, too, doesn't it?
<img src="http://pwp.clearsource.net/sloyd/_lights/halflife01.gif" border="0">
Same hallway, but with LIGHT_SPOT entities added. In front of every light, I've added a LIGHT_SPOT with inner cone 20, outer cone 33, pitch -20, and the same light colour and intensity of the light texture.
Angling the light slightly down helps limit the spread of the light, as I'm mostly shooting for the effect of the light spread across the floor, not to actually add more illumination to the hallway.
In retrospect, I probably should have made two spotlights in front of each of the light textures, because the little light bar on there is so wide. Anyway...
<img src="http://pwp.clearsource.net/sloyd/_lights/halflife02.gif" border="0">
Same hall, only I've switched off the radiosity of the texture on the wall completely, and added a FUNC_ILLUSIONARY right in front of it, 1 unit thick, and on the front of the illusionary I placed a texture which is, basically, the exact same texture as the one with the light bar in it, only it's all black save for the actual light itself, and a little bit of glowiness.
<img src="http://pwp.clearsource.net/sloyd/_lights/image3.gif" border="0">
This FUNC_ILLUSIONARY I then gave the attributes of ADDITIVE render type, and 255 for the effect amount. Probably should have used less, but for the purposes of a demonstration, it works.
After that, I put this <i>new</i> texture in the .rad file, and gave <i>it</i> the 100 125 255 100 radiosity setting.
So, instead of the wall texture emitting the light, we have the illusionary in front of it doing so; the rendering properties (additive) of the illusionary brush are what actually brightens the light bar and the halo around it on the wall.
<img src="http://pwp.clearsource.net/sloyd/_lights/halflife03.gif" border="0">
Same hall, again, only with white lights in the ceiling, with the same additive-illusionary-brush effect in front of them, and spotlights as well (still 20/33 cones, -90 pitch, but only 50 or so brightness). The contrast of the white light against the blue helps make the lit areas along the hall feel brighter without actually brightening them much.
<img src="http://pwp.clearsource.net/sloyd/_lights/halflife04.gif" border="0">
And finally, switching some of the lights off. Because the light is being generated by the illusionary additive brushes and the light_spot ents, randomly deleting a brush and it's corrosponding light_spot gives the effect that the light isn't switched on (is broken, whatever), varying the pools of light down the hall.
<img src="http://pwp.clearsource.net/sloyd/_lights/halflife05.gif" border="0">
This is what I mean every time someone asks what their hall needs, and I say 'light_spot'. With the alternating bands of bright light and much darker shadow, the light/dark/light/dark effect you can get looking at someone (something? <!--emo&:bob:--><img src="http://www.natural-selection.org/iB_html/non-cgi/emoticons/bob.gif" border="0" valign="absmiddle" alt=':bob:'><!--endemo--> ) barrelling down that hall can be pretty nice.
Comments
Redford
Common NS newbie mistakes #37
<!--emo&:pudgy:--><img src="http://www.natural-selection.org/iB_html/non-cgi/emoticons/pudgy.gif" border="0" valign="absmiddle" alt=':pudgy:'><!--endemo--> <!--emo&:siege:--><img src="http://www.natural-selection.org/iB_html/non-cgi/emoticons/siege.gif" border="0" valign="absmiddle" alt=':siege:'><!--endemo--> "I shall moon the sentry while it is not looking! LOLOLOLOLOLOL!!!!11"
<img src="http://www.hangar16.com/Images/potd/WC2-006.jpg" border="0">
You're absolutely right. But you know what? We aren't building spaceships here! We are building LEVELS that are supposed to be very dramatic and atmoshperic. If someone were to sacrifice atmosphere and drama for the sake of keeping things utterly realistic and true-to-life in an NS level, he ought to be shot. Especially concerning the " engineers wouldn't design something that looks cool, like a sci-fi movie" comment. NS is all about a movie like atmoshpere. You know what, not only should a level designer that kills atmoshpere for the sake of 100% realism be shot... the player that would actually WANT a boring, drab, plain, (and usually full bright) ultra true-to-life atmoshpere to play a game in... should have even harsher treatment.
Great demonstration PB. <!--emo&:)--><img src="http://www.natural-selection.org/iB_html/non-cgi/emoticons/smile.gif" border="0" valign="absmiddle" alt=':)'><!--endemo-->
<!--EDIT|ken20banks|July 03 2002,21:30-->
It should be wider instead of starting froma point...if you know what i mean.
Bah! i suck at explaining things <!--emo&:(--><img src="http://www.natural-selection.org/iB_html/non-cgi/emoticons/sad.gif" border="0" valign="absmiddle" alt=':('><!--endemo-->
That, combined with precise angle work, could combine for perfection, but was beyond the scope of this demonstration, which was something I knocked out in a couple minutes while hanging out in IRC.