| The simulation of the fluid in the natural phenomenal is always a hot and difficultresearch field in computer graphics. The flame is an important part in our life, thesimulation of flame can also be widely used to the field of games, film, and militarysimulation and so on. As the physical characteristics of the flame are very complex, it isdifficult to use the geometry-based modeling method to simulate realistic flame, we usethe physically-based simulation methods, starting from the physical characteristics of theflame. It is difficult to simulate the real-time fire with the realistic effect. We present agraphics processor (GPU) acceleration method based on the physical model and thevolume rendering for modeling and animating real-time flame.Firstly, in the aspect of flame modeling, we use the incompressible NS equations(Navier-Stokes) to establish the flame model. The simulation area of the3D flame can bedivided into the cube grid with the same size, and every grid contains the flame speed,density, and pressure and other physical attributes. We can obtain the velocity field of theflame by solving the NS equations and simulate the movement of the flame realistically,and then get the physical model of the flame. At the same time, we put the NS equationsolving process into the GPU improve the speed of the simulation and ensure the real-timeof the simulation.Secondly, in the aspect of flame rendering, we introduce the direct volume renderingmethod based on the ray casting and the physical model is treated as the volume data. Thestarting point of the light is set to be the viewpoint, the light through the volume data fromeach pixel of the viewing plane. We can determine the entry point and the departure pointof the light in the cube and get the distance of through the cube by calculating thedirection of each one of the light, and set the sampling points in that the distance of everycertain pitch. In the drawing stage, we can get the color and opacity of the sample pointand mix the color values of the same light as the final color. We can use the advantage ofthe parallel rays to port the ray-casting algorithm to the GPU to accelerate the flamerendering.Finally, we use Open Graphics Library OpenGL and the Visual C++language to simulate the flames with the different grid accuracy and the burning materials. And weadd wind, obstacles and scene to increase the realism of the simulation. The experimentalresults show that our flame simulation can satisfy both the real-time and the realisticdemand. |