Exploring Computer Graphics: Chronicle #9
Tags: computergraphics, learning, computerscience, rust
Published: 2024-03-20 04:00:12

## Overview

Hello everyone, it's been almost 2 months since the last computer graphics chronicle. During this time, I've made some progres in my projects, but I've also made some important decisions regarding how I plan to continue with this series. First of all, I decided to archive for the time being my journey into shaders project. I realized that I was really dragging it out because I felt like I was just watching a bunch of tutorials that I probably won't be applying anytime soon.

The second change is that I'm going to be dedicating less time to this series and to all of my computer graphics projects. Until recently, these were my main "free time" projects. However, I recently decided to focus most of my free time that I dedicate to projects to video game development. I will probably share more about those projects in their own blog posts when the time is right. Meanwhile, I'll continue writing this computer graphics chronicle whenever I finish the next part of each of my journeys. Hopefully, this will happen every couple of weeks but sometimes it might take a bit longer.

Anyways, with this news out of the way, let's get into the progress I made!

## **My Journey into Computer Graphics**

### Reading materials

To make things go smoother in this project, I decided that I'm going to finish reading all of the material even if I don't apply the theory right away. This will allow me to get at least an introduction to all of the basic concepts, which was the initial goal of this journey. I finished reading [**The Graphics Codex**](https://graphicscodex.com/) and I will finish the rest of the books so that I only have to focus on the implementation part. The books that I still have to finish are:

* [**Fundamentals of Computer Graphics (5th edition)**](https://www.goodreads.com/book/show/57281611-fundamentals-of-computer-graphics)
    
* [**Graphics and Visualization: Principles & Algorithms**](https://www.goodreads.com/book/show/5805892-graphics-and-visualization?ac=1&from_search=true&qid=5CkVwF82Ot&rank=1)
    

### Raytracing From the Ground Up

For the implementation part of this project, I will continue to read and complete the 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). This time, I completed the viewing system chapter where I had to implement a very simple perspective viewing system. I tested it by rendering one of the scenes from the starting chapters (which I cover in more detail in the [Chronicle #7](https://eric-buitron.hashnode.dev/exploring-computer-graphics-weekly-chronicle-7?source=more_series_bottom_blogs#heading-ray-tracing-from-the-ground-up-in-rust)). I placed the eye point of the perspective system at the coordinate (0.0, 0.0, 500.0) and changed between these 3 viewing distances:

* Viewing distance of 200.0
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1710906135615/162a30fa-22bf-4892-b16d-fc13aaacdaae.png?auto=compress,format&format=webp align="center")
    
* Viewing distance of 400.0
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1710906139607/2ce7ff7b-b7fe-405f-9954-ba197d8f7d01.png?auto=compress,format&format=webp align="center")
    
* Viewing distance of 800.0
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1710906144057/2e1161a5-d45e-46ae-b868-87c1575b3332.png?auto=compress,format&format=webp align="center")
    

## My Journey into OpenGL

### Learn OpenGL

I completed the lighting maps section from [**LearnOpenGL**](https://learnopengl.com/)**.** In this section I first added diffuse maps to the scene.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1710906287244/aafe053f-86b8-4d1e-ad3b-9ac6ce63cf4c.png?auto=compress,format&format=webp align="center")

Then I added a specular map which allowed me to define a different shininess for the metallic part of the box.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1710906343215/715b880a-997b-4218-8889-f594ac9753a5.png?auto=compress,format&format=webp align="center")

Then I added an emission map which represents textures that are always lit up.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1710906370915/70265dae-4ad9-4c74-8375-0cbb17a339ed.png?auto=compress,format&format=webp align="center")

### Udemy course

Meanwhile, in the [**Computer Graphics with Modern OpenGL and C++**](https://www.udemy.com/course/graphics-with-modern-opengl/) Udemy course, I completed some of the lighting sections. First, I added ambient lighting to the scene. Remember that ambient lighting simulates the constant light that is always somewhere in the world (either from the sun, moon, or other distant light).

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1710906446251/f1969089-9a46-4155-86a6-84445d0527d1.png?auto=compress,format&format=webp align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1710906451549/36da403f-153e-498a-ada9-e94c964f043e.png?auto=compress,format&format=webp align="center")

Then I added diffuse lighting. Remember that this type of lighting simulates the directional impact that a light has on an object.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1710906464231/827b5bd8-2c87-49b0-b205-f401fc3ff4da.png?auto=compress,format&format=webp align="center")

Finally, I added specular lighting. Remember that this type of lighting simulates the bright spot of a light that appears on shiny objects.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1710906478093/371f62e1-16b8-4d6c-b6c6-7f135273229b.png?auto=compress,format&format=webp align="center")

## See you soon!

Here are my next goals for each project:

* **My Journey into Computer Graphics:** Finish reading all of the reading resources and complete the practical viewing system exercises from [**Ray Tracing from the Ground**](https://www.goodreads.com/book/show/2241769.Ray_Tracing_from_the_Ground_Up?ref=nav_sb_ss_1_30) **Up**.
    
* **My Journey into OpenGL:** Complete the remaining lighting sections in [**LearnOpenGL**](https://learnopengl.com/) and the Udemy course.
    

See you soon!