As it works (for our needs at least) I've done and attached a tar.gz file for the VRML2 plugin with a new part to write a VRML2 file from an osg one. The read part is the same as in osg 2.9.9. The write part code is in convertToVRML.cpp and .h files. It works for some osg nodes (group, geode, matrixTransform, positionAttitudeTransform and geometry). Textures are converted to jpeg (if not translucent) or png (if translucent). There are some options that could be given to the writer (with -O switch) : convertTextures=0 to copy textures without converting them to jpeg or png convertTextures=-1 do not copy textures, keep them in their original format and location convertTextures=-2 do not use textures, parse only geometry convertTextures=-3 (default) convert textures to jpeg or png ones. textureUnit=X in case of multiple textures, X= texture unit to use (default value=0) directoryTexture=aPath when texture will be copied, it will be in this directory, not in the current one."
########################################################
# Replacement VRML plugin for OpenSceneGraph. #
# (C) J.Ciger B.Herbelin T.Abaci 2003,2004 VRlab EPFL #
########################################################
- dependencies:
OpenVRML (http://openvrml.org/)
Boost (http://www.boost.org/)
OpenSceneGraph (http://www.openscenegraph.org/)
CAUTION!
This version of the plugin requires OpenVRML 0.17.12 and Boost 1.38.
Older version *may* work, but were not tested!