Homepage : blend2java.sf.net
Sourceforge page : sourceforge.net/projects/blend2java
License : GPL
HOWTO : here
This is the amazing Python script for exporting blender models to XML
that can be loaded by the standard java.beans.XMLDecoder class (since
1.4) and cast to the standard Java3D Shape3D object. All clear now?
This allows you to take your amazing Blender models, and bring them
across into your Java3D game / app / whatever.
Blender 2.25 or newer (could work with older ones,
never used to) from www.blender.org
Java from java.sun.com
(1.4 is when the java.beans.XMLDecoder arrived)
Java3D from java.sun.com/products/java-media/3D/
A reasonable understanding of Blender and Java3d
To use it, you must first select an object you would like to export (in
then load the script export.py, then run it. A file is created for each
different Material the mesh has. This is because a Shape3D object can
only have a single Appearance node. (But you already knew that)
To load the XML into Java, the following does nicely;
XMLDecoder e =
Shape3D fred =
You can see this in action in the demo. To run the demo, go to the demo
folder and run
Under windows I think you can just double click on the Viewer.class
file, and it will start up, not sure.
There's also a Java3D demo using keyframes, it's bundled in a jar file.
java -jar moo.jar
ithink you can probably double click on that one in windows too.
If you get a class not found "java.beans.XMLDecoder" it probably means
you don't have a new enough java runtime, you'll need atleast 1.4.
If you get a class not found "GraphicsConfiguration" or the like,
there's a problem with your Java3D installation (did you do one?).
- Gasdia Roberto has added support for textures!!!
His work is truly awesome, he's responsible for the funny two legged
dinosaur demo too.
- Added demo of keyframe animation (moo.jar)
- Added a warning about blend2java not exporting a
mesh without atleast one material assigned to it, to this document
- Added a recent changes section to the
- The code hasn't changed at all.
- Completely rewritten to write XML, not java
- The first