Sausage64


Released: September 20, 2021
Tags: C, C++, Python, Blender, 3D Modeling, 3D Animation, wxWidgets, OpenGL, Libultra, Libdragon, Azure Pipelines

Back when the console was relevant, developers had a few options for getting their 3D models on the N64. Nintendo provided some plugins for 3DS Max and for SoftImage3D, as well as a version of MultiGen called NinGen. These would export models into a bunch of C data structures which were parsed by some libraries for the N64 included with these plugins. Nintendo later also provided a custom binary model format (as well as tooling to export them from your modeler, and a library to use them in your game) called NIFF which allowed the user to embed extra data such as lighting and cameras. Getting a copy of these tools, however, is difficult... and the user experience of these 3D modelers is, to put it as nicely as possible, horrible. So I decided to write my own model system, especially since there weren't any good community tools for the job at the time.

Sausage64 is a suite of tools to allow users to bring their animated 3D models from Blender over to the Nintendo 64. The suite contains a Python plugin for Blender 2.7 and later, a previewer tool written in C++ using wxWidgets with OpenGL, a parser tool written in C, and finally the N64 side of the library (also written in C). The library supports the models exported as either a array of C data, or in a custom binary format. It also provides support for animation blending + interpolation, animated textures, billboarding, and bone manipulation at runtime. The project is also extensively documented in order to allow users to extend and improve the library and/or tools.

During the N64 era, it wasn't very common to use skinned models in your games. The microcode provided by Nintendo for the "GPU" didn't really support it (you can actually do it by abusing the fact that vertices loaded into the vertex cache are transformed by the matrix stack first), and it was kinda wasteful to do vertex transformations on the CPU. So instead, it was very common for models to be made of lots of smaller individual meshes, with each mesh assigned to a single bone. This gave models of the era a distinctive appearance, not too dissimilar to how a link of sausages looks... Since my model format commits 100% to this stylistic choice, it allows for all sorts of optimizations to be made to the model, like being able to avoid the matrix stack entirely. This allows models to be separated by materials, meaning that loading textures can be done very optimally via a render graph.


Return to projects