Convert Blender *.dae to *o3d using Googles o3dconverter.exe - extras
Googles 'Open 3D', *.o3d, isn't a file format in of itself in the same way that say, an *.ase or *.tga file is; whilst those two are actual media files, *.o3d is more akin to *.zip files in that it's essentially a 'container' within which other assets are held. This means that it's generally not possible to simply export files to Open3Ds *.o3d format from 3D applications like Blender without using some sort of third party converter.
It's also unfortunately not possible to simply create a ZIP file and then rename it (as can be done with other formats (renaming ZIP to PK3 for instance), because O3D is a binary format it has to be 'compiled' or the result of a 'conversion' won't work correctly in Open 3D applications. The following tutorial will discuss the process of doing just that, converting a Blender 3D modeled asset into an O3D file - or more correctly an *.o3dtgz file.
IMPORTANT NOTE: Using Googles dae2o3d converter requires the DirectX SDK be installed, which can be downloaded from Microsoft here.
Export from Blender to Collada *.dae ^
The process of exporting models from Blender 3D for the purpose of using them within Open 3D projects requires them to be exported out to Collada's DAE format. Below is an example of a mesh that contains a mesh object that's has materials assigned, is UVW mapped and textured, along with two light entities.
Mesh object in Blender ready for export to Collada dae
Assuming the model has been propped and is ready to go, simply select it and/or the assets that need to be exported (making sure that at least one of them is selected as the 'parent' object - outlined a lighter pink by default), then from the "File" menu, select "File >> Export >> Collada 1.4" as shown below. make sure to select version 1.4.
Exporting to Collada *.dae from Blender 3D
This will open the Collada export interface. In here, if exporting a selection of objects from a scene instead of a complete scene and all object it contains, as is the example above, then be sure to click "Only Export Selected". Browse and/or edit the "Export File" text field so it shows the 'save name' (the name the file will be called on saving) and location to where the resulting dae file will be saved and then click "Export and Close". A message will pop up letting you know export was completed and a Collada *.dae file has been saved to the location chosen (as shown below). That's it for this part of the process. Next the exported Collada *.dae file needs to be converted to O3D.
Blender 3D to Collada export options
Converting Blender 3D models into *.O3D ^
Converting 3D assets into *.O3D requires the use of a converter, as Googles is the proprietor of Open 3D they have provided a 'sample' O3D converter for the purposes of allowing third party compiling of the necessary files into O3D. Download and install it.
The easy way to do this conversion process is to use something called a "bat" or "batch" file, this is simply a text file with a couple of lines of 'code' that can be executed from where ever the batch file is located, and providing the file paths and syntax are correct, it'll run the compiler and automatically save the required *.o3dtgz file.
Copy/paste the following text into NotePad or similar text only editor;
D:\GAMES\o3D_converter\o3dConverter.exe --base-path=F:\Models\o3d F:\Models\o3d\testmodel.dae
Edit the file paths (to match the asset and converter paths on your system) and save it as a "*.bat" file; "od3convert.bat" for example. Once the bat file is created, make sure all the assets used by the mesh are in their correct locations and double click to execute bat file; depending on the size and/or complexity of the model a command prompt screen similar to the image shown below pop up for a few seconds or minutes.
As soon as it disappears the conversion process will be done resulting in a file with the extension "*.o3dtgz" added to the end of it. Once you've got that, that's it, you're done converting a Collada *.dae file into an Open 3D *.o3d package ready for use in a web based 3D application.
CMD/DOS prompt showing the results of the Collada to o3d conversion process
The process of converting itself is usually straightforward, however, there are generally a number of preparatory steps that need to be taken to make sure the process goes as smoothly as possible. It should always be kept in mind that because Open 3D is ostensibly web based interactive media, content should ideally be optimised in that context, i.e., models should have low polygon count, smaller texture sizes should be used along side the appropriate compressed texture formats; errors that crop up during the conversion process are more than likely going to be as a result of something to do with the prepping process.