Native OpenSceneGraph Binary (osgb) and ASCII (osgt) Reader/Writer
Licensing optionsfor this format begin with FME Professional Edition.
Overview
osgbandosgtare 3D vector formats that use the same underlying graphics model:
- osgtis a text representation of the model with independent texture references
- osgbis a binary representation of the model with all textures contained within one standalone file.
For more information on OpenSceneGraph and the OSG format, visithttp://www.openscenegraph.org/
Reader Overview
The reader supports only a small subset of OSG nodes.
The OSG reader produces FME features for geometry data from OSG files.
![Closed](http://www.baooytra.com/docs/fme/2017.1/html/FME_Desktop_Documentation/FME_ReadersWriters/Skins/Default/Stylesheets/Images/transparent.gif)
- Geode
- Group
- MatrixTransform
![Closed](http://www.baooytra.com/docs/fme/2017.1/html/FME_Desktop_Documentation/FME_ReadersWriters/Skins/Default/Stylesheets/Images/transparent.gif)
- Shape nodes are not yet supported.
![Closed](http://www.baooytra.com/docs/fme/2017.1/html/FME_Desktop_Documentation/FME_ReadersWriters/Skins/Default/Stylesheets/Images/transparent.gif)
- Diffuse Color
- Specular Color
- Emissive Color
- Shininess
- Image Texture
Note: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.osgtor.osgbfile for each FME feature type that it sends to the writer.
IFMESurface geometry is converted intoGL_TRIANGLES,GL_QUADS, orGL_POLYGONprimitives, if the maximum edge number on the surfaces is 3 or 4, or greater than 4, respectively.
IFMELine geometry is converted into aLINE_STRIPprimitive.
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 produceGL_TRIANGLESif they are needed.
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.