Tristan Marrec

Computer Graphics Programmer
Home
LinkedIn
Email contact@tmarrec.dev Updated

[ My First Rendering Engine! ]

For my Master's degree in Computer Graphics, I made a basic OpenGL renderer in C++. Over the course of two years, I implemented some of the basics I had learned in class.

Code available on GitHub or download ZIP.

Here is what I implemented.

[ Blinn-Phong reflections ]

Blinn-Phong shading is a basic model that nevertheless produces surprisingly satisfying results. Here are some examples of light reflections using this model.

[ Omnidirectional shadow mapping ]

When it comes to having point lights in a scene, simple shadow maps are not enough, as shadows are omnidirectional. Generating a depth map from the perspective of the light in a cubemap solves this problem. However, this involves rendering the scene 6 times per point light.

[ B-Spline surfaces ]

By discretizing B-spline surfaces into vertices at a chosen frequency, I can generate meshes from parameterized smooth surfaces. Like this terrain, for example.

[ Mesh subdivision ]

To subdivide mesh geometry, I used the Uniform Loop subdivision algorithm from the OpenMesh library. The vertex-normal debug visualization uses a geometry shader.

[ Implicit surfaces ]

Implicit surfaces are rendered using the Marching Cubes algorithm to generate the mesh on the CPU at runtime. Although it looks nice, performance quickly becomes poor as the grid size is increased.

[ Skeletal animation ]

Meshes can be rigged with hierarchical bones for animation. To do this, I use the linear blending skinning algorithm, which unfortunately can easily produce candy-wrapper artifacts (not visible on the example images, as I wanted to hide it on my project report).

[ glTF loading ]

Using the glTF 2.0 Quick Reference Guide, I've started to implement a .glTF scene loader. Unfortunately, it's incomplete, as it doesn't cover the entire specification.

[ References ]

  1. Blinn-Phong reflection model - en.wikipedia.org/wiki/Blinn%E2%80%93Phong_reflection_model

  2. Point Shadows - learnopengl.com/Advanced-Lighting/Shadows/Point-Shadows

  3. B-Spline Surfaces - pages.mtu.edu/~shene/COURSES/cs3621/NOTES/surface/bspline-construct.html

  4. OpenMesh - graphics.rwth-aachen.de/software/openmesh

  5. Implicit Surfaces - paulbourke.net/geometry/implicitsurf

  6. Direct Skinning Methods and Deformation Primitives - skinning.org/direct-methods.pdf

  7. glTF 2.0 Quick Reference Guide - khronos.org/files/gltf20-reference-guide.pdf