OpenSceneGraph (OSGB/OSGT) Reader/Writer

FME can read and write files in the OSG format.

osgb and osgt are 3D vector formats that use the same underlying graphics model:

  • osgt is a text representation of the model with independent texture references
  • osgb is a binary representation of the model with all textures contained within one standalone file.

For more information on OpenSceneGraph and the OSG format, visit http://www.openscenegraph.org/.

OpenSceneGraph (OSGB/OSGT) Product and System Requirements

Format

FME Platform

Operating System

Reader/Writer

FME Form

FME Flow

FME Flow Hosted

Windows 64-bit

Linux

Mac

Reader

Yes

Yes

Yes

Yes

Yes

Yes

Writer

Yes

Yes

Yes

Yes

Yes

Yes

Reader Overview

The reader supports only a small subset of OSG nodes.

The OSG reader produces FME features for geometry data from OSG files.

Supported OSG Nodes

  • Geode
  • Group
  • MatrixTransform

Supported Shape Nodes

  • Shape nodes are not yet supported.

Supported Materials

  • Diffuse Color
  • Specular Color
  • Emissive Color
  • Shininess
  • Image Texture

Textures are set on FME geometry based on the culling of OSG faces. If both sides are culled, no texture will be read. If only the front side is culled, FME geometry will have only the texture on the back side. If the back side is culled only the front side will have the texture. If culling is not set, both sides will have the texture and identical texture coordinates.

Note   FME supports OSGB embedded textures, and external bitmap (.bmp), jpeg (.jpg), and SGI (.rgb, .rgba) image files.

Writer Overview

The OSG writer produces an .osgt or .osgb file for each FME feature type that it sends to the writer.

IFMESurface geometry is converted into GL_TRIANGLES, GL_QUADS, or GL_POLYGON primitives, if the maximum edge number on the surfaces is 3 or 4, or greater than 4, respectively.

IFMELine geometry is converted into a LINE_STRIP primitive.

Texture files are written to a common folder and referenced by OSGT models for each instance of an OSG writer. OSGB files have their textures embedded into the binary file.

By default, OSGT models are written with Z-up coordinates in meters.

Tip   If you connect a Triangulator transformer, geometry structure will be preserved in the written file by running features through the transformer's TINSurface port. This will produce GL_TRIANGLES if they are needed.
Note  Old files in the output folder are overwritten by the new files with the same name. If the output files cannot be written, the translation fails.