Font Size: a A A

Generate A Multi-layer Atomization Effect

Posted on:2008-07-04Degree:MasterType:Thesis
Country:ChinaCandidate:W TangFull Text:PDF
GTID:2208360242466525Subject:Software engineering
Abstract/Summary:PDF Full Text Request
Fog effect is an indispensable part of 3D virtual reality simulation system. It derives from the nature phenomena and simulates the vision effect of fogged objects in real world. Since it was born, the generation of the fog effect is regarded as a big issue by the graphics hardware manufacturers. Under the leading of OpenGL Architecture Review Board, the industry standard of fog simulation was founded. Up to now, every 3D development platform supports the fog effect simulation. The chapter about fog simulation always occupies a big portion in development documents. After the study, the evidences and guides for the fog effect simulation in the 3D virtual reality simulation environment will be provided, the principles, advantages and disadvantages about the fog simulation technologies will be clarified and the improvement will be made in the future.Now there are two major directions for the fog effect development. One is to blend the colors of the vertices and pixels of the objects and the fog, basing on the simplified approximate equation of the fog density. While generating 3D images, OpenGL calculates the colors of vertices, interpolates them to generate the colors of pixels during the course of OpenGL processing pipeline. Basing on that, the fog colors and the pixel colors are blended to generate the fogged scene. OpenGL provides not only the basic fog generation functions and the shading language programming interface as well. Because shading processes are embedded in the pipeline of OpenGL, the runtime data could be obtained easily and it is easy to render the fogged scene according to the runtime conditions. Besides, methods such as texture blending are used to generate fog effect. Another direction is real-time simulation. It derives from the hydromechanics equations. After putting some random factors such as vortices or outside forces into the equations, removing noise from them, smoothing them, the mathematical model for the fog simulation is formed. Then on the basis of the large amount of data calculations, a particle system could be constructed to present the model and simulate the fog generation. The fog effect generated has many realities, huge calculating works beyonding the ability of current CPUs and bad real time capabilities. With the unceasing improving performance of GPU or simplification of the equations, the efficiency problem will be resolved in real time.The tecnologies discussed in this paper, are mainly about vertex-based and pixel-based fog effect generations. Firstly, the implementation of a near-distance fog effect simulation system is described. It's a combination of the volumetric fog coordinates and the distance fog algorithm, mainly implemented in shading processors. Secondly, a kind of vertices-based volumetric fog generation algorithm is improved after being studied, and basing on that, a cube volumetric fog simulation algorithm is introduced. Then the algorithm implementation is rewrited in shading language and a much faster rendering speed is gained. To simplify the fog density calculation, the red, green and blue color channels are used to record the w distance during the shading process. After the study of the pixel-based volumetric fog simulation algorithm, this paper discusses the multi-layer heterogeneous volumetric fog blending issue, points out the optimizing methods.Now better fog effect has been gained in practice and the archivement has far-reaching significance to the study of the fog simulation in 3D virtual scene.
Keywords/Search Tags:Volumetric Fog, Multi-layer volumetric Fog, Shader
PDF Full Text Request
Related items