The work in this thesis has shown that particle systems are able to simulate the real-world phenomena of fire and water in real-time. This is accomplished through the use of parallel im- plementation of the particle models equations on the GPU using CUDA and OpenGL rendering approaches specific to fire and water situations, for example surface rendering. It is shown that by providing an adequate balance between the particle system’s complexity and the rendering implementation, effective results can be achieved. An in depth analysis into the use of these particle systems has also been performed, including covering different integration methods for physical accuracy and spatial partitioning methods for computational speed-up.
Research question one asked whether particle systems are able to be used effectively to simulate the behaviour of fire and water effects in real-time. This thesis described the im- plementation of four different types of particle models - the non-interacting model and the velocity-vortex model for fire simulation, and the modified spring-mass and SPH models for water simulation. The representation of these fire and water effects using particle systems al- lowed a wide variety of behaviour to be simulated by allowing individual particles to move around creating complex shapes such as droplets, waves, and flame tongues. Individual parti- cle parameters such as viscosity, density and vorticity allow particles to employ fluid dynamics equations to move with fluid-like motion, while spring-mass motion using colliding spring forces is also able to represent fluid-like motion relatively well with large system sizes. It was also shown that using particles enabled the system to be interactive with user-manipulated rigid bodies and forces, an important feature when considering realistic simulation and immersion.
The second research question asked for an analysis on the strengths and weaknesses for using different particle models to simulate these effects. It was found that the velocity-vortex model does provide a superior visual representation, as it is able to produce swirling vortex effects and generally more fluid-like movement present in real fire phenomena, due to the un- derlying fluid dynamics algorithms used by the method. On the other hand, the non-interacting particle model was more reliant on randomization to demonstrate chaotic effects and was not able to reproduce this behaviour. For water simulation, the SPH model was shown as supe- rior to the spring-mass model, as it was also able to achieve water flow behaviour which the
SECTION 8.2: CONCLUSIONS 167
spring-mass model could not - in particular, turbulent behaviour (such as waves and splashes) was much better suited to the SPH model. When considering real-time interactive speeds, the size of each system was one of the main limiting factors to the method’s implementation. Due to its simplicity, the non-interacting particle model was shown to be able to handle a larger amount of particles than the velocity-vortex model, but this did not make up for the lack of flame-like behaviour demonstrated by the model. The spring-mass and SPH models were able to handle similar amounts of particles while maintaining an interactive frame-rate, although relatively larger SPH systems were more stable than their spring-mass counterparts because of the underlying viscous forces present.
Integration methods of particle systems in general were also explored. The results showed that a Leapfrog integration method or similar is the most preferred approach for these types of particle systems due to the need for low-order integration methods for real-time simulation purposes. Higher-order methods are more accurate, but are slower; the Runge-Kutta 2nd and 4th order methods are two and four times slower respectively than the Leapfrog method. Be- cause the Leapfrog method is also a symplectic method, it was able to conserve energy over a long period of time.
The third research question of this thesis asked how these particle systems can be rendered visually at real-time execution speeds. The fire particle systems used a simple point-based ap- proach to render the effects, where point sprites were rendered brighter in areas where particles were more dense. While a point-based approach was sufficient to demonstrate flame-like be- haviour, some aspects of realistic fire were represented but the method also had its weaknesses. In particular, the outer edges of the flame were frequently rendered more as points than as a continuous smooth area of flame, due to the very low density of particles in these areas. In this situation the method was better suited to rendering spark-like behaviour at the edges of the flame. The point-based approach was also able to visualize structure within the flame, such as the individual vortices making up flame curls, and the variation in temperature of the flame in areas where particles clustered in density.
The water systems utilized a surface generation approach to rendering, as water has a de- fined free surface when compared to a more gaseous substance like fire. Marching Cubes was chosen as the method for surface generation due to the algorithm lending itself well to paral- lelization and its versatility in generating surfaces over a wide variety of underlying structural shapes made by the particles. The realism of the generated surface was enhanced through the use of Fresnel shading, rendering the colours of a surrounding skybox onto the surface with realistic reflection and refraction factors. Both the fire and water rendering implementations were able to be rendered in real-time, although the surface required significantly more time to generate than simply rendering the particles as point sprites.
Research question four asked how parallelization could be used to help speed up the ex- ecution of these particle models and rendering methods.Parallelization of all particle systems described in this thesis was implemented using NVIDIA’s CUDA. Due to the massively parallel architecture, the complex methods governing the behaviour of the particles for fire and water systems are able to be computed at interactive rates, while using the interoperability of CUDA
and OpenGL further increases this performance by not having to copy rendering data between the host memory and graphics card. Parallelization of the particle methods allowed systems of a much larger size to be simulated while maintaining interactivity. Parallelization of the surface generation approach achieved similar computational advantages, providing support for high resolution Marching Cubes grids (up to 16 million cells on the GeForce GTX 780) while maintaining real-time interactivity. Performance was also improved by implementing a spa- tial partitioning algorithm in parallel, reducing the search space of particles when processing interactions between them.
The final research question asked for suggestions when balancing computational aspects and rendering aspects of the simulation, specifically in relation to real-time rendering. Sec- tion 7.7 described in detail the complexities of combining both the particle system algorithms and the surface generation algorithm. It was found that the particle system size, integration methods, Marching Cubes grid resolution and the particle field radius were primary concerns when balancing this simulation. It was discussed that in order to remain running in real-time, combinations of these primary parameters would need to fit within the real-time simulation constraints. For example, using a higher order integration method would increase the physical accuracy of the system, but to remain interactive the surface grid resolution may need to be re- duced to account for the extra time needed to execute the higher-order integration method. The combination of these aspects of this thesis demonstrated the inherent challenges of real-time rendering when applied to natural phenomena, and it was shown that in balancing these aspects it is possible to achieve some visually convincing results at an interactive frame rate.
In conclusion, the thesis produced the following contributions:
• A demonstration which shows that particles are capable of simulating fire and water
realistically and at real-time speeds.
• An implementation of these particle systems in parallel with NVIDIA CUDA, providing
computational speed-ups in order to maintain interactivity while allowing the system to improve in size and physical accuracy.
• A discussion on the advantages and disadvantages of using different particle models and
different integration methods when simulating fire and water.
• A combination of the underlying particle system and the Marching Cubes surface genera-
tion algorithm to produce a quality rendering of water effects with real-time interactivity.
• A discussion on the trade-offs considered when balancing computational and rendering
aspects of the system.