Home

kiniou edited this page Sep 13, 2010 · 18 revisions
Clone this wiki locally

Welcome to the Blender NDS exporter wiki!

Blender NDS exporter:

Are you developping some 3D application or game for the Nintendo DS?
Are you using Blender to create astonishing 3D meshes and animations?
This script allow you to export easily your Blender meshes into NDS binary “GL-like” CallLists.

Install:

For Blender 2.4x users :

Before running the script with Blender , you must have the “Python Imaging Library” installed.
For Debian/Ubuntu systems : aptitude install python-imaging
For Windows : Download and install “Python Imaging Library” from website “www.pythonware.com/products/pil”

Copy the script “nds_3d_export.py” into the “scripts” directory of Blender:
Linux/Mac : $(HOME)/.blender/scripts
Windows : ??? (I do not really know since I’m not using Windows …)

Run Blender and check the File > Export menu : you’ll find a new entry called “Nintendo DS CallList”.

For Blender 2.5 (i.e svn) users :

PIL is no longer needed which means you must convert your textures (PNG for examples) with some external tools.
There is no UI at the moment like for the 2.4x flavor. Therefore when you export your model from the menu in Blender, it will export with default options (see batch options below).
The last version of the script is batch-enabled so you can export your meshes with the batch_export_nds.py script.

blender -b <some-file.blend> -P ./batch_export_nds.py -- [export options]

Without any options, the script exports by default the following attributes from your model :

  • binary format file (i.e mesh_name.bin + mesh_name.h)
  • mesh vertexes,
  • uv coordinates,
  • normals
  • armature

If the script can’t find the relevant attributes to export (ex: if there are no UV coordinates), the corresponding options are disabled automatically.
The default exported file format is binary CallList (.bin) with a C header file to include to your project (.h). If you need to export in text mode, just pass the --text options to the script.

If the model has an animation, the script will export one file per frame : [mesh_name]_[action_name]_[frame_number].bin.

Examples:

Changelog:

v0.2:
Export into “Binary” format.
v0.1:
UV-textured meshes + Normals + Colors.
Export into “C-style” format.
Export Texture into PCX Format with correct size.

TODO :

  • Blender 2.5 integration (actually comandline only)
  • 3D Animation support (… Actually it works but in a dirty way …)
  • Export directly into binary format

Infos :

  • author : Kevin Roy (kiniou_AT_gmail_DOT_com)
  • website : Kno Korpo Blog