Programming
Vertex Animation Texture
Making the texture
While being keen on increasing performance I scoured through the internet for more possible and fun ways to do this. I came across a technique to write all the matrices for the animated models' bones into a texture. Since this sounded like fun I implemented it to enable instanced skeletal meshes as well.
​
This is made possible by taking each bones transformation in a frame and writing the matrix data into a texture. The data is then uploaded to the graphics card to be first read and then calculated.
Reading the texture
The texture is read from left to right and each row in the texture are the bone matrices of one enemy. This gives the possibility to pack around 16000 enemies data into a single texture. This would make the GPU a very tired GPU so I limited myself to 1500 enemies in one texture when writing the data.
Current problems
Currently when reading the positions and calculating the normals of the enemies they are wrong. Something I would like to fix as soon as possible to make this a viable use for environmental animation.


How the texture looks when containg 1500 enemies
Binary template writer and reader
Reason for making this
While working on our sixth game project we noticed that the loading times for the levels was particularly taxing during debug mode. This was in part of us reading a JSON file do acquire the data for the level. I then wrote a binary read/write template class to be able to take the data and read it from a .bin file instead. This made the load time nine seconds shorter when loading them in debug mode. This saved many hours for our team since every time someone booted a level we had nine seconds less of wait time.
How it works
It simply takes a data type and writes it to binary. It is mostly an automated process and easy to get a hang of.
Important things to think about though is that if anything is in a struct you have to manually write a new function to serialize and deserialize the data because of the way the template class is set up. I haven't found a way to automate the serialization and deserialization of structs but that would be a next step in making this more useful.