This tool allows you to extract (most) data from CGFX files. Everything that is extract is placed in a folder named after the original file (without the extension).
This tool wouldn't be possible without the work of many people who have stumbled into this mess before me. In no way would I have been able to make this tool without the information they provided via Wikis or source code. I am in no way trying to take credit for their hard labour, I merely want to make a tool that can be easily used in scripts. A full list of acknowledgments / credits is available below.
- ⭕ General Metadata
- 🚧 Vertex Data
- 🕓 Material Params
- ⭕ Textures
- 🕓 Camera Infos
- ❌ Look-up Tables
- ❌ Shaders
- 🕓 Lights
- ❌ Fogs
- 🕓 Scenes
- 🕓 Skeletal Animations
- ❌ Texture Animations
- ❌ Visibility Animations
- 🕓 Camera Animations
- ❌ Light Animations
- ❌ Emitter Data
⭕ implemented , 🚧 work in progress , 🕓 on the todo list , ❌ maybe in the future
All you need to do to build the tool is run cmake
and then make
.
Personally, I recommend doing this is in a build directory to keep things organised, but that is optional.
$ mkdir build && cd build
$ cmake .. -DCMAKE_BUILD_TYPE=Release
$ make
So, for example, the file some_model.bin
could be extracted like this:
$ ./cgfx2gltf -v some_model.bin
Informational resources:
- nouwt.com Wiki: Detailed list of fields and sections in CGFX (web.archive.org)
- 3dbrew.org Wiki: Information on CGFX dictionaries as well as structural information
- Custom Mario Kart Wiki: Structural description of CGFX sections and texture formats
- Khronos Group Data Formats: Detailed description of the ETC1 image format
Code ported from:
Libraries used:
- stb_image by Sean Barrett aka "nothings", public domain
- stb_image_write by Sean Barrett aka "nothings", public domain
- cgltf by Johannes Kuhlmann aka "jkuhlmann", MIT License
- kgflags by Krzysztof Gabis aka "kgabis", MIT License
The source code for this application is licensed under the MIT License.