精選文章

SmallBurger Asset Home

  SmallBurger

2025年5月12日 星期一

The Challenges of Foreground Particle Effects

When dealing with foreground effects, it’s common practice to have emitters follow the camera to avoid the performance issues caused by planting a large number of effects in the scene. However, this approach can lead to unrealistic particle behavior in relation to the camera. On the other hand, if particles are not synchronized with the camera, it can result in the problematic issue of particles not being pre-warmed in time, which can be quite troublesome.

In traditional scene object culling, the use of the nine-grid culling algorithm is a common practice. Is it possible for us to employ this mechanism to perform pre-simulation of particles in a buffered grid, thereby potentially resolving the particle pre-warming issue. Additionally, for enhanced performance, we propose shifting the particle simulation and culling processes to the GPU. This should be considered a preferable solution.

However, we will first encounter the issue of poor SSBO (Shader Storage Buffer Objects) support on many mobile platforms. I previously discussed this issue in the article Integration and Application of DrawMeshInstancedIndirect, and the relevant link is provided below:


Then, we performed traditional particle motion simulation on the GPU, collected particles within the camera’s field of view, and stored them into a result rendering texture. Finally, we utilized a RenderPass to call DrawMeshInstancedIndirect to render them out.

Throughout the entire process, the most challenging aspect was the fading in and out of particles in front of the camera. This involved issues such as particles appearing too large or suddenly appearing when they are close to the camera, as well as the problem of particles disappearing abruptly when they are outside the field of view or reach the end of their lifespan. Addressing these issues took considerable time.

The issues mentioned above have been addressed by Camera-Adherent GPU Particles. If you’re interested, you can find more information about it here.

沒有留言:

張貼留言