bcchang.com /
Research /
VR /
Downloads
B3D Model Format

The B3D file format is an ASCII format for 3D objects, similar in structure to VRML and Open Inventor files. It was designed primarily for use with the
OpenGL Performer library for virtual reality applications. It is not related to the
Blitz3D engine's .b3d files - the 'B' here doesn't stand for anything, other than "Ben's 3D Format."
It's purpose is primarily to provide a more robust format for exporting models from modeling packages like Maya into CAVE applications like Ygdrasil, addressing some of the shortcomings of commonly used formats like Wavefront OBJ.
Features:
- hierarchical transforms
- rotate and scale pivot points for animation
- texture coordinates
- color-per-vertex
- textures
- multitexturing
- sphere and cube maps
- support for GLSL vertex and fragment shaders
- human-readable
There are two software packages for the B3D format: a Maya exporter, and an OpenGL Performer importer that allows B3D files to be loaded into Ygdrasil or other Performer-based applications. The Maya exporter is available for Windows and Linux, including source code and compiled plugins for different versions of Maya. The importer includes source code and compiled versions for several versions of Performer; it can also be used as a starting point to write importers for other game engines and 3D libraries.
B3D Maya Exporter
The Maya Exporter has two files: the plugin itself, and a MEL script with the options.
Installation Instructions : Ubuntu, Debian, etc
double-click the .deb file and click "install".
Installation Instructions : From Source
- Quit Maya
- Download the source tarball
- unpack it:
gunzip b3dExporter-src.tar.gz
tar -xvf b3dExporter-src.tar
- build it
cd b3dExporter-src
make
- install it (requires root access)
su
make install
Installation Instructions : Binary
- Quit Maya
- Download B3DExporter.so and b3dExportOptions.mel
- Install them (requires root)
B3DExporter.so goes into /usr/aw/maya/bin/plug-ins. b3dExportOptions.mel goes into /usr/aw/maya/scripts/others.
cp B3DExporter.so /usr/aw/maya/bin/plug-ins
cp b3dExportOptions.mel /usr/aw/maya/scripts/others
Using the Exporter
- Launch Maya
- Load the plugin. Go to Windows->Settings and Preferences->Plugin Manager. Look for "B3DExporter.so". Check "Load" and "AutoLoad". Close plugin manager.
- Make some models.
- File->Export Selection->[] or File->Export All->[]
- Set "File Type" to "B3DExport"
- Click "Export"
- Enter a name; the exporter adds '.b3d' automatically.
B3D Loader for Performer/CAVE/Ygdrasil
This is a plugin for the OpenGL Performer library, provided as source and as a precompiled binary for Linux OpenGL Performer 3.2.
There are some (optional) parts of the code that rely on new features in Performer, such as vertex and fragment programs. If you would like to use the loader with older versions, e.g. Performer 2.7, etc, you can easily modify the source ( see below ).
Installation Instructions : From Debian Package
download the .deb file. Double-click it to open it, and click "Install".
Installation Instructions : From Source
- download the source tarball
- unpack it:
gunzip b3dImporter-src.tar.gz
tar -xvf b3dImporter-src.tar
- build it:
cd b3dImporter-src
make
- install it. this requires root access.
su
make install
Installation Instructions : Binary
Linux 2.6.8, Performer 3.2, GCC 3.3.4, GLIBC 2.3.3
Compiled on Suse 9.2
- download the .so file
- copy it into /usr/lib/libpfdb (where Performer puts the loader plugins)
su
cp libpfb3d.so.5 /usr/lib/libpfdb
- create a symbolic link. .so.5 means this is 'version 5' (for Performer 3.2). Every Performer version will get a different .so.# number. the base library name - libpfb3d.so - should be a symlink to the correct version.
cd /usr/lib/libpfdb
ln -s libpfb3d.so.5 libpfb3d.so
Examples
A set of example B3D files. Not necessarily particularly exciting, but basic illustrations of the file format, including:
- vertex coloring
- multi texturing
- cubemaps
- multitextured lightmaps from Maya and Mental Ray
- OpenGL Shading Language vertex and fragment shader examples for normal map, procedural bump map, and toon shader
B3DView
B3DView is a demo GLUT/OpenGL program to illustrate a way of writing your own code to load B3D files into other graphics engines and programs. B3DView isn't a complete viewer - for instance, it ignores textures, and doesn't apply normals properly - but it's more a starting point for your own code. The starting C++ class is the "B3DObject" From there, each part of the model (poly mesh, transform, polygon face, shader, etc.) is its own C++ class with its own file reading and graphics drawing methods. The example code here is terribly inefficient, but should be pretty easy to understand. If you compare this code to the sourcecode for the Performer loader above, you'll notice that they're very similar - the OpenGL example just has all the Performer graphics library calls removed, and replaced with standard OpenGL ones instead.
| B3DView.tar.gz | 105.97 Kb | February 28 2007 04:48:13 AM | B3DView Example Source Code |