• Asset Release : Hotel Neptuno Triton

  • Release : Museum of the Revolution

  • Release : Union Terminal

Saturday, September 18, 2021

Reshade : Depth Detection

Table of content:

  1. Setting up ReShade & configuration 
  2. Explaining depth detection, Depth of Field (DoF), Fog effect & Screenspace RayTracing Global Illumination (RTGI) ◀ you are here
  3. Other commonly used shaders (updated 29/9/2021)
  4. Random Tips  (added 20/9/2021)

Got question? Shoot me a whisper/private message on Discord, username NameInvalid#3419 or KUZU ⩌.⩌ on Custom Maid Server.


Depth Map

What on earth is a "depth map"?

Depth map is a black & white image where the game uses to apply various post process visual effects. Every game have depth map, it just a matter if ReShade successfully detected it.

ReShade is able to detect COM3D2's depth map out of the box. But, it is incorrectly setup and needs of correction. Default ReShade installation should come with a shader effect called "Display Depth" which can show us how the depth map actually looks like, and...


It's upside down!

To fix this little issue, we need to configure the depth map orientation in the "Edit Global Preprocessor Definitions" setting. Simply click on that button, input value of "1" for "Upside_down" and "Reversed" and click anywhere else outside and ReShade will reload. Keep "Logarithmic" as "0" or there might be bugs for certain shaders.


Now your depth map should appear correctly oriented. This is a global setting that only need to be set once, as we changed the value in the "Global" tab.

NOTE : there is one quirk about COM3D2's depth detection - it is paused or completely turned off when many of the IMGUI plugin user interface is active, such as SceneCapture, PartsEdit, Plugin list, ShapekeyMaster, etc. Just close their interface when you want depth detection to work correctly after changing camera position.


Using qUINT Depth of Field : ADOF [quint_dof.fx]

Let's go through some of the value adjustments in here to understand how to control the DoF effect & put the focus where you want it to be.


Auto focus really is only used for active gameplay purposes. When taking screenshot we most likely want to manual focus instead, so we can ignore all the auto focus settings. Before we do anything else I do suggest to set "Hyperfocal depth distance" to maximum 1.0 value so you get the strongest possible DoF blurring.

Let's use a diagram to illustrate what the "manual focus depth" & "blur curve" actually means:


  1. this is you, looking through the monitor...
  2. this is the subject you want to focus on, adjusting "manual focus depth" will tell the shader the distance where you want to focus on. A lower value is closer to the camera, and larger value is further away from the camera.
  3. this is background objects
  4. this is "near blue curve", a value of "6.0" is enough to completely eliminate blurring between the camera and the subject you manual focus on. If you want to blur out something in front of your subject, then you want to lower this value, for example "2.0". The lower the value, the stronger the blurring effect.
  5. this is "far blur curve", a value of "6.0" is enough to eliminate all distance blurring behind the subject you manual focus on. If you want to blur out distance scenery, use a lower value. For example "2.0". The lower the value, the stronger the blurring effect.

In most cases the above values are most of what we play around with. Aside from that, this shader also offer "bokeh" effect. If you don't know what bokeh is, simply look up some picture online. Basically, it's a lens effect that causes bright spot among the blurred area to form polygon shapes.

  • "vertices" means how many side the polygon should be, 4 sided will form a rectangle for example.
  • "roundness" when set to 1.0 will form a circle regardles of what vertices you use. Value of 0.0 is what you want if you want polygon of certain sides. Value of -1.0 will form stars instead.
  • "rotation" adjust... well, rotation. This uses angle values of degree ° from 0 to 360.
  • "aspect ratio" of lower than 1.0 will squash the shape.


Using Adaptive Fog

Adaptive Fog is found in the OtisFX package: https://github.com/FransBouma/OtisFX

Need some fog in your scene? Actually no, despite it's name, this shader can actually serve many different purposes as it allows you to put any color at a given distance from your camera. You can also set it to completely opaque to obscure part of the background. Let's look at examples from other games.



In the first example, there are actually a lot of junks in the environment. However, they are completely obscured by Adaptive Fog, creating a clean shot of the bikes. In the second example, the background is partially obscured with about 70% fog opacity.

While in COM3D2 you can easily remove the background, that is simply not the case for many other games. This is where Adaptive Fog is very useful to compose a cleaner looking shot.

Adaptive Fog is a relatively simple to use shader;

  • "MaxFogFactor" to control the maximum opacity of the fog color. Value of 1.0 will be completely opaque.
  • "FogCurve" affect how fast it fade from 0 to MaxFogFactor, where lower value means it took longer distance to achieve maximum value
  • "Fog Start" is the distance from camera where you want the fog start fading in, the lower the value the closer it is to the camera.

Adaptive Fog only offer a single color option, there is another shader from CorgiFX package which allows you to use two colors instead and have different rendering shapes.

https://github.com/originalnicodr/CorgiFX

On the Github page the author already showcase various use case example.


Using Screenspace RayTracing Global Illumination (RTGI)

This isn't a shader you will find anywhere in the Github packages. Instead it is a paid shader on Patreon. 😥 There are of course other ways to get it but I will not explain it here.


The "Ray Tracing" name is up to debate, not going to get into that. But it does give ReShade the capability to add additional illumination to your scene, aside from adding AO (ambient occlusion) to shaded area. As you can see in the highly exaggerated example above.

Note: if you see the line glitches below, that means you had turned on "Logarithmic" in "Edit Global Preprocessor". Make sure it is 0.


Example RTGI scene effect:




//--


 ▶▶ JUMP TO NEXT PAGE ▶▶

Table of content:


  1. Setting up ReShade & configuration 
  2. Explaining depth detection, Depth of Field (DoF), Fog effect & Screenspace RayTracing Global Illumination (RTGI) ◀ you are here
  3. Other commonly used shaders (updated 29/9/2021)
  4. Random Tips  (added 20/9/2021)




















DigitaLifeless

Author & Editor

Has laoreet percipitur ad. Vide interesset in mei, no his legimus verterem. Et nostrum imperdiet appellantur usu, mnesarchum referrentur id vim.

 
biz.