Skip to content

An extraction tool for CGFX files used in 3DS games.

License

Notifications You must be signed in to change notification settings

kathrindc/cgfx2gltf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎲 cgfx2gltf - A basic CGFX exporter

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.

Features

  • ⭕ 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

Building

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

Usage

So, for example, the file some_model.bin could be extracted like this:

$ ./cgfx2gltf -v some_model.bin

Acknowledgments

Informational resources:

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

License

The source code for this application is licensed under the MIT License.

About

An extraction tool for CGFX files used in 3DS games.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published