After my post about rendering basics, I had a fairly underwhelming final result: a single triangle being rendered in 3D. But it’s progress! My next goals are to do two seemingly simple things: move the virtual “camera” around my 3D environment to view the triangle from different perspectives, and move the triangle itself to different locations in 3D space.
If we were just writing some graphics library sample code, achieving those two goals would not be too tricky: we could just use some OpenGL convenience methods and objects that provide the math needed. However, if our goal is to build a full game engine, it is better to create our own mathematical constructs that lay the groundwork for 3D world features we’ll want in the future, such as translation/rotation/scaling of objects, and parenting.
One of the first things I need to address is my lack of math library. This post will explore a basic useful math library for a 3D game engine. Future posts will build upon this math library core to add support for 3D vector math, matrices, quaternions, and more!
[Read More]