Tutorial - Ingame Light Editor

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    Logging in with you Steam ID has now been restored ♥

    • Tutorial - Ingame Light Editor

      ello Guys, Since a lot of people were asking how to implement new lights I have uploaded some of our internal tutorial/test maps on Dropbox.
      I would recommend checking out tut_nextgen_lights_optimised.vmf since it contains a lot of examples in a single map. Then you can check one of those specialized example/test maps too.
      Please note that these maps are not the most optimized version of maps and they were just created to test/demo specific bugs/features.

      To help us configure new lights in a faster way we have implemented Ingame Light Editor. Here's a quick tutorial/documentation from our internal forums -

      In game Light Editor - a Convar based system for easily selecting new Light entities and edit their properties via convar. (Whenever alex get free from UI he will look into UI for editor and even saving to vmf if its easy)

      Here's the overall workflow -

      1) le_editor_selection_mode_enabled - Enable Light Editor selection mode. It will show you xyz axis and a box around light entity in your cross hair.

      2) le_editor_selection_lock - Lock your selection.

      3) Opon locking its properties will be mapped to convars starting with le_light_ and le_gr_ . You can use these convars to modify different light properties and copy paste them to hammer later on.


      4) le_editor_selection_clear - Once you are done with a selected light and if you want to clear selection you can use this convar. Once selection is reset all the helper meshes (box/sphere) will also disappear.

      List of Convars

      (Each of these le_light_* convar should have helpful descriptions but still in case someone needs more info feel free to ask questions.)

      Editor Convars

      le_editor_selection_mode_enabled - Toggles New Light selection mode. When it is on, the bounding box, pivot and debugging text is displayed for whatever LIGHT the player is looking at.
      le_editor_selection_lock - Locks the selected light and exits selection mode
      le_editor_print_selected_light_details - print the details of selected light
      le_editor_selection_clear - Clears Light Selection

      Editor config Convars

      le_config_selected_sphere_size - Size of sphere shown around selected Light
      le_config_selection_box_size - Size of box that appears during selection mode

      Light Properties Convars



      Chetan wrote:

      NOTE - You cannot change Light Type (static/stationary/dynamic) at runtime. You cannot shadow shadowmap LOD at runtime. You cannot change cookie texture at runtime. Also You cannot change Light GodraysMode at runtime. I may add support for this in near future after an optimization pass on engine.

      I might add a convar to add lights at runtime too once above things are done but at the moment you can achieve that via ent_create.

      Chetan wrote:

      NOTE - Another important thing for people who don't know this - sometimes in source engine convars are not processed unless we resume the game so some of the above convars wont take effect unless you go back into game from console. But again if you gents bind selection convars to shortcut keys there's no need to open console anyways.
    • Is it intentional that the newLight_spot entity doesn't have any Godray options, or did that just get left out of the FGD? Also, how big of a hit on performance do the shadow maps take? I've been considering modifying my copy of the FGD to make that "on" by default.

      The Javid wrote:

      I can't wait til we ditch that pattern too. It only blends in with gravel and shitty couches.
    • Spot lights do not support godrays. There's some fancy schmancy programming reason for this, but basically it destroys performance.

      The shadow maps do impact performance, and there is a pretty hard limit on the number allowed in the map (I think it's like...60, but each point light will take up 6). Do not have them on unless they add significantly to the scene.
      Chon Kemp - Level Designer and Community Manager
      Creator of the Black Mesa "Uncut" Mods - Surface Tension Uncut and
      On a Rail Uncut
      My dev blog on the development of dm_gasworks
    • JeffMOD wrote:

      Is it intentional that the newLight_spot entity doesn't have any Godray options, or did that just get left out of the FGD? Also, how big of a hit on performance do the shadow maps take? I've been considering modifying my copy of the FGD to make that "on" by default.
      I can't speak to your other questions, but there is a godray toggle on the lights, even if it's not present in the FGD. I know this because I was using EntSpy to copy them from c2a2a into one of my previously-compiled maps. Although I can't say whether or not the keyvalue functions, it's definitely there.

      There are two keyvalues in particular that seem to control godrays. The first is EnableGodRays, which is a boolean set to either 0 or 1. This one's pretty self-explanatory. The second keyvalue is LightnGodRayMode which is also a boolean. I believe this keyvalue controls whether the light just emits godrays or if it actually emits light as well. So it's probably best to keep that set to zero.

      EDIT: Ninja'd.
    • Godrays aren't supported for spot lights. This may change in future.

      There's a limit of 48 shadowmaps per map per LOD. (total 144 shadowmaps per map)

      There's a perf cost for these shadowmaps Dynamic > Stationary > static.

      Keeping shadows on by default in FGD might not be a good idea depending on map and surroundings of lights etc.
    • Entered this in the wrong area, wont let me delete.

      Just wanted to pass this along, the phone number listed on BMRF.US has been reassigned to a different company. I called this morning and a lady answered, she was baffled when I asked if this was BMRF. Then she asked what number, she said she just got this number for a funding company.

      The post was edited 1 time, last by drgibbles ().

    • Admiral Sakai wrote:

      How exactly is the 'static' light option supposed to function? It seems to just prevent the light in question from illuminating anything in the map.
      Sorry for late reply.

      So Static Light should illuminate anything object brush/prop static or dynamic but this light can't move or change position or even change its angles.
      If you turn on shadows for these lights then the shadows will be casted only for static geometry like brushes and/or static props. In other words only brushes and static props will block the light.

      If you are facing a specific issue in a map or situation, you can post screenshot of both light settings in hammer and how it looks in game on insane or very high (Its a good habit to use insane or devonly batch files for gfx settings during development , if your PC can handle it). In case required I wont mind checking out vmf either if I can compile it in <= 5 mins.

      I would love to answer any questions regarding any new engine upgrade (or get answers from other members as required) and help you guys out in any way possible. I know these features are new to source so they might take sometime for getting used to.
      Sorry for later reply. I don't really check the forums that often and I dont think email notifications are working on this website ( I will message our web team to confirm this & sort it out ).
      In case you guys are waiting for important info and I dont reply in 1-2 days feel free to post it on steam forums or reaching out on steam chat.