Select Page

Taming Project Cerberus: Anatomy of a VOX

April 10, 2024
Project Cerberus is the in development VOX prototype game that will bring the web3 Gala avatars into the action for the first time.

Greetings, Ladies and Gentlemen! Allow me to properly introduce myself. I’m Pixelworth, your servant for all matters VOX.

If I may, I would like to share with you the most formidable obstacle with which the VOX team has grappled. The integration of 35,552 uniquely crafted VOX into our game, each as playable as the next, has proven my creators’ most formidable challenge. In customary gaming designs, one might find a modest selection of playable characters, or perhaps a complex system that allows for the meticulous crafting of features like a character’s stature, skeletal structure, cosmetics, and more.

But VOX, I must confess, are quite extraordinary creatures. Indeed, while each has bones and an .FBX model, they are not prepared for the rigors of a robust game universe… yet. I shall elaborate on this matter shortly.

Furthermore, my creators have encountered a rather peculiar conundrum: If our game’s universe is tailored to accommodate beings of human proportions, what is to be done with the likes of dragons, quadrupeds, cranes, and serpents? In a more traditional setting, such entities would scarcely be given a second thought for active participation. Nevertheless, we have given our word, and by jove, we shall uphold it! The VOX shall take their rightful place in the game, come what may. 

Thank you for that introduction Pixelworth. Well spoken, and I hope we pass the audition. 

An Original VOX 

Our little friends are created in a magical laboratory. I’m sticking with that as the absolute truth. It’s what Future Boy told me. The problem with that lab was the original VOX were not created with games in mind. This is a bummer since we all know the VOX want to play. They need to play. But, to get there we had some issues to solve:

  • Poly counts for each VOX were astonishingly high
  • The skeleton structure was very basic
  • Size and shape
  • Wrong format 

These main issues made grabbing a VOX and throwing it in a game engine a suboptimal solution. To be fair, you can grab a VOX FBX, throw it into Unity and get it to work just fine, but the problems start when there are ten VOX on a screen. And if ten are a problem, what about twenty? One hundred? And this goes with all the VOX objects created in the ‘before times’. 

Taking a VOX Through the Process

The fundamental problem is this: In a game engine if I make a cube, it will have six sides only with nothing inside. The game engine only cares about the outside of the cube. So it’s eight vertices that need attention, practically free from a rendering point of view in any modern game engine. Well, with VOX and the way they were created, a cube is not just a cube. It’s made up of a bunch of little cubes, and all through the model. So eight vertices, right? No, thousands, and with materials on each of those individual cubes, you can see how quickly things become non-performant in a game. 

So we needed a way to fix this. Cull all unnecessary data from each VOX to reduce file size and at the same time regenerate the geometry so that it looks like the original. 

I’ll let BigMonet explain how the GeoProcessor Tool works. 

  1. Ingest an existing VOX .fbx file
  2. Scale input geometry to a specific scale.
    1. This ended up being a big deal because of the way the VOX were made. The more detail the bigger they get. We needed our VOX friends to follow rigid sizing for game reasons. 
  3. Delete unnecessary attributes inside the imported geometry file
    1. This step greatly reduces the file size of the exported .fbx file
    2. This step also reduces the time the tool takes to cook the outputs
  4. Clean up bad geometry
    1. Remove faces and edges with 0 length
    2. Fix overlapping geometry 
    3. Repair non-manifold geometry
    4. Fuse together unwelded verts
    5. Remove points not connected to any adjacent faces
    6. Flip all normal vectors outwards
  5. Target polygon reduction of 95%
    1. The target reduction is very aggressive.
    2. Constraints are used to ensure border edges are never changed.
    3. The aggressive target reduction + constraints ensure the geometry reduces as much as possible without changing the shape of the original model. Thus, the model will appear unchanged! 
  6. Layouts non-overlapping UVs
    1. UV coverage is greatly influenced by the padding of the UV shells.
    2. Larger padding might be required for smaller textures to prevent textures bleeding from one shell to adjacent shells.
  7. Cleanup of attributes
    1. Attributes created for the GeoProcessor tool are removed from the final output..
    2. Normals are applied to geometry faces.
  8. Texture Baking + Outputs
    1. The materials colors on the original VOX are baked into a texture and applied to the optimized mesh.
    2. Texture outputs are saved to disk.
    3. Optimized geometry is saved to disk.

For each vox, this process took about 15-30 seconds and for all 35,552 VOX the total time to process them using this tool took about 72 hours. 

The geometry and materials are all figured out. But these bones. For our intrepid animator these bones didn’t allow him to do cool stuff. We also wanted the ability to resize large or small sized humanoids to use the same rig for animation without looking whacky. 

This is where the ‘Skeletorr’ tool made by Reynarzz for Maya comes in.

This tool not only takes the VOX with the old bones and updates them to the skeletons we can use, but also takes an animation in .FBX format and converts it for the small, medium and large VOX. This saves a lot of time for our animators, since they’ll only have to do the animation once and the tool will make it compatible with the other types of skeletons.

Here is a step by step:

Rigging:

  • Load the T-pose of a model we want to use as a target and export this information as a .TPR file (we are using three types of models: Small, medium, and large, but we can use more if we want).
  • Use the information from the loaded T-pose (.TPR) to apply this pose to models that meet parameters such as size and body proportions.

Animation retarget:

  • Select the animations in .FBX format that we want to retarget and choose which T-pose they belong to by loading the .TPR file. This will convert the .FBX animations into intermediate .ANR format (animation reference), which will be used to retarget others types of skeletons (small, medium or large).
  • Go to the “Retarget Animations” window, select the target skeletons on which we want the animations to work. We select the animations in .ANR format and the tool will take care of the process of calculating where each bone of the target skeleton goes, depending on each frame of the animation.

The End result is…

Quadrupeds, Dragons and Snakes… Oh My!  

The last part we needed to figure out is the around 200+ non-standard VOX out there (quadrupeds and dragons for example). 

For this example we will use CraneBot. Obviously a Crane is huge, so fitting through doors and doing things like other VOX becomes either impossible, or very time consuming development-wise. Figuring out a full rig and a full gameplay-ready set of animation is all about figuring out the size. But we have a promise to keep. All VOX are playable.

We tried to do a resize, but that didn’t solve the problem of unique bones and animations for almost 300 VOX– too many for our team to upkeep as new playables complete with animations.

We considered that maybe these VOX were just “pets,” or useless the same way as the Gonk Droid was in the Lego Star Wars games. We didn’t like that either. 

Look at that useless Gonk!

So we made biped versions for all the problematic VOX… 

This is our solution to CraneBot 

Now in Project Cerberus (and any VOX game going forward), we can look at a wallet, make a call to the api and pull the correct owned VOX. For a problem that started with a few of us crying under our desks, to the elegant wizardry of our Tech Art and Engineering teams pulling off this miracle is frankly quite impressive.

Going forward we know the technical specs we want for VOX and VOX assets, so anything new we make shouldn’t need to go through all these processes to be game ready. It’s also pretty awesome that we have the VOX in a place where using them all across the Gala ecosystem should be much easier. You can bet that VOX will show up in another Gala experience real soon.

Thanks for reading, and we’ll see you again soon for more exciting angular updates from Project Cerberus, VOX and beyond!