R & D, Downloads, Source Code

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.
Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/bcchang2/public_html/common/php/functions.php on line 130

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/bcchang2/public_html/common/php/functions.php on line 130

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/bcchang2/public_html/common/php/functions.php on line 130

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/bcchang2/public_html/common/php/functions.php on line 130

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/bcchang2/public_html/common/php/functions.php on line 130

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/bcchang2/public_html/common/php/functions.php on line 130
b3d-maya_2008_03_28-1_i386.deb49.12 KbMarch 29 2008 01:40:35 AMDebian package, Maya 8.5
b3dExporter-src.tar.gz163.97 KbFebruary 15 2008 08:22:24 AMsource code for the B3D Maya Exporter
B3DExporter-Maya85.so126.86 KbFebruary 28 2007 05:49:53 AMMaya Exporter (linux, Maya 8.5)
B3DExporter-Maya7.so126.09 KbFebruary 28 2007 04:13:11 AMMaya Exporter (linux, Maya 7.0)
B3DExporter-Maya6.so112.66 KbJuly 10 2006 11:38:23 PMMaya Exporter (linux, Maya 6.0)
b3dExportOptions.mel7.74 KbFebruary 15 2008 08:22:50 AMMEL Script for exporter options

Installation Instructions : Ubuntu, Debian, etc

double-click the .deb file and click "install".

Installation Instructions : From Source

  1. Quit Maya
  2. Download the source tarball
  3. unpack it:
    gunzip b3dExporter-src.tar.gz
    tar -xvf b3dExporter-src.tar
    
  4. build it
    cd b3dExporter-src
    make
    
  5. install it (requires root access)
    su
    make install
    

Installation Instructions : Binary

  1. Quit Maya
  2. Download B3DExporter.so and b3dExportOptions.mel
  3. 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

  1. Launch Maya
  2. Load the plugin. Go to Windows->Settings and Preferences->Plugin Manager. Look for "B3DExporter.so". Check "Load" and "AutoLoad". Close plugin manager.
  3. Make some models.
  4. File->Export Selection->[] or File->Export All->[]
  5. Set "File Type" to "B3DExport"
  6. Click "Export"
  7. 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 ).
Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/bcchang2/public_html/common/php/functions.php on line 130

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/bcchang2/public_html/common/php/functions.php on line 130

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/bcchang2/public_html/common/php/functions.php on line 130
b3d-performer_2008_03_28-1_i386.deb48.37 KbMarch 29 2008 01:40:50 AMB3D Performer Loader Debian Package (linux 2.6, Performer 3.2 GCC 4.1)
b3dImporter-src_20070302.tar.gz74.39 KbMarch 1 2007 07:24:50 AMB3D Loader Source Code
libpfb3d.so.5115.07 KbFebruary 15 2008 08:23:04 AMprecompiled B3D Performer loader (Linux 2.6 Performer 3.2 GCC 4.1)

Installation Instructions : From Debian Package

download the .deb file. Double-click it to open it, and click "Install".

Installation Instructions : From Source

  1. download the source tarball
  2. unpack it:
    gunzip b3dImporter-src.tar.gz
    tar -xvf b3dImporter-src.tar
    
  3. build it:
    cd b3dImporter-src
    make
    
  4. 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
  1. download the .so file
  2. copy it into /usr/lib/libpfdb (where Performer puts the loader plugins)
    su
    cp libpfb3d.so.5 /usr/lib/libpfdb
    
  3. 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

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/bcchang2/public_html/common/php/functions.php on line 130
b3d_examples.tar.gz4355.46 KbMarch 1 2007 06:59:41 AMB3D examples

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.
Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/bcchang2/public_html/common/php/functions.php on line 130
B3DView.tar.gz105.97 KbFebruary 28 2007 04:48:13 AMB3DView Example Source Code