top of page

Custom Scene Depth
Post Process Material Breakdown

The Final Blend section takes the results of all the sections and LERPs the results against the Scene Texture in the foreground and the user defined Skysphere, far, medium, and near distances.

​

By making a material instance, the user can determine where these sections begin, blend together, and which colors those sections are.

​

The Player Stencil section was added specifically for this project to allow Halia, the protagonist of Hollowed, to be unaffected by this post process material.

The visual aesthetic of our game, Hollowed, drew inspiration from the work of Mikael Gustafsson.

Together with the Art Lead for this project, Leah Augustine, we dissected the aspects of Gustafsson's work that contributed to his graphic look with a stunning color palette and gradient. Fortunately for us, Gustafsson sold an asset pack he created for Unity that demonstrated his workflow. He used 3D assets within Unity to create vibrant imagery with subtle movements.


That asset pack can be found here: Mikael Gustafsson's Unity Store Page

​

We determined we needed layers of "colored fog", so I began to research ways to implement this.
Forum posts like these served as the basis for my implementation:

https://answers.unrealengine.com/questions/210553/multicolored-fog-post-process-material.html

https://storyteller-vr.com/2015/11/22/exponential-squared-fog-for-unreal-engine-4/

https://sainarayan.me/distance-fog-in-ue4/

Material Node Network Breakdown

My Process:

The red, blue, green, and black sections of my node network are almost identical but vary with parameter inputs. Starting with the red section, a color parameter is set to LERP between the masked RGB output of the Scene Texture. This allows the background to be unaffected by the post process material.

​

The alpha for color/Scene Texture LERP is determined by the quotient of the scene depth and an arbitrary parameter that the user determines as a point in worldspace. The quotient is then saturated to minimize the range of the resulting value.

​

At the bottom of the red section, the camera distance from the scene's objects is determined by taking the absolute world position and finding the distance from the camera position. This was then used to calculate the quotient by dividing by the LERP version of an arbitrary parameter that the user determines as a point in the worldspace. In order to make this result more noticeable, the result is put into a power node and finally saturated to limit the range of the resulting value.

​

The output of the color LERP and the arbitrary parameter that the user determines as a point in worldspace are LERP-ed in the subsequent sections.

​

The output of the camera distance is fed into each section in an identical manner.

bottom of page