Exploring Computer Graphics: Fortnightly Chronicle #8
Tags: computergraphics, learning, computerscience, rust
Published: 2024-02-08 15:10:14

## Overview

Hello everyone, in these recent weeks I've decided that instead of stressing myself for trying to write this chronicle every single week (without much success recently), I will write it every 2 weeks. This will give me more time to space out the tasks that I want (and I'm actually able) to complete each week. Renaming the entire series in every platform I publish is kind of a hassle so the only change will be in the title. On another hand, I wasn't able to advance in my journey into OpenGL project this past couple of weeks, which is why there isn't a section for that project in this fortnight's chronicle. With this news out of the way, let's go into the progress I made!

## My Journey into Computer Graphics

I read all the chapters related to the viewing system in [**The Graphics Codex**](https://graphicscodex.com/)**,** [**Fundamentals of Computer Graphics (5th edition)**](https://www.goodreads.com/book/show/57281611-fundamentals-of-computer-graphics) and [**G**](https://www.goodreads.com/book/show/5805892-graphics-and-visualization?ac=1&from_search=true&qid=5CkVwF82Ot&rank=1)[**raphics and Visualization: Principles & Algorit**](https://www.goodreads.com/book/show/57281611-fundamentals-of-computer-graphics)[**hms**](https://www.goodreads.com/book/show/5805892-graphics-and-visualization?ac=1&from_search=true&qid=5CkVwF82Ot&rank=1). I also completed the antialiasing chapter from [**Ray Tracing from the Ground Up**](https://www.goodreads.com/book/show/2241769.Ray_Tracing_from_the_Ground_Up?ref=nav_sb_ss_1_30). In this chapter, I implemented 3 different techniques for antialiasing: regular sampling, random sampling, and jittered sampling. To test the differences, I compared each method by raytracing a single sphere and a Sinusoid function with 1, 4 and 16 samples per pixel. Overall, the best results were obtained by using jittered sampling. Below you'll be able to see a side-by-side comparison of the difference between using different samples per pixel for each method when raytracing the single sphere. Besides, I also created a comparison between each method when using 16 samples per pixel.

### Regular Sampling

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1707346483833/28f7176e-506f-45b1-9fd8-796227604679.png?auto=compress,format&format=webp align="center")

### Random Sampling

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1707346494175/e08b4665-0f0d-485a-8f81-6c5d09226c97.png?auto=compress,format&format=webp align="center")

### Jittered Sampling

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1707346509289/61de7e59-3535-4a8a-a13e-214c2cddcb1f.png?auto=compress,format&format=webp align="center")

### Methods comparison for Single Sphere

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1707346518432/7ac375fb-be17-4378-b0e8-152b0ba7914a.png?auto=compress,format&format=webp align="center")

### Warning!

**As a heads-up warning, the comparison image of the raytracing of the sinusoid function can cause some dizziness for some people. Please watch it at your own risk or feel free to skip the following subsection entirely.**

### Methods comparison for Sinusoid

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1707346742489/2124d0a0-aa62-4b6a-a51b-193a32574d51.png?auto=compress,format&format=webp align="center")

## My Journey into Shaders

For this project I finished reading [**The Unity Shader Bible**](https://www.goodreads.com/book/show/61969779-the-unity-shaders-bible). I generated the following image while following the surface chapter.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1707344579931/fbb865bf-cf07-4a89-a3f8-edeaccd9741b.png?auto=compress,format&format=webp align="center")

However, I later decided to just take notes while reading the rest of the chapters. At least for the foreseeable future, this is how I plan to continue with this project, by just taking notes of what I learn. Mostly because the resources I'm using apply for very specific use cases and I'm just interested in knowing that they exist and that I can refer back to a specific resource if I want to apply it someday.

## See you in a fortnight!

Here are my next goals for each project:

* **My Journey into Computer Graphics:** Complete the perspective viewing & practical viewing system exercises from [**Ray Tracing from the Ground Up**](https://www.goodreads.com/book/show/2241769.Ray_Tracing_from_the_Ground_Up?ref=nav_sb_ss_1_30).
    
* **My Journey into OpenGL:** Complete the remaining lighting sections in [**LearnOpenGL**](https://learnopengl.com/).
    
* **My Journey into Shaders:** Watch the videos about lighting and tri-planar projection from [**Ben Cloward's Shader Graph Basics YouTube playlist**](https://www.youtube.com/playlist?list=PL78XDi0TS4lEBWa2Hpzg2SRC5njCcKydl)**.**
    

See you in a fortnight!