Preparing your data for use in one of our pipelines may entail data cleanup, exporting data from different software packages, or conversion of your data into the appropriate file format for the pipeline you wish to use.
Exporting 3D Models to Omegalib
Blender, Maya or 3ds Max
There are a few exporters available in 3D modeling packages to convert a scene into an OpenSceneGraph file suitable for use in Omegalib. Take a look at http://trac.openscenegraph.org/projects/osg/wiki/Community/Plugins for a list of available exporters, including 3D Studio Max, Maya and Blender (plugins for other 3D modeling packages might exist elsewhere).
The best plugin for Blender is maintained under https://github.com/cedricpinson/osgexport, use this to export your scene into the .osgt or .ive file format. While there is comprehensive documentation for the Autodesk 3ds exporter available at https://sourceforge.net/p/osgmaxexp/mediawiki/Documentation/, there is currently no documentation for osgexport.
Here are some best practices for osgexport, which we have found to work well:
- Build the materials in the standard material editor (not the Cycles/node editor)
- UV textures should be set via the standard texture panel and not in the 3D view UV settings
- Apply all modifiers before exporting (can be ticked as an option in the exporter)
- Only set one texture per material, any other textures will probably be ignored
- Use only UV mapping, generated texture coordinates often do not function as expected
- Set textures as the diffuse color
- Alpha textures do not work in the export in the current version
- Always set blender to use relative paths. The osgexporter will copy all textures to a subdirectory of your blender file.
Converting to a binary format:
The exported .osgt format is an ASCII text file, which contains the scene graph in a very readable format. This is nice to look at, allowing you to see what kinds of objects will be created in OSG, and can be used to debug errors in imports. Loading these files can take some time however and the resulting scene graph may not be in a particularly optimized state.
OSG provides the osgconv
tool which can be used to convert geometry from many different file formats (e.g., .osgt, .obj, .fbx, etc) to .ive, the binary file format for OSG. When converting, a plethora of options are supported, which can be supplied to optimize the resulting scene graph for OSG (a full list of available options may be viewed by running osgconv –help
).
Most of the supported options are not necessary for normal usage, but become useful when dealing with large datasets. One particularly useful setting to enable is automatic compression of all textures in OpenGL with an OpenGL or DXT compression format. This can reduce the size of the required GPU texture memory by up to a factor of three. There are some restrictions on the allowable size of textures when using compression however.
Houdini
Learn how to export 3D geometry from Houdini by working through our Houdini tutorial series.