Exploring Computer Graphics: Weekly Chronicle #5
Tags: computergraphics, learning, computerscience
Published: 2023-12-23 18:09:21

## Overview

Hello everyone, it's been a while since the last weekly chronicle. I've had a busy couple of weeks while closing the year. Here's the progress that I've made in the past few weeks!

## My Journey into Computer Graphics

I halted for a moment the meshes project to focus on doing readings that related to my progress in my journey into OpenGL. I read the following chapters from my resources for this project:

* Linear algebra
    
* Transformation matrices
    
* A camera model
    
* Viewing
    
* Tone reproduction
    
* Data structures for graphics
    

## My Journey into OpenGL

The focus of these past weeks was setting up cameras. First, I followed the cameras tutorial of [**Learn OpenGL**](https://learnopengl.com/)**.**

The first part that I did was applying a projection matrix to the container.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1703351544714/aa30b1fb-2ec5-4bda-882f-7df8a9a4ce14.png?auto=compress,format&format=webp align="center")

Then, I converted the container into a cube and added depth testing.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1703351583352/2887f8db-d1a9-4f96-aa59-1c68ad7fd592.gif?auto=compress,format&format=webp align="center")

I then added several cubes and applied rotation transformations to them.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1703351615236/21b47d67-51ab-46b9-a605-012faa1d7dc9.gif?auto=compress,format&format=webp align="center")

After that, I played with the camera circling around the cubes.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1703351694617/fd56c33c-5051-436e-a2bd-c69b633036fd.gif?auto=compress,format&format=webp align="center")

With all of this setup done, I added the code to have a camera that you can move and rotate around the scene.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1703351839638/414d7889-94f4-48cc-a088-8e82212a7dc1.gif?auto=compress,format&format=webp align="center")

In the Udemy course I followed basically the same steps and ended up with this:

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1703352051797/8730b931-6b60-4cc4-9c14-a5d61169360f.gif?auto=compress,format&format=webp align="center")

## My Journey into Shaders

For this project I watched all the videos regarding the use of math functions for shaders. I learned how they can be used to create different effects in shaders. I also added the shader that I made with the [**Introduction to Shader Art Coding tutorial**](https://www.youtube.com/watch?v=f4s1h2YETNY) in Godot and in Unity.

Here's how it looks in Godot:

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1703352385102/3bb115a1-770d-4b52-94eb-c189a4c16e42.gif?auto=compress,format&format=webp align="center")

And here's how it looks in Unity:

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1703352627965/797a78f6-9da5-4c4c-a732-9f1673eeb5bf.gif?auto=compress,format&format=webp align="center")

For some reason, in Unity the animation moves painstakingly slow. I'm not sure if it's a performance problem or if it's something else but for now the goal was just to show that the same shader can be used in any engine.

## See you next year!

With the year coming to an end, it's time to spend some time with the family and relax a bit. This is going to be my last blog post of the year. I'll see you next year with these goals for the first week of January:

* **My Journey into Computer Graphics:** Continue where I left off in the [**meshes project**](https://graphicscodex.com/projects/meshes/index.html).
    
* **My Journey into OpenGL:** Complete the texture mapping videos in the Udemy course and the colors tutorial in [**LearnOpenGL**](https://learnopengl.com/).
    
* **My Journey into Shaders:** Learn about shader performance, shaders coding style and start the algorithmic drawing chapters from [**The Book of Shaders**](https://thebookofshaders.com/)**.**
    

With all of this out of the way, I wish everyone Happy Holidays and a Happy New Year!