In the first project you will develop a simple renderer that will later allow you to explore physically based rendering techniques.
You should use your scan line polygon fill implementation as the back bone of your software. (Check section 4.10 in Hearn Baker and section 3.6 in Foley et.al).
Your scene should consist of a single test object such as a polygonal sphere.(keep in mind that with small subdivisions you can get better rendering results). Polygonal data should be kept in a vertex-face table (Hearn Baker page 130). As the first step you should carry out the viewing transformation to move the object into the viewing coordinate system. Ideally, you should have an interactive way of setting the camera position and other parameters. Next step is the perspective transformation. To keep things simple we will forget about 3d clipping and make sure that the whole of the object is always visible. Initially render your scene using fixed color values for different faces. Once you get this going, you can start looking into implementing the Phong Model. Here you have to set parameters for light source(s). Now, you should get the color values for the vertices
from the illumination model and you should interpolate for the values between vertices (Phong Shading). Do not forget to do back-face culling to eliminate the faces looking away from the viewing direction.
|