Table of Contents
Note: Certain development tools referenced in this document are provided by third parties, not by Amazon. Any links to these tools in this document take you to third-party sites to download and install them. This software uses the FreeImage open source image library. FreeImage is used under the FIPL license. See http://freeimage.sourceforge.net/freeimage-license.txt for details. Source code for this library is available at http://downloads.sourceforge.net/freeimage/FreeImage3154Win32.zip.
After Setting Up Euclid Bundle Builder, you are ready to convert your 3D assets to visual bundles (VBL). If you are only converting one 3D asset to VBL, you can use EuclidBundle Builder to create a VBL from the command line. If you have multiple 3D assets to convert, you'll need to use MakeBundles.
Using EBB to Create a Single VBL Asset
Note: If you are creating more than one 3D asset, you need to skip to Using MakeBundles to Create Multiple VBL Assets
Build a Single Visual Bundle Asset
After exporting the <filename>.ebx and <filename>.fbx files from Maya (or 3ds Max), you can use Euclid Bundle Builder to convert the exported model into a visual bundle asset (VBL). To do this, from the command shell, use the following command line:
% ebb <filename>.fbx –vbl <filename>.vbl
The VBL file is created in the
ebb-export subdirectory, that is:
Add Bundles to Your App
After locating the bundle that you are interested in, copy it to the
res/raw directory in the source folder for your app.
Using MakeBundles to Create Multiple VBL Assets
Makebundles is a Python script that builds Visual Bundles (VBLs) from your assets. The
makebundles.py script is located at
tools/scripts/makebundles.py in the Fire Phone SDK Addon.
Configure the following prerequisites before running
- Python 2.7
- Autodesk Maya 2013 or 2014
- ADB.exe in Windows path
makebundles, open a Windows cmd.exe shell. In the Fire Phone SDK Addon, navigate to the
tools/scripts folder, and then run the following command:
$ python makebundles.py]]>
makebundles script also has an optional -i flag, which runs the script in interactive mode and allows the user to choose which bundles to build. The following command designates interactive mode:
$ python makebundles.py -i
Configuring the bundles.xml File
makebundles.py, you will need to create an XML configuration file named "bundles.xml" in the same
tools/scripts directory where
makebundles.py is located. This file defines which VBLs are built.
bundles.xml file has a parent
<vbls> element with a set of
<vbl> children. Each
<vbl> tag has two required attributes and one optional attribute:
- name: Name of the VBL
- path: Path to the .ma file
- validation_policy (optional): Described in Setting Up Euclid Bundle Builder.
The following XML shows an example that builds three VBL files named "ls_forest.vbl", "ls_typewriter.vbl", and "ls_bamboo.vbl":
ls_forest.metadata ls_typewriter.metadata ls_bamboo.metadata
Makebundles performs the following tasks as part of the VBL creation process:
pathattribute of bundles.xml, looking for any .ma files under the specified directory. These files are exported and built into a VBL. Note that bundle names cannot contain file separators.
- The resulting VBL files will be located in the "exports" folder.
Note: You can temporarily bypass any assets that aren't loading correctly or that crash when exporting by putting a single text file called "disable.txt" in the same directory as the .ma file.