Hello,Some times ago, I have coded an osg to vrml2 writer. Today, I have updated our writer to osg 2.9.9. 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 pngconvertTextures=-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.
Cheers, Johan. -- Johan Nouvel, research engineer http://www.archivideo.com tel : +33 (0)2 99 86 30 20 ARCHIVIDEO, 40 rue des Veyettes, 35000 RENNES, FRANCE
osgPluginVRML.tar.gz
Description: application/gzip
_______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
