Garry's Mod

Garry's Mod

180 ratings
[Material Proxy] Env_Lightmap
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Model
Addon Tags: Fun, Realism
File Size
Posted
1.266 KB
8 Apr, 2024 @ 11:44am
1 Change Note ( view )

Subscribe to download
[Material Proxy] Env_Lightmap

Description
Tired of your custom/static cubemaps causing your model to glow in the dark? Then this is the addon for you!
This is a resource for modders that is just the 'MwEnvMapTint' proxy from the Modern Warfare SWEPs but made into a standalone addon for convenience so that you don't have to require downloading a whole customizable weapon sysem if you only just want to have a fix for your cubemaps glowing in the dark

This material proxy will brighten or darken a given material's cubemapping to match the surrounding area's lighting so that it becomes less apparent in darker areas, or more apparent in well lit areas

Simply add the following to your material's VMT file:
"Proxies" { "Env_Lightmap" { "min" "0" "max" "1" "envmap" "PATH/TO/YOUR/CUBEMAP" "color" "[1.0 1.0 1.0]" } }

NOTE: For best results, use a cubemap that's compiled with HDR, as non-HDR cubemaps will appear more desaturated

If you don't know how to do that, there's a tutorial on the VDC Wiki for creating HDR skyboxes that can also apply to making HDR cubemaps HERE

Credits:
All credits go to Mushroom Guy, who made the base scripts for the Modern Warfare SWEPs, who also wrote this material proxy

I just made it into a standalone resource for modders (with their permission, of course)

DISCLAIMER:
I know Draconic has a similar material proxy, and while it's got more features and such, i just don't like how there's such a noticeable delay before the cubemap readjusts to the new lighting and how it overrides the initial tint color with the ambient lighting's color, this material proxy takes affect immediately and takes into account the tint color as it adjusts the brightness
22 Comments
Misterlegodude  [author] 3 Jun @ 10:11pm 
Unfortunately, this method of adjusting the cubemap's brightness does not support HDR cubemaps, that includes env_cubemap

If you want to do something similar while using env_cubemap, use the 'drc_ReflectionTint' material proxy from Draconic Base by Vuthakral
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1847505933
Eris Vizierre 3 Jun @ 9:33pm 
Not working with env_cubemap for some reason. Whenever I try, it's just a missing texture.
Misterlegodude  [author] 22 Mar @ 7:41pm 
This is meant as a resource for modders to add to their own models' VMTs, not so much for any one else to modify other people's VMTs with
Scanner Man 21 Mar @ 8:14pm 
you know, it would be great if this addon would work without the need to be modifying the file internally :/
Misterlegodude  [author] 20 Mar @ 10:09pm 
It's not that easy to explain in a comment, especially if you're not already familiar with working with Source Engine models and materials

But basically, if it's your own model, the materials are usually in Gmod's (or whichever Source Engine game's) 'material/models' directory or in Gmod's 'addons/your_addon_name/materials/models' directory, but you'd probably already know this if you were following a tutorial on making Source Engine (or Gmod specifically) models and materials

But i don't recommend trying to modify any materials from existing workshop addons as that's a more complex process
Scanner Man 20 Mar @ 8:35pm 
@boyjedi I asked the same question some time ago but nobody answered me, I would like to find it to do this at once.
boyjedi 1 Dec, 2024 @ 2:08pm 
where is material's VMT file
Mr. Ant Tenna 30 Nov, 2024 @ 12:16pm 
holy shit niche addon :steamthumbsup::steamthumbsup:
Vinnie Bounty Hunter 20 Aug, 2024 @ 3:48pm 
Fix Light ilumination on dark with visor Dark
Delta 2 Aug, 2024 @ 11:03pm 
just to let u know sometime chand will just go in the dark state could be a bug at frist i was like w t f nooo what happed then i payedattion lol pritty cool with thelight up part of the modle