Version 5 (modified by janoc, 5 years ago)

--

Linux plugins

OpenVRML plugin

The VRML plugin uses OpenVRML. The current version works with OpenVRML 0.17.12 and Boost 1.38. Other version may work, but were not tested. OpenVRML older than 0.15 will not work, due to the API change in the library.

The plugin supports the following:

  • Polygonal meshes (IndexedFaceSet?)
  • Box nodes
  • Sphere nodes
  • Cylinder nodes
  • Cone nodes
  • Appearance setting - both color and texture is supported
  • Normals are supported.

Nothing else will be converted to OSG scenegraph! Your file will likely parse (OpenVRML can parse any well formed VRML), but other features are not supported by the OSG loader at this time. Patches and code contributions are welcome. The intention behind this plugin was to provide a simple way to load legacy VRML 2.0 (VRML97) models, such as those exported by 3DStudio Max, into OSG, not to make a full-featured, compliant VRML loader/viewer.

Compilation of the plugin:

1. In order have the plugin compile, define an environment variable OPENVRML_DIR to point to your OpenVRML installation:

export OPENVRML_DIR=/opt/openvrml-0.17.12
  1. Run cmake:
    cmake .
    
  2. Compile OSG as usual.

Test data

In order to test the plugin, there are some test data available:


OLD information for historical purposes

The VRML plugin uses OpenVRML. It can only be compiled using version 0.14.3 of OpenVRML, because later versions depend on boost and had incompatible code changes.

  1. You may need to apply this small patch to get the library to compile with a recent version of gcc (probably anything newer than gcc 4.1.x will need it)
    • Patch is applied using:
         tar xvzf openvrml-0.14.3.tar.gz
         cd openvrml-0.14.3
         zcat openvrml-gcc.patch.gz | patch -p1 
      
  2. Configure the library as follows (change the prefix, if needed):
    ./configure --prefix=/opt/openvrml-0.14.3 --disable-gl-renderer --disable-lookat --disable-script-node-javascript
    
  3. Compile and install it:
    make
    make install
    
  4. In order have the plugin compile, define an environment variable OPENVRML_DIR to point to your OpenVRML installation:
    export OPENVRML_DIR=/opt/openvrml-0.14.3
    
  5. Run cmake:
    cmake .
    
  6. Compile OSG as usual.

In order to test the plugin, there are some test data available here.

Attachments