Garry's Mod

Garry's Mod

52 ratings
How to enable AO (Ambient Occlusion) On Gmod (Read Update)
By FilipeLuk
A guide on showing how to enable AO (Ambient Occlusion) in Gmod with almost no visual glitches or errors (except mirrors).
   
Award
Favorite
Favorited
Unfavorite
Update
As some users (including myself) have noticed, this setting might not be avaliable anymore, supposedly because it broke through some Nvidia driver update. In any case, if it works for you I would like that you would comment what GPU you own and your current driver version. Otherwise, I think there is no solution to this other then rolling back the driver to a previous stable version (that I do not know, so perhaps some testing is needed.)

Anyways, proceed to the tutorial and see for yourself if it works or not.
About
So, what is Ambient Occlusion?

From Wikipedia:

"In computer graphics, ambient occlusion is a shading and rendering technique used to calculate how exposed each point in a scene is to ambient lighting. For example, the interior of a tube is typically more occluded (and hence darker) than the exposed outer surfaces, and the deeper you go inside the tube, the more occluded (and darker) the lighting becomes." " The result is a diffuse, non-directional shading effect that casts no clear shadows but that darkens enclosed and sheltered areas and can affect the rendered image's overall tone. It is often used as a post-processing effect."

In other words, it adds ambient shadows. That is, it adds shadows where a light does not cast a shadow through basic rendering, such as the corners of a wall.

Why would you have this on Gmod?
AO can be used to improve your visual Gmod experience by rendering ambient shadows that should be in the game. As of today, Gmod does not have AO implemented in it, but other Source games, such as Half-Life 2 and Team Fortress 2 do.

Many people use Gmod as a tool to create Animations and Posters, including myself. Source Filmmaker is known for its good visuals compared to animations made in Gmod, and AO is one of the reasons why SFM content tends to look better in general.


For those wondering why I made another AO guide on how to enable it, the selected AO compatibility setting is not from HL2, but instead TF2, which works better and does not have as many visual bugs or errors (such as completely missing AO, or fickering), apart from the mirror one.

Also, I show some examples to help you decide whether you want to enable it or not.


Any costs by implementing AO?
Perhaps. It all comes down to what your PC can handle. This alone does not influence too much on FPS, but can have a bigger impact on low end PCs.

Unlike other Guides that show how to enable a diferent type of AO, this one is slighly diferent and is fully functional.

The only major downside is when a mirror is on your field of view, it causes the AO to also be reflected, making a ghosting effect behind the mirror.

Example here:
https://youtu.be/bIwwQY8fOZE?t=7
How to enable AO
DISCLAIMER: It only works with Nvidia Cards. AMD cards do not support this type of configuration.



First, you're going to need an updated version of Nvidia Inspector, a program that lets you ajust cetain settings from your game. It's pretty similar to Nvidia Control Panel, but this one has diferent and more values that can be ajusted in order to enable AO.

Use this link to obtain the latest version of Nvidia Inspector: https://github.com/Orbmu2k/nvidiaProfileInspector/releases

Download this .zip file






Upon extracting, open Nvidia Inspector and you will see this:






Now, on the profiles searchbox, search for Half-Life: Source and select it.



Because HL Source also uses the Source engine, the executable file for Gmod and HL Source is hl2.exe. Since we're goin to change Gmod settings, we must remove the hl2.exe from the HL Source Aplications, so that it doesn't confuse it with Gmod's hl2.exe

To do that, just press the button "Remove Aplication from current profile" over here, and select hl2.exe to remove it. Do not remove "half-life source/hl2.exe" option! Just the hl2.exe

Note that I already removed it, but for you there should be 2 options.






After that, save the changes you made on the top right corner: Apply changes.






Next, on the profiles searchbox, search for Garry's Mod and select it.






After searching and selecting Gmod, you will see that under Compatibility, there's a setting called "Ambient Occlusion Compatibility", and you should see the values 0x00000000 (Dragon Age 2) on it by default.






Now here's what's diferent from the other guides: Instead of choosing the value from Half-Life 2 (0x0000000A), change it to 0x00000009 (Team Fortress 2) , which is more recent and is (apparently) compatible with Gmod.






After this, scroll down until you see "Common".
In here, you will see two settings: "Ambient Occlusion setting" and "Ambient Occlusion usage"

Change "Ambient Occlusion setting" to "High" or "High Quality", as you prefer.
As for "Ambient Occlusion usage", change it to "Enabled".






In the end, don't forget to save everything on the top right corner: Apply Changes



Visual Examples
Here are some comparisons with AO enabled and without. Enjoy.
Please click on the GIFs so that you get to see all of the details.

1 image - AO disabled
2 image - AO enabled
3 image (grey) - AO only


2fort Spawn





2fort Battlement area





Blu Spy behind Red Engineer





All classes


Q&A
Any questions made in the comments or information that is relevant will be posted in here as well.



Q: What are some of the visual errors or glitches that can appear?
A: Some of them are here:

1- Zooming in too close on areas with AO (such as wall corners) will cause a very subtle flicker, almost unnoticeable.




2 - When using the post processing effect "Super DoF", or Bokeh, the AO will disappear in certain objects or locations. As seen in here, only the locker loses its AO.



55 Comments
Dryan844 11 May @ 10:38am 
how do i get it to start?
spy_gaming 31 Jan @ 8:31am 
btw how do i change the AO like weres the settings for it?
spy_gaming 31 Jan @ 8:19am 
i think i just fixed it (god damn i hate my life)
spy_gaming 31 Jan @ 8:16am 
pls help
spy_gaming 31 Jan @ 8:13am 
uhm i think its broken i see the AO around my screen not on the stuff
spy_gaming 31 Jan @ 8:06am 
i did all the things and stuff but it does not show,do i need to enable smt?
FilipeLuk  [author] 15 Dec, 2024 @ 12:32pm 
No risk at all, this just changes visual settings and instructs your gpu and the game’s engine on what kinds of effects/settings to use
Wiðer 14 Dec, 2024 @ 10:37am 
Is there a risk of getting VAC banned if I do it in TF2? I wouldn't think so since it worked fine before the 64 bit update and I used it just fine there but any info would be appreciated
goober 12 Jun, 2024 @ 3:28am 
Instructions unclear, I saw goats
zakattack 18 May, 2024 @ 5:31pm 
Im Freaking Dumb as hell