The volumetric fog effect serves as a great enhancement for atmosphere, commonly applied in scenarios like mist between forests and mountains. The conventional methods involve using particles or Ray Marching to achieve this effect. However, both of these approaches consume a considerable amount of performance, especially when covering the entire scene, making them less suitable for mobile platforms.
Another common requirement is the depiction of war-related mist, often achieved by utilizing a weight map. During the game runtime, this map is gradually unveiled. However, relying solely on this weight map for rendering can result in a harsh and abrupt appearance, particularly at the edges and areas interacting with mountains.
FakeVolumeFogPainter adopts the following methods to address the challenges:
- Utilizing a Noise Weight Map to introduce edge disturbance and alleviate the abruptness of edges.
- Employing a simple brush function to apply fog effects to specific areas on the scene surface. (This aspect represents a fixed fog effect that remains constant during the game runtime.)
- Using depth textures to simulate the transition of fog between mountainous terrain.
- Supporting fog color brushing to replicate effects such as marsh gas.
- Simulating shadow effects to enhance the three-dimensional perception.
- Supporting the projection of cloud shadows and height-based fog effects, seamlessly integrating them with volumetric fog and war-related mist effects in a single RenderPass to enhance performance.
- Providing two fog unlocking modes (SetPixel and RenderTexture), with RenderTexture being suitable for unlocking over larger areas.
If you are interested in this plugin, you can find it here:
沒有留言:
張貼留言