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

Map Lighting - A Tutorial for Counter-Strike: Source.

Well, this tutorial is really here to describe the various entities that can light your map and how they can be combined to create realistic looking environments. This tutorial is a little heavy on text and only a competent mapper will fully benefit from it. First of all lest have a look at each type of light source in turn (Screenshot A). Light This is the most basic ways of lighting up a room. Basically, the closer a brush or prop is to this light, the brighter the object will become. It emits light equally in all directions, becoming dimmer over distance in accordance to a quadratic formula which relys upon the "constant" "linar" and "quadratic" numbers, as well as the "brightness" (forth number in colour). The formula is very complex, but is available to those who want to learn more. Light\_Spot This is similar to the light entity in that it lights up things according to the variables and the distance the object to brush is. Except this has a cone that is visible and the angles of it can be changed to either make a very small or large area it covers. Light is only emitted inside this cone and is one of the most important entities in making a realistic light source. Light\_Dynamic If you want lighting that gets calculated on the fly and is the only option if you want a light source to move. Generally these are very expensive on the computer, taking up a lot of resources compared with a regular light. However, they are easily the most realistic light entities available. They have properties that are similar to the light_spot and regular light entities, if fact its practically a combination of both, it acts as a regular light, but also a spot light as well. It is the only one to have a "parent" option, allowing it to move. Light_Environment Any map that is based outside, or has a section of map outside and that utilizes a skybox will use one of these. Instead of emitting light from itself, it emits light from all brushes with the "skybox" texture on it. The "ambient" box will light up anything that is visible from the skybox, using the variables, preventing perfectly black shadows occurring. The "brightness" option controls the directed light, it will make shadows and is emitted in accordance to the "pitch" and "yaw" settings. This is a very good way of quickly lighting an outdoor map as only one "light\_environment" is needed (unless a 3D skybox is used). Env\_particlelight This is rarely used as most do not even know it exists, but it also has a very specific purpose. It will only light particles that are emitted from a single "env\_smokestack" to create very this specific effect. It has the same settings as a regular light and some others that are worth experimenting with. VRAD Just a quick note on the VRAD, this program is ran during a maps compiling, it simulates all of the lights (except "light\_dynamic") and calculates their effect on the lightmap grid, this data is then saved into the BSP, meaning the lights never have to be calculated again. Except the "light\_dynamic" which is calculated during gameplay as its position can change (thus the name dynamic). This does cause a drop in FPS, but as computers are becoming more powerful, what was a state of the art game yesterday, may not need a supercomputer to run today. Using these entities So, now we know what each entity does and a little on how they work, but without knowing where to place them in a map to generate a desired effect makes this knowledge practically useless. To make a realistic light source, there are several parts that make it up. First there is the model where the light is emitted from, a "prop\_static" is required. Use one that will suit the style of your map, and place it where you want the light to be emitted from. Next, place a "light\_spot" and angle it so it lights up the room or area that you want to be lit up. Don't worry if the whole room isn't covered, you can always repeat this procedure. Change the settings, remember to keep the brightness around 200, any lower and the room will be too dark for the shaders to work correctly (leading to that horrible over "highlighting" you get of props in poorly lit rooms, however in HL2 the shaders are more complex and using a lower value is acceptable). Then place a "light" around 50-75 units away from the prop, change the brightness to around 100 and make it the same color as the "light\_spot" You should end up with a result similar to Screenshot B and in-game it should look like Screenshot C This is a simple, yet very effective way of making a realistic looking light source, since a "light" entity makes a very artificial looking light and a "light\_spot" will not light the prop itself, it is a good combination. However, isn't this similar to a "light\_dynamic?" Yes, it is, we basically removed the dynamic part so that it would be calculated during the VRAD instead of being calculated in-game leading to un-needed processing. You can also add a little extra to the light source, such as a env\_sprite, this is what valve does, place the env\_sprite inside the model where the light is being emitted from. This only looks right on some models, doing to a florescent light tube doesn't work; whilst doing it to an old-fashioned streetlamp like those in cs\_italy does. On the other hand, a "point\_spotlight" could be used, if you have a standard light, you place this where the "light\_spot" is and point it in the same direction, to create a visible light beam that doesn't actually light anything up. HDR HDR (High Dynamic Range) is different from regular lighting in many ways. First the most noticeable result is the effect of bright areas being brighter and dark areas being darker, with these dynamically changing depending on how bright the area you are currently in is. This is a rather complex explanation, but HDR is designed to extend the range of brightness you monitor can display, without loosing detail. However only moderate graphic cards are capable of running this, around a 6600 for nVidia or equivalent ATi card. If you do not have a graphic card capable of running HDR, than making a map with HDR is not a good idea, as you will not be able to see the result. LDR (Low Dynamic Range) is probably what you have been using most of the time, usually this is all that is needed for simple maps but for when creating high-quality maps, HDR is a must. HDR is a lot simpler to make than some may think, all it mainly involves is a click on the tick box labelled "HDR" in the VRAD section of compiling. This will make the VRAD run twice, once for LDR and once for HDR. This is implementation of HDR at its simplest and is a subject worth exploring more if you are truly dedicated to mapping. When making a map that uses HDR, you must and I cannot stress enough that you MUST use env\_cubemaps in your map. If you do not, then a green highlights will appear on your weapons and some props. This is because they rely upon the env\_cubemaps to provide information upon the surrounding world, HDR exacerbates this effect. Making it a lot more important to "buildcubemaps" in the console, both with HDR and without. Conclusion Lighting is very simple to do in the Source engine, making REALISTIC lighting is very difficult, it requires a good understanding and a great deal of patience to get right, but having fantastic lighting without lagging the game is very satisfying to see. It may take longer to compile, but trust me, the end effect will be worth it.
1-10 of 35
1
Pages
Go to page:
  • The Fool avatar
    The Fool Joined 15y ago
    Offline
    536 points Ranked 57,368th
    11 medals 1 legendary 1 rare
    • 10 years a member Medal icon
    • 6 years a member Medal icon
    • Reached 1,000 Points Medal icon
    • 1 post awarded Exemplary Feedback Medal icon
    • 5 posts awarded Exemplary Feedback Medal icon
    • 10 posts awarded Exemplary Feedback Medal icon
    12y
    Pros: Provides an in-depth technical explanation for and how to use lighting in Hammer Editor. Screenshots are relevant, useful, and demonstrative of the different types of lights. Very well written, very detailed, very useful. Cons: -Minimal grammatical and spelling errors (most likely typos, I trust your writing abilities). - Not necessarily 'useful' beyond the information. The tutorial describes only one method of creating a realistic light. - No help regarding the settings of each light beyond the 'brightness' category. You don't mention or refer to any of the more important keyvalues or flags. Leaving this out seems counter intuitive of you, since your tutorial was designed specifically how to make use of the realistic qualities of lights. - This is just me, nitpicking, but your in-tutorial pictures are ugly and could use a little editing through photoshop. But that's just me. - The lack of HTML in this tutorial makes it ugly and unappealing to the masses of people that would read it. Your tutorial lacks any color or pizazz. Regardless of the fact that you organized it with larger-sized white text, it's ugly... and frankly could use some tables or links for the more experienced mapper. Improvements: First of all, you need to fix your grammatical and spelling errors. The very first word in your entire tutorial is an adverb. Even though this is incorrect, it's perfectly fine to accept it as slang. But even at that, it's unacceptable for such an formal and serious discussion. Correct your spelling errors (First of all lest have a look at), change the wording of some paragraphs, and link your (Screenshot A,B,C) comments to your screenshots themselves. This makes it easier to read and more professional. Secondly, cut up your tutorial into bite sized chunks by using color coding and other HTML elements. Your paragraphs aren't enough to satisfy every picky FPSB user. The younger more immature audience would most likely read your tutorial more intimately if it were colorful and warm-feeling. Lastly, your tutorial is (as I've mentioned earlier) useless in a sense. You absolutely must add information concerning keyvalues and flags to your tutorial, and if you're feeling up to it, link to other pages that may be useful. Just as an example, you may need to link to the valve developer communities pages on lights for the more dedicated mappers. Notes: This is an absolutely exceptional tutorial that could use a few tweaks. I myself learned a lot from it and hope to see some edits in the near future. Thanks for listening.
    Mapper, Graphic Artist avatar
    Mantra
    Mapper, Graphic Artist
    URL to post:
  • NOOBSPAPER (we deliver) avatar
    Offline
    100 points Ranked 118,911th
    14y
    I'm new to hammer and I wanted to know whether you would need a separate light_environment entity for a separate sky box...or does one control all skyboxes? Great tut by the way
    (nods in agreement)
    URL to post:
  • sslevski avatar
    sslevski Joined 15y ago
    Offline
    209 points Ranked 83,325th
    14y
    Good tut thanks
    ULTRAS LEVSKI
    URL to post:
  • Frijs avatar
    Frijs Joined 17y ago
    Offline
    3,608 points Ranked 3,717th
    10 medals 1 legendary 1 rare
    • 10 years a member Medal icon
    • 6 years a member Medal icon
    • Reached 1,000 Points Medal icon
    • Reached 2,500 Points Medal icon
    • One month a member Medal icon
    • 6 months a member Medal icon
    14y
    Great stuff :D
    BAER LROT avatar
    Mantra
    BAER LROT
    URL to post:
  • VortiiX avatar
    VortiiX Joined 15y ago
    Offline
    5,589 points Ranked 2,028th
    14y
    Ty, I always had problems with lighting. You gave me a better understanding of it.
    New name is VortiiX avatar
    Mantra
    New name is VortiiX
    URL to post:
  • BuLLzenhOw avatar
    BuLLzenhOw Joined 15y ago
    Offline
    165 points Ranked 92,148th
    14y
    Pros: Oh good!! now i know what the difference of the lights xD Cons: i read everything...i dont like to read LOL' Notes: Ty :]
    BuLLeT The Blue Sky avatar
    Mantra
    BuLLeT The Blue Sky
    URL to post:
  • Burnfingers avatar
    Burnfingers username pic Joined 15y ago
    Offline
    131,657 points Ranked 21st
    29 medals 1 legendary 6 rare
    • 10 years a member Medal icon
    • Reached 75,000 Points Medal icon
    • 6 years a member Medal icon
    • Submitted 20 Gamefiles Medal icon
    • Submitted 15 Mods Medal icon
    • Submitted 20 Mods Medal icon
    14y
    Posted by PissedOffHacker Ok, very simple. You did not make a floor, just a light. Figure THAT out for yourself.
    wow. u quoted a 9 month old post. aren't you cool... and no, that wasn't the problem.
    aka [-B-] avatar
    Mantra
    aka [-B-]
    URL to post:
  • PissedOffHacker avatar
    PissedOffHacker Joined 14y ago
    Offline
    100 points Ranked 118,911th
    14y
    Posted by [-B-] Huh. i have done everything you said for a spot light, but my map loads and theres nothing but a dark map. why?
    Ok, very simple. You did not make a floor, just a light. Figure THAT out for yourself.
    Bananite
    URL to post:
  • Rokusho avatar
    Rokusho Joined 17y ago
    Offline
    14y
    Posted by banda Can i creat maps with this programm ?
    Yes, that is what it is designed to do. There are plenty of tuts around. Also, you don't need to review the tutorial ot post a message.
    Will map for food. avatar
    Mantra
    Will map for food.
    URL to post:
  • banda avatar
    banda Joined 14y ago
    Offline
    14y
    Can i creat maps with this programm ?
    Bananite
    URL to post: