Wii Mesh is a desktop application that converts common 3D model formats into a custom binary mesh format designed specifically for the Nintendo Wii in my Wii 3D engine project. Using Assimp, the tool can import models created in popular software such as Blender, Maya, and 3ds Max, then process and export them into a format that can be loaded efficiently by the engine.
The primary goal of Wii Mesh is to move expensive asset processing tasks from the Wii onto the development PC. Instead of parsing large and complex model formats at runtime, assets are converted ahead of time into a compact representation optimized for fast loading and low memory usage.
- Imports a wide range of 3D model formats through Assimp
- Converts models into the engine's custom
.wmeshformat - Reduces runtime processing requirements on Wii hardware
- Produces compact binary assets optimized for loading speed
- Integrates directly with the Wii 3D Engine asset pipeline
- Built in C++ with Visual Studio
Modern model formats are designed for flexibility and compatibility rather than performance on constrained hardware. Parsing formats such as FBX, OBJ, or DAE on the Wii would introduce unnecessary loading times and memory overhead.
The .wmesh format stores only the information required by the engine, allowing assets to be loaded quickly and predictably on real hardware. This keeps the runtime simple while allowing content to be authored using standard modelling tools.
Wii Mesh does more than simply convert file formats. During export, models are analyzed and processed to ensure they are compatible with the Wii engine's rendering pipeline.
This includes:
- Converting supported model formats through Assimp
- Generating optimized engine-ready mesh data
- Removing unnecessary runtime processing
- Joining identical vertices
- Diffuse materials with metallic and roughness
- Splitting oversized meshes into multiple chunks when required
The Wii engine uses 16-bit vertex indices, meaning a single mesh can reference a maximum of 65,535 vertices.
To support larger models, Wii Mesh automatically partitions oversized meshes into multiple independent chunks during export. Each chunk contains no more than 65,535 vertices and can be loaded and rendered individually by the engine.
This process is completely automatic and requires no manual intervention from the artist or developer.
flowchart TD
A[Large Model] --> B[Wii Mesh]
B --> C[Chunk 1<br/>< 65,536 vertices]
B --> D[Chunk 2<br/>< 65,536 vertices]
B --> E[Chunk N<br/>< 65,536 vertices]
C --> F[.wmesh]
D --> F
E --> F
This allows complex scenes and high-detail models to be imported while remaining compatible with the limitations of Wii hardware and the engine's rendering architecture.
In addition to converting models into the engine's native .wmesh format, Wii Mesh performs a number of optimizations designed for constrained hardware.
By removing unnecessary data, reorganizing mesh information, and storing assets in a compact binary representation, exported models are often significantly smaller than their original source files. Depending on the source format and model complexity, .wmesh files can be nearly half the size of the original asset while remaining fast to load and render.
Benefits include:
- Reduced storage requirements
- Faster loading times
- Lower memory usage
- Minimal runtime processing
- Improved compatibility with Wii hardware
Wii Mesh uses Assimp to import models, allowing it to read a wide variety of common 3D formats, including:
- OBJ
- FBX
- DAE (Collada)
- 3DS
- STL
- PLY
- X
- GLTF / GLB
and many others supported by Assimp.
Before building, install:
Make sure you install the version of Assimp that matches your build target (x64 or x86).
Clone the repository:
git clone https://github.com/DavidSkillman/wii-mesh/
cd wii-mesh- Open
WiiMesh.slnin Visual Studio. - At the top of Visual Studio, switch the build configuration from Debug to Release if needed.
- Open Project > Properties.
-
Set:
- Configuration to All Configurations
- Platform to All Platforms
- In the left panel, open VC++ Directories.
- Select Library Directories.
- Click the dropdown arrow, then <Edit...>
- Add the path to your Assimp installation with
\lib\x64appended.- Example:
C:\Libraries\Assimp\lib\x64
- Example:
- Click OK.
- Still in VC++ Directories, select Include Directories.
- Click the dropdown arrow, then <Edit...>
- Add the path to your Assimp installation with
\includeappended.- Example:
C:\Libraries\Assimp\include
- Example:
- Click OK.
- In the left panel, open Linker > Input.
- Select Additional Dependencies.
- Click the dropdown arrow, then <Edit...>
- Add this line:
assimp-vc145-mt.lib
- Click OK.
- Open your Assimp folder in File Explorer.
- Go into the
binfolder. - Open the
x64folder, orx32if that is the version you installed. - Drag the
.dllfile into Resource Files in the Visual Studio solution. - Right-click the added file and choose Properties.
- Change Item Type to Copy file.
- Click OK.
Once everything is configured, build the project in Release mode.
- The Assimp library, include path, and DLL must all match the same architecture.
- If Visual Studio cannot find Assimp, double-check the folder paths in the project properties.
- This exporter is intended to work with the Wii engine pipeline and Wire3D.
Wii Mesh is designed to be simple to use.
Drag a supported 3D model file onto WiiMesh.exe in File Explorer.
The exporter will automatically process the model and generate a .wmesh file.
You can also run Wii Mesh from a terminal or command prompt.
WiiMesh MyModel.fbxThis is useful for automation, batch processing, and integrating the exporter into build pipelines.
Made with ❤ by David Skillman