Effects ‐ Fog - ow-mods/outer-wilds-unity-wiki GitHub Wiki
Planetary Fog is a sphere of fog used to add depth to planets.
Fog Component
You assign the textures here.
[!IMPORTANT] You might have to re-open the prefab or scene for fog to actually be applied properly.
[!WARNING] Only one fog can render at a time. Fog Imposter fixes this with a custom shader and material used for when you are far away. It has similar properties to this component, so you can just make a material with that shader and copy the properties over.
I do not know what this material or shader is called, so it is currently not in unity-assets. Someone else go fix that maybe. Just do fog with NH for now.
Check NH docs for more info.
Gizmos
Gizmos show the fog radius and lod fade distance.
3D Lookup Texture
Fog uses a 3d texture that stores density at varying altitudes (distance to center of planet). This texture can be generated by the tool at Tools > Assets > Fog Lookup Texture Generator
2D Ramp Texture
Above is the 64x64 fog ramp texture for Brittle Hollow.
The x axis is "time of day" (left is night side, right is day side). You can see how it's darker on the night side because less light gets there.
The y axis is distance to camera (top is stuff far away, bottom is stuff up close). This is combined with an alpha fade affected by density, so you don't need to specify alpha here, but you can. This is also multiplied with the fog tint. You can also see how it transitions from an orange up close to a blue far away.
[!IMPORTANT] Uncheck
Advanced > Generate Mip Maps
to prevent weird pixelated edges.