Font Size: a A A

Research On Real-time Lighting And Shadowing Algorithms Based On GPU

Posted on:2010-09-22Degree:MasterType:Thesis
Country:ChinaCandidate:F YuFull Text:PDF
GTID:2178360272497168Subject:Computer application technology
Abstract/Summary:PDF Full Text Request
Images are the main media with which people recognize and develop understanding of the world, which contribute to all the information we perceive by about seventy percent according to scientific research. Today's world is full of computer multimedia contents; and as a newly-born subject concerning how to use computer to generate images, computer graphics has been playing more and more important role in our life. And realistic image synthesis has been an important research area of computer graphics. What realistic image synthesis addresses it how to get a photorealistic image from a given scene, which generally contains various objects with their position, magnitude, and material properties, lights, and a virtual camera through which we take a look at the scene. An important research object is to simulate physics-plausible lighting and shadowing effects. With light, people can be aware of the existence of objects and can recognize the geometrical properties of it; moreover, physics-plausible lighting effect could make we understand the material properties of objects in the scene. Shadows can convey the spatial position and the geometrical properties of objects. Realistic lighting and shadowing effect can improve sense of reality and immersion dramatically. Among many realistic image synthesis methods, raster-based algorithm is the most popular due to the fact that it's the only method which can generate realistic image interactively. Over the past decades, raster graphics hardware has been perusing high performance. And in recent years, people have been striving for image quality, leading to the development of programmable GPU. The merit of programmable GPU is that it enables graphics engineers to develop their own shading algorithm using GPU languages to customize specific functional stages. With non-program- mable graphics hardware, we must invoke a lot of APIs to get it support lighting and shadowing effect, and the quality is totally dependent on the implementation of these graphics hardware, giving no opportunity to control the computing detail. However, the programmability provided by programmable GPU allows us to define or optimize specific lighting and shadowing algorithms using GPU language.The research subject of this paper is proposed under this kind of circumstance. And we first do a thorough research into the theory of lighting and shadowing algorithms which are popular these days; then we focus on the implementation of these algorithms on programm- able GPU which isn't available in fixed pipeline, and move some computation which origi- nally take places on CPU to GPU to optimize these algorithms, reducing complexity of im- plemenation and improving the performance. Also, we implemented some anti-aliasing alg- gorithm for shadowing.In chapter two, we discuss the importance of lighting and shadowing effect in realistic image synthesis, and we also conclude the role they play in realistic image synthesis. Then we give an overview of the fundamentals of lighting and shadowing algorithms in raster graphics, including raster method, visibility determination and anti-aliasing techniques. Being familiar with these is essential to understanding lighting and shadowing algorithms, especially for shadowing algorithms. Moreover, we give a brief description of rendering equation, an unified rendering method, which can guide us when we do research on lighting and shadowing algorithms.We get deep into popular lighting algorithms in chapter three; and we find that it's not that difficult to implement the traditional lighting algorithm on programmable GPU. But after examination, we found that using traditional lighting algorithm alone won't give physics-plausible lighting effect due to the fact that traditional lighting algorithm doesn't take into account the spatial property of light transport and the interaction between light and material. It is a simple lighting algorithm, which is dedicated to the ideal diffuse and specular surfaces. Then we examine the lighting algorithm based on bi-directional reflectance distribution function, which overcomes the drawbacks of the traditional lighting algorithm. In our experiment, we utilize the acquired BRDF data to simulate lighting effect. BRDF is a function that takes four parameters, but latest graphics hardware doesn't support 4D texture. Therefore, we adopt separation method to use two functions that takes two parameters to approximate the original function and save the result into two 2D textures. The separation is a preprocess; then we use four parameters of BRDF as two pair of texture coordinates to access 2D textures containing the separation result, and use results of accessing textures to compute lighting. The lighting quality got by BRDF-based lighting is better than that of the traditional lighting algorithm. Bump Mapping is an advanced lighting technique to simulate geometrical detail of objects'surfaces. In our paper, we use geometry processor of programmable GPU to compute the matrix used to transform to tangent space for triangular 3D models. With this matrix will be computed in GPU, we don't need to do preprocess of 3D models, reducing the implementation complexity. Also, we discuss environment mapping algorithm, which can simulate light reflection between objects and the circumstance they're in and refraction effect; we use programmable GPU to do reflection and refraction calculation and use these result to access the environment map to get the lighting result.In chapter four, we take thorough research into two kinds of shadow algorithms; one is shadow maps algorithm that is an image space algorithm, the other is shadow volumes algorithm which is an object space algorithm. As with shadow maps algorithm, we transform object space coordinates to light space coordinates on programmable GPU, which is more efficient than using fixed pipeline functionalities. Also, we examine various aliasing problem of shadow maps algorithm, and we make some improvement on these problem with many anti-aliasing techniques. After careful examination on the latest programmable GPU, we found that we could do shadow volume generation totally on GPU with geometry processor. Thus we don't need to do preprocessing with geometry models. And this improvement reduces the complexity of the whole algorithm, and the performance is better.To summarize, we take a deep and thorough research into the theory of currently popu- lar lighting and shadowing algorithms, and then we design and implement these algorithms based on programmable GPU. At last we give analysis of results of experiments. Our work has reference value in research of lighting algorithms, shadowing algorithms, and how to implement them based on programmable GPU.
Keywords/Search Tags:Real-time raster rendering, Lighting, Shadowing, GPU
PDF Full Text Request
Related items