Blog post cover

2018-07-21 22:16 - Flashback

Flashback #3: 2016-2017, a new dimension

In an attempt to document my evolution in the environment of computer science, I decided to write a series of flashbacks, where I dive into the traces of my past. Unfortunately an important part of my programs and games has been lost, because I wasn’t proud enough to keep them, or simply forgot to copy all my files when changing computers.

Our last flashback stopped at the time when I was creating apps for smartphones. After a quick part about my prep class, I’ll tell you the story of how I took an interest in 3D, on both technical and artistic points of view.

Prep class, pros and cons

Those who know me know that I usually don’t tell any good about prep class. It would deserve an article of its own but I don’t want to do that slapdash, in order to avoid voicing only my personal feelings, and instead make a thoughtful essay about elitism in education.

However, this time I will mention prep class for another reason: it marked a first turning point in the way I program and approach my CS-projects in general. The Theoretical Computer Science course was my first contact with the science of algorithms, complexity theory, and many notions (programming paradigms, graph theory, languages and automata, etc). I must also mention Peio who taught me a lot through our algorithmic ramblings during long lectures, and also introduced git to me during a project together.

Moreover my intensive education in mathematics gave me the bases necessary to tackle a field like computer graphics, where each paper or book requires a good background in mathematics. Not that I remember even half of what I learned in mathematics, but at least I acquired a relative capacity to read that kind of gobbledygook.

Unfortunately, prep class deprived me of the free time that I was devoting to my personal projects. Not being able to start any major projects, I mostly made small projects directly or indirectly related to my studies. I also made exercices to improve my skills about algorithms, and started at that time taking part in competitions (quite successfully). But I almost didn’t do any creative work in the whole school year 2015-2016

Technical approach of 3D computer graphics

Small home made 3D engine

During my prep class, for the TIPE (Travail Personnel d’Initiative Encadré) (which translates to Accompanied Personal Initiative Work), for which some hours are assigned weekly, I chose to learn more about real-time 3D computer graphics, and make a small 3D engine able to render a scene.

The idea of the project was to reproduce the behavior of a real graphics pipeline as it is done on GPU, but in a Python script and without any graphic libs. The idea might seen stupid because the graphics hardware is optimized for that and extremely parallel, but that was the project: to understand.

To achieve this, I read parts of Mathematics for 3D game programming and computer graphics from Eric Lengyel. I took a lot of shortcuts that I regret now, like not using quaternions for 3D rotations, a very unoptimized system of lights, and not appropriate data structures to store the meshes etc.

But still, the engine is able to render a scene, which includes objects, lights, a camera, and it supports transparency and one color per triangle.

Here is an example of a simple scene rendered by the engine:

Home made 3D engine

And for the record (please don’t throw tomatoes at me), here are the slides of the presentation I gave to show the project to a jury (in French). I have to say that the jury was not made of computer scientists, so I was a bit lost between the risk of taking them for dummies or lose them because of difficulty.

Don’t ask me for the source code, I’m definitely too proud to upload that ugly thingy I wrote more than 2 years ago.

Diving deeper, and internship at Dontnod

During the next few months after the work on the engine mentioned above, I acquired some knowledge about GPU architecture, read more content about the graphics pipeline, shaders, expressive rendering, etc. I also read pieces of Real-Time Rendering.

During my R&D Internship at Dontnod Entertainment in summer 2017, I had the occasion to dive deeper into some topics like angles interpolation methods, the applications of different kinds of noise (like volumetric fog, dithering, procedural generation), etc.

Artistic approach

In an attempt to complete my understanding of real-time rendering and 3D games programming, I challenged myself to learn the techniques of PBR (Physically Based Rendering) and make a realistic scene with that.

So I learned how to use Blender for 3D modeling, and how to create the textures required for PBR (normal maps, ambient occlusion, roughness, metalness, color, etc).

Working with the libre modeling software Blender and the game engine Unreal Engine 4, I chose to make a digital explorable reproduction of my bedroom in Tampere (at least I had the references at my fingertips). This work was very long because every object took half a day on average, to make the modeling and the textures. Here is what the results look like, rendered in real time:

Tampere bedroom scene

If you have Windows and a GPU able to run 3D games, the scene is downloadable here. To run it, you’ll need to install, if not already on your computer, the DirectX End-User Runtime and Microsoft Visual C++ 2015 Redistributable. Then, you just need to extract the archive and execute Bedroom.exe.

I also made, in less than 48 hours for a game jam (Ludum Dare), a small game, nothing crazy but the timing was so short. You can take a look at the download page.

Well, that’s everything for today, thanks for reading!

Log in to post a comment.