Font Size: a A A

Realistic Simulation Of Real-time Ocean Based On Shaders

Posted on:2016-01-12Degree:MasterType:Thesis
Country:ChinaCandidate:P Z GuoFull Text:PDF
GTID:2308330479451066Subject:Computer technology
Abstract/Summary:PDF Full Text Request
With the continuous development of graphics hardware, large-scale real-time ocean simulation has been widely used in games, military simulation, movies, virtual reality and other fields. But unlike other objects, the randomness of maritime movement and the extensity of the render scene make ocean simulation still a hot spot on improving both the real-time performance and sense of reality for many experts and scholars.First of all, this article embarks from the creation of the projected grids, discusses the memory-saving characteristics of the projected grid, systematically expounds a set of ocean height field generation and implementation process including the selection of Phillips spectrum, the calculation of vertical height field, horizontal displacement for choppy wave.Secondly, to solve the problem that too much area of the ocean reflect sunlight and to distinguish the color of the wave peak from the color of the wave trough, this paper modifies the dispersion relationship to increase the frequency of the short-wave and keep the frequency of the long wave relatively constant. This method increases the high-frequency shortwave details and produce small bumps on the grid. It overcomes the defect that Phillips spectrum emphasizes low-frequency long wave and restrains high-frequency short wave. Then according to different ratios that the waves are amplified by,the Phillips spectrum is multi-sampled to form the height field.Then, in view of the complex illumination scene of the ocean surface, this paper analyzes the constitution and calculation method of the illumination model. Then we analyze the contribution of one single pixel of the reflected sky light, the reflected sun light and the refracted light. The lighting calculation cost a lot of computing resources. With the wide application of GPU programmable pipeline, using the programmable ability of vertex and pixel shaders can further reduce the computation time and achieve better real-time performance. On the basis of these theories, this paper proposes a method to improve the water color per-pixel shading combined with the white cover model. Through the transmission ratio and wave steepness, we colour the wave peak and the wave trough respectively to produce different color.Finally, the article analyzes the structure of the programmable graphics pipeline and characteristics of the shader. These are used to calculate the height field and then the data are saved in the texture. According to the execution steps of projection grid calculation, height field calculation, normal calculation, illumination calculation, texture mapping, we design the application framework and illustrate the invoking relations between them. We mainly introduce the water coloring algorithm implementation, which completely rely on the GPU for data calculation and drawing. The program is run under different dispersion relations, coloring models, levels of wind and weather conditions, then we compare the results with the work of predecessors.
Keywords/Search Tags:ocean simulation, dispersion relationship, Phillips spectrum, stage sampling, choppy wave shading
PDF Full Text Request
Related items