Fog - UGEcko/Chroodle GitHub Wiki

Introduction to Fog

This page explains most if not all information behind fog and its properties.

Basics

Fog Properties

  • Attenuation - A number that's only necessary to be from 0 to 1. This number determines the reduction of the light/visibility that passes through the environment.
  • StartY - A number that defines the Y position of the fog before any objects fade.
  • Height - A number that defines the height gradient of the fog.
  • Offset - A number that defines how far the fog sphere is from the player. A higher number = A greater diameter.

Information: StartY is to not be confused with Height. StartY defines the Y position where anything under will be faded. Height is the relative number to startY that defines the gradient of attenuation. For example: Start Y being -5 and height being 10. Any objects under Y -5 will be faded, and the attenuation gradient is from -5 to 5 (10 units). Height can also be negative, so the fog is inverted.

Fog Manipulation

To manipulate/modify fog in beatsaber; you must modify the Environments BloomFogEnvironment component. If you wish to animate the fog instead of keeping it static throughout the entire map, you must use the AnimateComponent CustomEvent aswell. STATIC FOG CODE SNIPPET FOG ANIMATION CODE SNIPPET

Experimentation

The best way to get any effects you are looking for with fog is to experiment. However, personally I find myself doing the guessing game with fog pretty often.

Below I have made a simple and quick guide to modify the fog in-game in real time, for a more accurate representation of all properties of fog using Runtime Unity Editor. If you do NOT have RUE installed, please navigate to the RUE page to get started with installation and the basics.

Step 1:

Run your Beatsaber map, and open RUE with the G key. At the top of the Object Browser, search for Environment, and hit enter. There should be at least one result; click on the gameObject that just says Environment.

353894940-1fb506c4-aa2f-4232-8fa7-efa312c564ab

You know its the correct object if it has BloomFogEnvironment in the components section.

Step 2:

Open the BloomFogEnvironment component in the inspector by left clicking on it. Next, find the BloomFogEnvironmentParams member with the name "_fogParams" and click on it to inspect. This will lead you to the tab that holds all 4 of the fog parameters of the Environment. Change these by typing new values. To apply them, simply hit enter or click somewhere else in the inspector tab.