Beneath the Badlands: Mine Pit Fog
For the game Beneath the Badlands we wanted to visually add an air of mystery arround the mining hole. To accomplish this I created a dark, slowly shifting fog deep in the pit and fog rolling down the sides. Through this process I learned a lot about creating volume materials.
Initially I had thought to use particles to create the rolling effect, but it became a bit difficult to control the density of them as they piled up. Instead I opted to just use a mesh with a volume texture mask. The problem with this was getting it too look like it was rolling down the sides of the hole.
To solve this problem I used mesh distance fields to create a mask from white to black the farther away from the surface. Next I needed to create the rolling movement.
I couldn’t have the volume texture move along the surface, but I discovered just making the texture move downwards cause it to look that way. At this point the fog has nice movement but the shape isn’t exaclty there since the distance field mask is just a gradient.
I thought about changing the range of the cloud mask to get different values after the multiply. Then I discovered that I could subtract 1 from the gradient mask making the vaules go from 0 to -1 and add the cloud mask on top of the that, doing so would cause no part of the cloud to appear at the max distance, while retaining the cloud shape closer to the surface.
Taking this same idea and blending it with other masks and changes of color, I was able to create a layered effect to the fog in the mining pit.