CST 325 - Graphic Programming (Week 2)

 

Concepts

-          Ray Tracing: distribution ray tracing, path tracing, ray-triangle intersections, resolutions and performance scaling.

-          Basic ray tracing: it’s not a rendering algorithm, but basic for anti-aliasing, bounding, reflection, refractions, shadows. First use in computation form in 1968 and conceptualized since 1980s. Shooting a ray from eye through each pixel on window to determine color for each pixel and create the computer-generated image (CGI).

-          Distribution ray tracing: created in 1984 by Cook Stochastic, where shadow rays are shot out randomly to make soft shadows. This is ideal for motion blur and glassy surface, but it is costly.

-          Path tracing: created in 1986, also known as Kajiya-style. Multiple rays are shot at different locations in each pixel, which create more rays with random paths. Everything is added up, calculated and get the color for the pixel.

-          Ray-triangle intersections: algorithm in 3D environment to reduce calculation’s cost of ray tracing significantly. The environment is divided into smaller boxes and put into Bounding Volume Hierarchy. Using BVH traversal to quickly find the triangle surface that they ray hit to do the calculation.

-          Resolutions and performance scaling: each pixel (picture element) contains color arrangement. Different devices have different arrangements to display the color. The rendering, which is the computation cost, scales proportional with number of pixels and number of objects. When the resolution increases, the cost increases quadratic.


Application:

The second week of CST 325 was fascinating with the learning materials and the programming assignment. I surely had a lot of fun, even though the assignment posed a challenge.

First, the programming assignment is tightly related to this week’s material: the basic concept of ray tracing. Of course, the idea of shooting a ray through the screen to see if it hits any object. Therefore, the first few steps of the assignment were not a big deal for me. And I thank my own experience working on Unity’s projects for that.

The second phase was when I started working on the shadow. This phase was more complicated with many calculations and logics to think about. However, by studying the materials carefully and understanding the concept thoroughly, I was able to get through it. But I accidentally created some interesting results because of some miscalculations along the way.

The third phase was the most challenging with adding the Cornell box. Not just that I had to deal with multiple planes, but I have to restructure my codes to work with them. Of course, working on large Unity projects, restructuring my codes is not something new. However, the problem started because I did not visualize the planes for the box correctly (the direction they are heading). Thanks to the ChatGPT, I found my mistakes, fixed and understood what I need to do. I will never get used to the feeling of solving the problems, watching the results as the program is running. That experiment is always rewarding.


Visual Application:

























Comments

Popular Posts