CST 325 – Week 5 – Texturing and Transparency

This week, we covered texturing and transparency. We focused on applying textures to objects in the world space. In this world, we also had three spheres of varying transparency, and we had to use the painters algorithm for in order to render the entire scene correctly. You can see the results below!

In addition to the required assignment above, we also tackled some of the extra credit parts of the assignment, animating a texture and using multiple textures. You can see in the rendering below that the texture is not only animated (try not to get sick), but the original texture is blended with another cute bunny texture.

CST 325 – WEEK 4 – Graphics Pipeline

This week, we focused on the Graphics Pipeline and utilized the WebGL API. I’m currently working on the bonus implementations to create a more interesting animation, and will update when I am finished!

WebGL animation

The extension activity this week was to animate the colors based on time. To do this, we needed to add another uniform float (for time) to our fragment shader, which could then receive an incremented time variable from our program. Here’s a cool scrolling effect achieved with the fract GLSL function:

CST 325 – Week 3 – Matrix Operations

This week we covered matrix operations and focused primarily on 3×3 and 4×4 square matrices. For this week’s assignment, we had to implement functions that would compute matrix by matrix multiplication (which, by the way, is only valid if the first matrix is r x n and the second matrix is n x c), vector by matrix multiplication (focusing on row vectors, which must be on the righthand side), as well as calculating the determinant, the inverse and transposition of a given 3×3 or 4×4 matrix. The 1Blue3Brown videos were very helpful this week in illustrating all of these concepts. I also found Desmos helpful.

CST 325 – Week 2 – Ray Tracing

This week we implemented ray tracing to create a 3D scene with depth, lighting, and shading. Since we are building visual abstractions, it is always helpful to draw out what the scene should look like in order to determine the correct values to use. For example, when setting up the Cornell Box with five planes representing three walls, a floor, and a ceiling, it was helpful to diagram this with respect to an x, y, z axis to determine the normal vector (the direction each plane would be facing) and a valid point that falls within each plane: