Skip to content

Latest commit

 

History

19 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nintendo 3DS Asset Importer for Blender

Imports Pokémon 3DS models, skeletons, skin weights, materials, textures and animations straight into Blender, and into Maya.

Solving the issues with Ohana3DS/SPICA to SMD to Blender route. SMD only stores position, normal, one UV set and four weights per vertex, so the second UV set, tangents, vertex colours, material settings and the influence palette are gone before Blender ever sees the file. This reads the game files directly instead.

Install

Blender 4.2+ (built and tested on 5.1).

Grab the latest io_scene_n3ds zip from Releases, then in Blender: Edit > Preferences > Get Extensions > dropdown > Install from Disk

Use

File > Import > Nintendo 3DS Model (.bin)

Select the model, animation and texture files together. Animation files have no skeleton of their own and textures live in a separate file, so both need the model in the same import to attach to.

If you don't have the raw texture file, drop loose images next to the model (or in an images/ folder beside it) named after what the materials ask for, like pm0151_00_Body1.png. Loose textures usually already carry these names, so they get picked up automatically. Extension doesn't matter.

You get geometry with two UV sets and vertex colours, an armature with weights bound through an Armature modifier, Principled BSDF materials with base colour, alpha, normal maps and UV transforms, packed textures, and animations as actions (with a fake user so they survive a reload). Axis conversion to Z-up is handled.

There's also File > Import > Nintendo 3DS Asset (inspect), which opens a container and prints what's inside without importing. Handy when a file won't load and you want to know why.

Maya

Maya 2022+ (Python 3). Only 2027 is actually tested, since that's what I have. Maya 2020 and older are Python 2.7 and won't work.

Grab n3ds_maya.py and drop it into Documents/maya/<version>/plug-ins/, then enable n3ds_maya in Window > Settings/Preferences > Plug-in Manager. It shows up under File > Import, same as any other translator.

You get the same thing Blender does: mesh with two UV sets and vertex colours, joints with jointOrient set so rotate stays free for animation, a skinCluster with the weights bound, standardSurface materials, and animation on the joints. Maya is Y-up like the 3DS so nothing gets rotated on the way in. Textures are written out as PNG next to the file you imported, because Maya's file node wants a path rather than pixels. The scene is switched to 30fps (ntsc) before any keys are set, since that's what the source runs at.

Maya imports one file at a time, so do it in two steps: import the model first, then import each animation file. Animation files carry no skeleton of their own, so they attach to whatever skeleton is already in the scene. If the bone names don't line up it refuses rather than binding one Pokémon's animation to another's rig, which would look like it worked.

It's one file with everything inlined, so there's no package to install and nothing to add to your PYTHONPATH.

Formats

Containers PC, PS
Compression LZ10, LZ11
Models GFModel and BCH (skeleton, meshes, PICA200 vertex attributes)
Materials GFMaterial (texture units, UV transforms, wrap modes), BCH materials
Textures GFTexture and BCH: RGBA8, RGB8, RGBA5551, RGB565, RGBA4, LA8, L8, A8, LA4, L4, A4, ETC1, ETC1A4
Animation GFMotion skeletal, axis-angle and Euler. BCH skeletal, Euler and quaternion, all eight keyframe packings

Covers Pokémon models from X/Y, ORAS, Sun/Moon and Ultra Sun/Ultra Moon, in either the GameFreak packs or the Nintendo BCH form. Both go through the same importer, so you don't need to know which you have.

One caveat. BCH models, skeletons, meshes and materials are tested against real files and work. BCH textures and animations are in, but every BCH I can get hold of declares zero of both, so those two readers have only ever run against test data I wrote myself. They're wired up so a bad parse means "none found" rather than a broken import. If you have a BCH that carries them, try it and open an issue either way. That's the only way they get confirmed.

Not supported yet

If you want support for more formats and 3ds games, open an issue or feel free to contribute.

  • CGFX, the other Nintendo standard format
  • More containers (GARC, DARC, SARC) and compression (LZH8, Yaz0, BLZ)
  • Material and visibility animations (only skeletal is read today)
  • HiLo8 textures
  • Export. This is import only.
  • Per-game one-offs like MBN, NLP, ZMDL, BCLIM. There's a reader registry, so these are small additions.

Credits

Other people did the hard reverse-engineering. I mostly translated it.

  • gdkchan for SPICA, released public domain (Unlicense). The readers here are ported from it. Also wrote Ohana3DS, which made 3DS model ripping possible in the first place.
  • K0lb3 for etcpak bindings, used to verify my ETC1 decoder. Build-time only, not a dependency.
  • devkitPro for citro3d, whose tex3ds.h is the authority on PICA200 texture formats.
  • 3dbrew for the hardware and format docs.
  • Tyulis for 3DSkit. No code from it is used here, but it's worth knowing about for formats this doesn't cover.

Pokémon and its file formats belong to Nintendo, Game Freak and The Pokémon Company. This is an unofficial tool for reading files you already own. It ships no game data.

Licence

GPL-3.0-or-later. Blender addons link bpy, which is GPL, so there isn't really a choice. SPICA's public domain code is compatible with it.

About

Nintendo 3DS asset importer for Blender and Maya. BCH/H3D, GFModel, GFMotion, GFTexture.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages