CST 325 - Graphic Programming (Week 4)

 Rasterization Pipeline


Concepts

Concepts for this week (there are quite a lot to consider):

-          Scene Representation and Geometry Structures: rasterization pipeline is one way to encode geometry and represent scene. To represent geometry (objects), there are two ways: surface and volume. It depends on the application to choose which method to use, each with its own advantages and disadvantages.

-          Graphics Pipeline: sequence to render 3D scene to 2D screen, where output of one is input of another. It starts with geometry, transforms to vertices, constructs primitives, converts to pixels, shades to create the final image. It is done by Graphic API in GPU in special ways to speed up the process. GPU is built specifically for this purpose (heterogenous – modern computing model).

-          Per vertex Operations: a sequence converting from Object Space into Screen Space with many matrices. Object to World with world matrix; World to View (of camera / eye) with view matrix (inverse of camera’s matrix); View to Clip with projection matrix, and Clip to Screen through viewport matrix.

-          Shader: there are Vertex Shader and Fragment Shader. They are special build-in variables starting with gl_ (graphic library). Vertex Shader handles the transformation from local space to clip space with world – view – projection matrix. Fragment Shader computes the color for pixels with variables marked as “varying”.

-          GLSL: a C-based language with functions passes and return by value, special build-in variables, datatypes for matrices & vectors and many useful functions such as dot, cross, normalize, etc. It also has type - qualifiers uniform, attribute and varying.


Application

This week’s material is somewhat abnormal. After viewing all the videos, I felt like I understood the concept of the rasterization pipeline. But then the quiz showed me that understanding the concept was not enough, I need more than that. No matter what, I had to move on to the programming assignment, hoping to put those materials in use and understand rasterization thoroughly.

Once again, similar with the material, the programming assignment is odd. I could follow the documentation and produce the correct output as required. However, I didn’t fully understand many lines of code and connect them with the materials I learned. In other words, the connections were blurry due to too much information with the rasterization pipeline. I found myself lost many times with primitive, vertex, shader and other terms.

So, I turned to ChatGPT to help guild me through it. Of course, I don’t want to depend on AI, and my strategy is to make some guesses, some tries before turning to ChatGPT asking for suggestions. Sometimes it was useful, sometimes I had to solve the problem on my own. However, they were great opportunities for me to fully understand the codes and make connection with this week’s materials.

After all, I managed to complete the programming assignment earlier than I had expected, but I’m still feeling odd, even at this moment. I understand the concept of rasterization and can explain or demonstrate it, but I lack confidence working on the programming assignment or coding with it. I guess maybe after a few more practices, then I can fully handle the rasterization pipeline.


Visual Documentation























Comments

Popular Posts