DevLog 2: 3D Graphics


Triangles are used instead of squares in 3D graphics because triangles have three points. This helps keep things simple because it means that only one plane can be drawn from these three points. Triangles are the most minimalistic shape that we can use to create a plane. 

Both Painter's Algorithm and Z-Buffer are used to determine which polygons to display on a 2D screen when the scene is in a 3D setting. However, these two methods differ in the way they do this. Painter's Algorithm measures the distance away a polygon is from the camera. Then, it fills in the polygons that are furthest away first and gradually fills in the polygons that are closer afterwards. Z-Buffer, on the other hand, gives each pixel in a polygon a number (the distance between the polygon and the camera). It then moves on to the next polygon on the list and overwrites it if the new number (the distance) is smaller. Then, after all of the pixels are assigned a number, the polygons are filled in. Every pixel that is not a part of a polygon is given the value of infinity. 

I am unsure of this is the proper way of answering the question, but I believe the surface normal of the floor would be (0,1,0) because it is facing up. The surface normal of my face would be (0,0,1) because I am facing forward. 

There were two moments in the video where I thought "wow that makes a lot of sense." The first moment was when the video talked about scanline rendering. Before, I didn't really know why older games looked so fuzzy and why fonts looked super pixelated when you zoomed in on them, but now, it makes a lot of sense. The second moment I had a eureka moment was when the video talked about back-face culling. As a gamer, I've definitely witnessed experiences where I glitch through an object in a game and I'm suddenly looking at a big blank space of nothing. I now realize that this is because game developers cut the textures on the back of objects out so that they could better optimize their game. 

Leave a comment

Log in with itch.io to leave a comment.