Garry's Mod

Garry's Mod

2,528 ratings
Gmod Light / Environment Editor
7
2
2
6
6
3
2
2
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Tool
Addon Tags: Build, Scenic
File Size
Posted
Updated
339.055 KB
15 Mar, 2022 @ 8:38am
9 Jul @ 5:02am
16 Change Notes ( view )

Subscribe to download
Gmod Light / Environment Editor

In 1 collection by JonahSoldier
Octantis Addons
5 items
Description
- About This Addon -

To put it simply, this addon is meant to allow you to mess with the lighting of maps mid-game, while also reducing the negative side effects of doing so as much as possible.

If you need one, the first video on the workshop page is a quick tutorial on how to use this. (Though it is currently outdated, and a lot of things have been improved or added since then.)


- Extra Details -

This addon has the most functionality on maps with named light_environments, as this separates ambient light and sunlight (allowing you to adjust both separately). The rest of the addon works more-or-less the same with/without one, though you may need a different combination of work-arounds as the lighting behaves slightly differently in both contexts.

Since neither source nor gmod were designed to accommodate what this addon does, there's a lot of weird jank and a few unfixable issues. Nothing this addon does will persist beyond a restart. You may encounter entities that don't update their lighting with the ambient light slider. There's usually nothing that can be done about this, and there are a number of buttons to outright remove these for that reason. Wherever there are seemingly arbitrary limitations (e.g. the 1-26 range for light level) these are usually for technical reasons and can't be changed.

This addon may very rarely cause lamps/lights to not work properly at all, in which-case you can disable the lamp/light fixer to make them work normally again.

The "Skybox Texture" box directly changes sv_skyname, you can find the skybox names for most games by just searching for them on your preferred search engine; But to save you the trouble: Here's the list of skyboxes for half-life 2

- Console commands -

  • Environment_ambientLightLevel (1-26)
    - Controls light in shadows and from artificial sources, 12 is default, 1 is pitch black.

  • Environment_SunLightLevel (1-26)
    - Controls direct light from the sun, 12 is default, 1 is pitch black

  • Environment_ChangeLightStyle (0-1)
    - Whether or not the fix for lamps/lights is activated

  • Environment_ForceDisabledSkybox (0-1)
    - Sets r_3dky to 0 for all players

  • Environment_ForceDisabledCubemaps (0-1)
    - Sets mat_specular to 0 for all players

  • Environment_ForceRadiosityZero (0-1)
    - Sets r_radiosity to 0 for all players (which helps in outdoor areas and with static/dynamic props still being lit)

  • Environment_DarkenWater (0-1)
    - Darkens the colour of water fog based on the current value of Environment_ambientLightLevel to fix water sources appearing glow-y.

  • Environment_DarkenRopes (0-1)
    - Sets the colour of any ropes that were part of the map to black

(The commands in this table remove all of a certain entity type from the map)
Command
Target
Environment_Destroy_Beams
Lightbeams
Environment_Destroy_Soundscapes
Soundscapes
Environment_Destroy_AmbientGeneric
Sound Emitters
Environment_Destroy_Sprites
Sprites
Environment_Destroy_SmokeVolume
Smoke effects
  • Environment_stopSoundscape
    - Runs stopsound and stopsoundscape for all players. Requires sv_cheats 1 to work properly.

  • Environment_DisableStaticAmbientLighting
    - Uses black-magic to disable the map lighting on static props entirely. This will last until you start a new game/restart the server, so only use it if you're planning to keep the map pitch-black for the entire session.

  • Environment_DisableStaticSelfIllum
    - Disable self-illumination on all static props. This one can be toggled on/off. This is useful for any lamp props that are part of the map, as otherwise they'll be fully-bright/glowing.

    *Note: This edits the material rather than the static prop itself, so props with the same material as a static prop on the map will also have no self-illumination while this is turned on.

If you wish to contribute, a github repository for this is available here[github.com]
There's also a channel set up for this addon in the Octantis Addons Discord[discord.gg].
Popular Discussions View All (10)
1
21 May @ 3:15am
I changed the ambient light to 1, but the props are light.
barrythreeazy
12
1
30 Jul, 2024 @ 7:29pm
Petition to make zeta player use flash light in the lowest sunlight option (also ambient light)
WhenSilkSong?
11
13 Feb, 2024 @ 12:11am
is this addon safe?
clem
275 Comments
Raptor Jesus 9 Jul @ 5:36am 
this is awesome, thank you so much
JonahSoldier  [author] 9 Jul @ 5:09am 
@Raptor Jesus I've added a workaround to let superAdmins edit this addon's cvars. I also ran into a few other issues that I hadn't detected before (and that for some reason no one has reported), because I've previously only been testing in p2p/singleplayer. I've fixed most of those, though the 2 options at the bottom of the menu (disableStaticSelfIllum & disableStaticAmbLight) currently still only work in singleplayer. I'll get around to fixing those too at some point, but I've updated the addon with the current changes in the meantime.
Raptor Jesus 7 Jul @ 6:14am 
my issue is that i can't seem to change the skybox at any level of permission in this case.
Raptor Jesus 7 Jul @ 6:05am 
can you make a permissions/access change so that this can be used by admins on dedicated servers? thank you, this addon works great besides this!
TMTx Demmon 1 Jul @ 4:47pm 
also it freezes my pc
TMTx Demmon 1 Jul @ 4:47pm 
mat specular 0 to 5 seconds, you may freeze """"""""""""temporaly"""""""""" when this happen, dude i had to restart my pc 2 times when i enabled that option, what it does
JonahSoldier  [author] 14 Jun @ 4:46am 
It should still be there. I haven't updated the addon recently, and I still have it on my end. Are you sure you have the addon enabled?
mrdappletheepic 14 Jun @ 4:38am 
where did the light editor go its gone from the editors
einius07 21 May @ 10:54am 
oh
JonahSoldier  [author] 21 May @ 9:12am 
You need to set that yourself. Spawn a sky-editor from the entities tab of the spawn menu and configure it with that.

If that doesn't do anything, then set skyname to "painted" at the top of the light/environment editor menu. Whether or not you need to do that will depend on the map (construct and flatgrass already have an editable sky by default, but a lot of maps won't).