Open comments for this post
I added skeletal animation blending! This wasn’t needed before as there was only one animation (running) but I have added an idle and a flying animation. There’s a state machine for the animations that calls PlayBlend on the first frame of the state change. The way the blending works is that there’s a blend factor which goes from 0 to 1. It lerps from 0 to 1 on a set duration which you can specify for how fast or slow you want the animation to blend. It then lerps from all the positions, rotations and scales of the different bones of the two animations according to the blend factor. By the way, the flying animation is one frame pretty much so the blending is doing all the work in transitioning from and to it. The player also smoothly slerps to the direction you’re moving in, except if you’re moving backwards because that looks weird.
Open comments for this post
There were lots of issues with the model loading before and I managed to import an FBX file that I exported from a blender project and got it animating in the engine. But besides that I made a character controller, there’s a capsule rigidbody attached to the player and two components, a movement component and a camera controller component. The camera controller sets the camera on the player’s head and also a little bit in front of it so you don’t clip in the player’s head and the movement component allows you to move with WASD. The movement is utter garbage however as I only made it with forces, I will improve it and add drag later. Also the thought behind the player being visible is: 1. Because of immersion and 2. I want the game to be multiplayer and adding player models beforehand will be very useful.
Open comments for this post
Physics! I integrated the Jolt physics engine into the project. I’ve used Jolt for my other projects so it was pretty quick to get up and running. I made a debug renderer system which makes and draws a wireframe depending on the collider type. There are four types of colliders currently, box, capsule, sphere and mesh. The mesh collider is unfinished, I will implement that when I actually need to implement terrain meshes and colliders.
Open comments for this post
Skeletal animations! I reused an implementation of skeletal animations from one of my old projects. In the shadow mapping vertex shader, I have also added the transformation of vertices by bone matrices to capture the shadow of animated objects.
Open comments for this post
I’ve finished implementing PBR rendering with the Cook-Torrance BRDF. I’ve also added normal and roughness map support. Other maps are unnecessary for the renderer.
Open comments for this post
I’ve started work on the 3d engine for the game I’ll be making. For the first day, I’ve implemented cascaded shadow maps where there are multiple shadow maps taken at different distances to create a hierarchy of resolution. And I’ve also implemented blinn phong shading. I plan to change this to a PBR pipeline later down the road.