Ads keep us online. Without them, we wouldn't exist. We don't have paywalls or sell mods - we never will. But every month we have large bills and running ads is our only way to cover them. Please consider unblocking us. Thank you from GameBanana <3

Manipulating light in GoldSRC - A Tutorial for Counter-Strike 1.6

Updates

Final V1; HF1 6y
  • - I fixed most of the formatting errors
  • - Additional grammar corrections
For the unguided ones, the HF means HotFix. It's a type of a tiny fix, or update.

Uses of light, light_spot and light_environment and more

Lighting can be tricky sometimes, but there's usually a way out. You must have heard of this before, but there are 2 types of lights: Point Lights, and Texture Lights, and by combining them so they co-operate you can get some pretty, and quite interesting results: In real life, shadows sometimes can be violet, or dark blue-ish.



That's just an example of the idea behind it. And lighting can make the level look cool, as you say it:

 

Lighting can give the atmosphere to the level, like this:



And:




If you watch closely, you can see that each stair is half dark, and the other half is more bright.

So, most of the time you'll use point lights, if it's a partially outdoor map, like de_dust.

But, if outdoor parts are only spawn points, and everything else is indoors, then you'll have to use texture lights.



Light_environment


So, light environment is normally used for outdoor lighting, and there is a parameter that beginner mappers probably rarely use: Shade

Parameter Shade defines the look of shadows, it controls the ambient lighting, let's say if we set it to 255 0 0 200 -



, we'll get this:



Now that looks more like DOOM than Counter-Strike already! Even I got surprised by the results. Well, let's set it to blue, with a tiny bit of green:


And there will be a lot of trial and error, compiling the map over and over again, so let's compile the map: Looks good to me. This technique can be used if the sky is very blue, without clouds, like skies in GTA V, or GTA: San Andreas with ENB shaders. 

Cloudy Environments


I already wrote a tutorial for that:
 
In short, just set the param. Pitch to 90, and Pitch Yaw Roll to 90 0 0. This is what happens:


Remember what I've said about the Shade parameter? Well, the whole map is in a shadow, as if the sun is below it. So yes, if you combine this: Pitch 90 with Shade something dark blue-ish (0 5 25 200), you'll get a night map:



Now that is a true night map! And for nighttime you also need to change the sky, but you already know that. Just make sure it's dark enough, otherwise it will be too bright:

Light Spots


Well, light_spot can also be used for outdoor lighting.

But it doesn't have the Shade parameter, which is a bit sad, so the Shade depends on the brightness, especially on night maps.

I will not talk much about light_spot, but you can set the Brightness to let's say 0 50 255 5 (the fourth number is the intensity, or the brightness itself) and you'll make a night map!


Texture Lights


All those indoor pictures you've seen, well, it's all made out of Texture Lights. There are 2 ways of implementing them:
  1. lights.rad file. It just tells hlrad.exe what textures emit light. You can probably open it with Notepad++, I never really did that.
  2. info_texlights entity. So, it works the same as lights.rad, but it's packed into the .bsp file. 

Let's make a brush with a light-emitting texture,

 

and now let's make the info-texlights entity (it's a point-based entity, or just modify lights.rad). And inside of its properties, disable "Smart Edit" mode, and click on Add.



In order to make the ~ symbol, hold Alt Gr, and press 1, or the button on the left to it, below Esc, if you aren't using an American keyboard like me. Or just hold Alt Gr and press everything until you find it.

So type this in.

And if you want to check what colour will pop out, just make a light entity, and paste the values, then choose Pick Color, but then don't forget to delete the light entity, it will keep RAD even more busy.

Also, I would recommend to use the Cutting tool wisely for carving these brushes into walls, and also you should put them a bit deeper into the walls and ceilings, to get interesting effects:

Yes, these green brushes are placed 4 units into the wall. Also, you can use Texture Lights for this:



Well, that's enough, but sometimes Texture Lights don't cover areas which we want them to cover, well, for that, we'll use a light entity.

 I use light entities in my map dm/fy_stoned because there are a lot of dark areas, but now they're not so dark. Place a light entity somewhere on your map where light is supposed to be.

Select it, and hold and press Alt+Enter. Go to Brightness and modify the 4th value, just set it to something less than 20.
I can't add a picture, the properties window keeps minimizing when I open the Snipping Tool. But, I typed 255 255 255 15, and here's the result:

It's a small, but an important difference. Kind of looks like the player's flashlight, but more dim.

Flickering Lights 


Well, these are one of the laggiest ones as much as I know. Place a light entity which you want (even a light_environment will work), and go to their properties, and find the parameter Appearance. A lot of the names speak for themselves. Select one, i selected Flicker A. Compile the map, and this is what you get:

(a GIF)


My framerate dropped to around 20 frames/second, because I use Intel GMA 965 mobile graphics, thank god I'm not using a Voodoo II, it's (probably) too old for the task.

This technique is used for camp fires, candles, fires, broken lights, thunders & storms, flickering car lights when the alarm gets turned on, and many more...

That's the most of it as much as I can think of, so I think we're done here.


If you can't see the pictures, then tell me, I probably did something in Imgur.

1-10 of 14
1
Pages
  • 1
  • 2
Go to page:
  • res301 avatar
    res301 Joined 2mo ago
    Offline
    110 points Ranked 91,638th
    16d
    Dude, I'm back to mapping (yeah in 2021 but why not lmao?)) and this tuto helped me a lot!
    Just average h00man :) avatar
    Mantra
    Just average h00man :)
    URL to post:
  • BlackSwordsman avatar
    BlackSwordsman username pic Joined 9y ago
    Moderator
    NetherRealm
    16,389 points Ranked 453rd
    36 medals 1 legendary 10 rare
    • Returned 5000 times Medal icon
    • 6 years a member Medal icon
    • Submitted 5 Tools Medal icon
    • Returned 1000 times Medal icon
    • 25 posts awarded Exemplary Feedback Medal icon
    • Thanked 50 submitters Medal icon
    2y
    This is very useful mate. Thank you.
    Battle Point Unlimited
    URL to post:
  • Harris avatar
    Harris Joined 12y ago
    Offline
    25,068 points Ranked 248th
    44 medals 2 legendary 9 rare
    • 15+ Entries! GameBanana’s Christmas Giveaway 2015 Medal icon
    • 10 years a member Medal icon
    • 6 years a member Medal icon
    • 25 posts awarded Exemplary Feedback Medal icon
    • GameBanana’s Christmas Giveaway 2015 Day Twenty-One Winner! Medal icon
    • Returned 1000 times Medal icon
    5y
    I tried some other tuts for texlights and they didn't work. But this one does. Thanks!
    aaabdurazak! avatar
    Mantra
    aaabdurazak!
    URL to post:
  • Ghost1420071 avatar
    Ghost1420071 Joined 7y ago
    Offλine
    2,086 points Ranked 22,183rd
    22 medals 5 rare
    • Returned 1000 times Medal icon
    • Received thanks 50 times Medal icon
    • GameBanana’s Christmas Giveaway 2017 Day Nine Winner! Medal icon
    • GameBanana’s Christmas Giveaway 2017 Day Fifteen Winner! Medal icon
    • 8-14 Entries! GameBanana’s Christmas Giveaway 2017 Medal icon
    • One month a member Medal icon
    5y
    This is like a quick way of messing around with lighting except not having to make a test map to dick around with lighting :D

    Having the sun underneath the map looks a lot better than a dark light_env.
    URL to post:
  • Admer456 avatar
    Admer456 Joined 7y ago
    GoldSRC Snowball
    Gone. :3
    816 points Ranked 46,306th
    33 medals 2 legendary 6 rare
    • Submitted 30 Tutorials Medal icon
    • Returned 5000 times Medal icon
    • Submitted 15 Tutorials Medal icon
    • Returned 1000 times Medal icon
    • Reached 50 subscribers Medal icon
    • Received thanks 50 times Medal icon
    Admer456 GoldSRC Snowball
    5y
    Posted by Xx MAHA xX

    wow.....
    The pictures arenot going to load,but very pro your Tutorials is :)

    I'm using Imgur for the pictures in the tutorial. It's not quite pro, because the GameBanana updates broke my tutorial, so I have to edit it again.

    Edit: I've edited my tutorial, it looks much more cleaner right now.
    URL to post:
  • Xx MAHA xX avatar
    Xx MAHA xX Joined 6y ago
    Offline
    208 points Ranked 70,504th
    20 medals 4 rare
    • Received thanks 50 times Medal icon
    • Thanked 50 submitters Medal icon
    • Returned 1000 times Medal icon
    • 8-14 Entries! GameBanana’s Christmas Giveaway 2017 Medal icon
    • One month a member Medal icon
    • Reached 1,000 Points Medal icon
    5y
    wow.....
    The pictures arenot going to load,but very pro your Tutorials is :)
    General QASEM SOLEIMANI
    URL to post:
  • Admer456 avatar
    Admer456 Joined 7y ago
    GoldSRC Snowball
    Gone. :3
    816 points Ranked 46,306th
    33 medals 2 legendary 6 rare
    • Submitted 30 Tutorials Medal icon
    • Returned 5000 times Medal icon
    • Submitted 15 Tutorials Medal icon
    • Returned 1000 times Medal icon
    • Reached 50 subscribers Medal icon
    • Received thanks 50 times Medal icon
    Admer456 GoldSRC Snowball
    6y
    Posted by MossZZ

    I have a simple (maybe call stupid .. ) question,
    so , I make the sky box and light_environment ,did I have a add at least 1 light  ?
     
    because I complie the map directly , all the texture being dark , only some of the mdl got color,


    Sorry for the delay, I didn't notice this comment.

    If I understood what you said, then it's possible that you're using an old compiler. Try VHLT compile tools.

    So, if you add a light_environment, but it's still black, it's most probably that you changed the 4th value to 0, in the parameter Brightness.
    URL to post:
  • MossZZ avatar
    MossZZ Joined 8y ago
    Offline
    974 points Ranked 44,439th
    9 medals 1 rare
    • 6 years a member Medal icon
    • One month a member Medal icon
    • 6 months a member Medal icon
    • 1 year a member Medal icon
    • 2 years a member Medal icon
    • Returned 100 times Medal icon
    6y
    I have a simple (maybe call stupid .. ) question,
    so , I make the sky box and light_environment ,did I have a add at least 1 light  ?
     
    because I complie the map directly , all the texture being dark , only some of the mdl got color,

    Bananite
    URL to post:
  • Mystyc Cheez avatar
    Mystyc Cheez Joined 7y ago
    Offline
    2,416 points Ranked 21,542nd
    12 medals 2 rare
    • Returned 1000 times Medal icon
    • 6 years a member Medal icon
    • One month a member Medal icon
    • 6 months a member Medal icon
    • 1 year a member Medal icon
    • Returned 100 times Medal icon
    6y
    Posted by [LP]Admer456

    Posted by Mystyc Cheez

    There is no shade parameter in my hammer? are you using a special version of hammer or something? I'm new to goldsrc.

    Oh, that's not a big problem.

    You have to use the special .fgd, not the one which comes with Half-Life and Counter-Strike. It's, hmm, I think it's cs_expert.fgd or something. Also, use the zhlt.wad which comes with Vluzacn's compiling tools/VHLT. 

    Also, you can just disable the 'Smart Edit' mode and add a parameter called '_diffuselight'.

    Thanks a lot! I really appreciate it!
    URL to post:
  • Admer456 avatar
    Admer456 Joined 7y ago
    GoldSRC Snowball
    Gone. :3
    816 points Ranked 46,306th
    33 medals 2 legendary 6 rare
    • Submitted 30 Tutorials Medal icon
    • Returned 5000 times Medal icon
    • Submitted 15 Tutorials Medal icon
    • Returned 1000 times Medal icon
    • Reached 50 subscribers Medal icon
    • Received thanks 50 times Medal icon
    Admer456 GoldSRC Snowball
    6y
    Posted by Mystyc Cheez

    There is no shade parameter in my hammer? are you using a special version of hammer or something? I'm new to goldsrc.

    Oh, that's not a big problem.

    You have to use the special .fgd, not the one which comes with Half-Life and Counter-Strike. It's, hmm, I think it's cs_expert.fgd or something. Also, use the zhlt.fgd which comes with Vluzacn's compiling tools/VHLT. 

    Also, you can just disable the 'Smart Edit' mode and add a parameter called '_diffuselight'.
    URL to post: