University of Pennsylvania, CIS 560: Introduction to Computer Graphics
- Bowen Deng
This project includes two parts of work. One is a C++ based rasterizer, which is capable for rendering 3D objects with multiple reflection models. Another one works with OpenGL, and utilizes different vertex and fragment shaders to achieve interesting visual effects.
For a 3D object loaded from OBJ files, firstly it will be projected to the screen through the model-view-projection transformation. Then the rasterizer performs triangulation on its faces, and scans line by line to determine where such triangles start and end at each line. The color of a pixel is computed by barycentric interpolation.
Several kinds of refection models are embedded.
- Line Rendering
- Blinn-Phong Model
- Lit Sphere Model
- Toon Model
A polar spherical camera is applied to provide interactive controls.
Some interesting shading achieved with vertex shaders.
- Blinn-Phong Reflection Shader
- Matcap Reflection Shader
- Iridescent Shader
- Deformation shader
Cool effects made with fragment shaders.
- Greyscale and vignette Shader
- Gaussian Blur Shader
- Sobel Filter Shader
- Bloom Shader
- Worley Noise-Based Shader
Of course, the surface shaders and post-process shaders can be combined to create more crazy results!