---
name: "osgconv"
section: "1"
platform: "linux"
package: "openscenegraph"
version: "3.6.5+dfsg1-9"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/osgconv"
---

# osgconv(1)

Convert between file formats parsed by OSG.

## NAME

osgconv - Convert between file formats parsed by OSG.

## DESCRIPTION

### usage:

-

  obj-x86\_64-linux-gnu/bin/osgconv \[options\] infile1 \[infile2 ...\] outfile

### environment:

- OSG\_ASSIGN\_PBO\_TO\_IMAGES \<ON/OFF\>

  Set whether PixelBufferObjects should be assigned to Images to aid download to the GPU.

- OSG\_BUFFER\_OBJECT\_POOL\_SIZE \<int\>

  Set the hint for the size of the vertex buffer object pool to manage.

- OSG\_BUILD\_KDTREES on/off

  Enable/disable the automatic building of KdTrees for each loaded Geometry.

- OSG\_COMPILE\_CONTEXTS \<mode\>

  OFF \| ON Disable/enable the use of background compiled contexts and threads.

- OSG\_COMPUTE\_NEAR\_FAR\_MODE \<mode\>

  DO\_NOT\_COMPUTE\_NEAR\_FAR \| COMPUTE\_NEAR\_FAR\_USING\_BOUNDING\_VOLUMES \| COMPUTE\_NEAR\_FAR\_USING\_PRIMITIVES

- OSG\_CONFIG\_FILE \<filename\>

  Specify a viewer configuration file to load by default.

- OSG\_DATABASE\_PAGER\_DRAWABLE \<mode\>

  Set the drawable policy for setting of loaded drawable to specified type.  mode can be one of DoNotModify, DisplayList, VBO or VertexArrays\>.

- OSG\_DATABASE\_PAGER\_PRIORITY \<mode\>

  Set the thread priority to DEFAULT, MIN, LOW, NOMINAL, HIGH or MAX.

- OSG\_DEFAULT\_BIN\_SORT\_MODE \<type\>

  SORT\_BY\_STATE \| SORT\_BY\_STATE\_THEN\_FRONT\_TO\_BACK \| SORT\_FRONT\_TO\_BACK \| SORT\_BACK\_TO\_FRONT

- OSG\_DISPLAY\_TYPE \<type\>

  MONITOR \| POWERWALL \| REALITY\_CENTER \| HEAD\_MOUNTED\_DISPLAY

- OSG\_DO\_PRE\_COMPILE \<ON/OFF\>

  Switch on or off the pre compile of OpenGL object database pager.

- OSG\_EYE\_SEPARATION \<float\>

  Physical distance between eyes.

- OSG\_FBO\_POOL\_SIZE \<int\>

  Set the hint for the size of the frame buffer object pool to manage.

- OSG\_FILE\_PATH \<path\>\[:path\]..

  Paths for locating datafiles

- OSG\_FORCE\_TEXTURE\_DOWNLOAD \<ON/OFF\>

  should the texture compiles be forced to download using a dummy Geometry.

- OSG\_GL\_CONTEXT\_FLAGS \<uint\>

  Set the hint for the GL context flags to use when creating contexts.

- OSG\_GL\_CONTEXT\_PROFILE\_MASK \<uint\>

  Set the hint for the GL context profile mask to use when creating contexts.

- OSG\_GL\_CONTEXT\_VERSION \<major.minor\>

  Set the hint for the GL version to create contexts for.

- OSG\_GL\_ERROR\_CHECKING \<type\>

  ONCE\_PER\_ATTRIBUTE \| ON \| on enables fine grained checking, ONCE\_PER\_FRAME enables coarse grained checking

- OSG\_GL\_EXTENSION\_DISABLE \<value\>

  Use space deliminarted list of GL extensions to disable associated GL extensions

- OSG\_GL\_TEXTURE\_STORAGE

  ON\|OFF or ENABLE\|DISABLE, Enables/disables usage of glTexStorage for textures where supported, default is ENABLED.

- OSG\_IMPLICIT\_BUFFER\_ATTACHMENT\_RENDER\_MASK

  OFF \| DEFAULT \| \[~\]COLOR \| \[~\]DEPTH \| \[~\]STENCIL. Substitute missing buffer attachments for render FBO.

- OSG\_IMPLICIT\_BUFFER\_ATTACHMENT\_RESOLVE\_MASK

  OFF \| DEFAULT \| \[~\]COLOR \| \[~\]DEPTH \| \[~\]STENCIL. Substitute missing buffer attachments for resolve FBO.

- OSG\_KEYSTONE ON \| OFF

  Specify the hint to whether the viewer should set up keystone correction.

- OSG\_KEYSTONE\_FILES \<filename\>\[:filename\]..

  Specify filenames of keystone parameter files. Under Windows use ; to deliminate files, otherwise use :

- OSG\_LIBRARY\_PATH \<path\>\[:path\]..

  Paths for locating libraries/ plugins

- OSG\_MAXIMUM\_OBJECTS\_TO\_COMPILE\_PER\_FRAME \<int\>

  maximum number of OpenGL objects to compile per frame in database pager.

- OSG\_MAX\_NUMBER\_OF\_GRAPHICS\_CONTEXTS \<int\>

  Maximum number of graphics contexts to be used with applications.

- OSG\_MAX\_PAGEDLOD \<num\>

  Set the target maximum number of PagedLOD to maintain.

- OSG\_MAX\_TEXTURE\_SIZE

  Set the maximum size of textures.

- OSG\_MAX\_TEXTURE\_SIZE \<value\>

  Clamp the maximum GL texture size to specified value.

- OSG\_MENUBAR\_BEHAVIOR \<behavior\>

  OSX Only : Specify the behavior of the menubar (AUTO\_HIDE, FORCE\_HIDE, FORCE\_SHOW)

- OSG\_MINIMUM\_COMPILE\_TIME\_PER\_FRAME \<float\>

  minimum compile time alloted to compiling OpenGL objects per frame in database pager.

- OSG\_MULTI\_SAMPLES \<int\>

  Set the hint for the number of samples to use when multi-sampling.

- OSG\_NEAR\_FAR\_RATIO \<float\>

  Set the ratio between near and far planes - must greater than 0.0 but less than 1.0.

- OSG\_NOTIFY\_LEVEL \<mode\>

  FATAL \| WARN \| NOTICE \| DEBUG\_INFO \| DEBUG\_FP \| DEBUG \| INFO \| ALWAYS

- OSG\_NUM\_DATABASE\_THREADS \<int\>

  Set the hint for the total number of threads to set up in the DatabasePager.

- OSG\_NUM\_HTTP\_DATABASE\_THREADS \<int\>

  Set the hint for the total number of threads dedicated to http requests to set up in the DatabasePager.

- OSG\_NvOptimusEnablement \<value\>

  Set the hint to NvOptimus of whether to enable it or not, set 1 to enable, 0 to disable

- OSG\_OPTIMIZER "\<type\> \[\<type\>\]"

  OFF \| DEFAULT \| FLATTEN\_STATIC\_TRANSFORMS \| FLATTEN\_STATIC\_TRANSFORMS\_DUPLICATING\_SHARED\_SUBGRAPHS \| REMOVE\_REDUNDANT\_NODES \| COMBINE\_ADJACENT\_LODS \| SHARE\_DUPLICATE\_STATE \| MERGE\_GEOMETRY \| MERGE\_GEODES \| SPATIALIZE\_GROUPS  \| COPY\_SHARED\_NODES \| OPTIMIZE\_TEXTURE\_SETTINGS \| REMOVE\_LOADED\_PROXY\_NODES \| TESSELLATE\_GEOMETRY \| CHECK\_GEOMETRY \|  FLATTEN\_BILLBOARDS \| TEXTURE\_ATLAS\_BUILDER \| STATIC\_OBJECT\_DETECTION \| INDEX\_MESH \| VERTEX\_POSTTRANSFORM \| VERTEX\_PRETRANSFORM \| BUFFER\_OBJECT\_SETTINGS

- OSG\_RUN\_FRAME\_COUNT

  Set the maximum number of frames to run the viewer run method.

- OSG\_RUN\_FRAME\_SCHEME

  Frame rate manage scheme that viewer run should use, ON\_DEMAND or CONTINUOUS (default).

- OSG\_RUN\_MAX\_FRAME\_RATE

  Set the maximum number of frame as second that viewer run. 0.0 is default and disables an frame rate capping.

- OSG\_SCREEN \<value\>

  Set the default screen that windows should open up on.

- OSG\_SCREEN\_DISTANCE \<float\>

  Physical distance between eyes and screen.

- OSG\_SCREEN\_HEIGHT \<float\>

  Physical screen height.

- OSG\_SCREEN\_WIDTH \<float\>

  Physical screen width.

- OSG\_SERIALIZE\_DRAW\_DISPATCH \<mode\>

  OFF \| ON Disable/enable the use of a mutex to serialize the draw dispatch when there are multiple graphics threads.

- OSG\_SPLIT\_STEREO\_AUTO\_ADJUST\_ASPECT\_RATIO \<mode\>

  OFF \| ON  Default to OFF to compenstate for the compression of the aspect ratio when viewing in split screen stereo. Note, if you are setting fovx and fovy explicityly OFF should be used.

- OSG\_SPLIT\_STEREO\_HORIZONTAL\_EYE\_MAPPING \<mode\>

  LEFT\_EYE\_LEFT\_VIEWPORT \| LEFT\_EYE\_RIGHT\_VIEWPORT

- OSG\_SPLIT\_STEREO\_HORIZONTAL\_SEPARATION \<float\>

  Number of pixels between viewports.

- OSG\_SPLIT\_STEREO\_VERTICAL\_EYE\_MAPPING \<mode\>

  LEFT\_EYE\_TOP\_VIEWPORT \| LEFT\_EYE\_BOTTOM\_VIEWPORT

- OSG\_SPLIT\_STEREO\_VERTICAL\_SEPARATION \<float\>

  Number of pixels between viewports.

-

  OSG\_STEREO \<mode\> OFF \| ON OSG\_STEREO\_MODE \<mode\>

- QUAD\_BUFFER \| ANAGLYPHIC \| HORIZONTAL\_SPLIT \| VERTICAL\_SPLIT

  \| LEFT\_EYE \| RIGHT\_EYE \| VERTICAL\_INTERLACE \| HORIZONTAL\_INTERLACE

- OSG\_SWAP\_METHOD \<method\>

  DEFAULT \| EXCHANGE \| COPY \| UNDEFINED. Select preferred swap method.

- OSG\_TEXTURE\_POOL\_SIZE \<int\>

  Set the hint for the size of the texture pool to manage.

- OSG\_TEXT\_SHADER\_TECHNIQUE \<value\>

  Set the defafult osgText::ShaderTechnique. ALL\_FEATURES \| ALL \| GREYSCALE \| SIGNED\_DISTANCE\_FIELD \| SDF \| NO\_TEXT\_SHADER \| NONE

- OSG\_THREADING \<value\>

  Set the threading model using by Viewer, \<value\> can be SingleThreaded, CullDrawThreadPerContext, DrawThreadPerContext or CullThreadPerCameraDrawThreadPerContext.

- OSG\_USE\_SCENEVIEW\_FOR\_STEREO \<mode\>

  OFF \| ON Disable/enable the hint to use osgUtil::SceneView to implement stereo when required..

- OSG\_VERTEX\_BUFFER\_HINT \<value\>

  Set the hint to what backend osg::Geometry implementation to use. NO\_PREFERENCE \| VERTEX\_BUFFER\_OBJECT \| VERTEX\_ARRAY\_OBJECT

- OSG\_WINDOW x y width height

  Set the default window dimensions that windows should open up on.

- OSG\_WRITE\_OUT\_DEFAULT\_VALUES

  ON \| OFF

### options:

**-O** option          - ReaderWriter option

- **--compressed** - Enable the usage of compressed textures,

  defaults to OpenGL ARB compressed textures.

**--compressed-arb**   - Enable the usage of OpenGL ARB compressed textures

**--compressed-dxt1**  - Enable the usage of S3TC DXT1 compressed textures

**--compressed-dxt3**  - Enable the usage of S3TC DXT3 compressed textures

**--compressed-dxt5**  - Enable the usage of S3TC DXT5 compressed textures

- **--fix-transparency** - fix statesets which are currently

  declared as transparent, but should be opaque. Defaults to using the fixTranspancyMode MAKE\_OPAQUE\_TEXTURE\_STATESET\_OPAQUE.

- **--fix-transparency-mode** \<mode\_string\> - fix statesets which are currently

  declared as transparent but should be opaque. The mode\_string determines which algorithm is used to fix the transparency, options are:

- MAKE\_OPAQUE\_TEXTURE\_STATESET\_OPAQUE,

  MAKE\_ALL\_STATESET\_OPAQUE.

- **-l** libraryName - load plugin of name libraryName

  i.e. **-l** osgdb\_pfb Useful for loading reader/writers which can load other file formats in addition to its extension.

- **-e** extensionName - load reader/wrter plugin for file extension

  i.e. **-e** pfb Useful short hand for specifying full library name as done with **-l** above, as it automatically expands to the full library name appropriate for each platform.

- **-o** orientation - Convert geometry from input files to output files.

  Format of orientation argument must be the following:

- X1,Y1,Z1-X2,Y2,Z2

  or

-

  degrees-A0,A1,A2

- where X1,Y1,Z1 represent the UP vector in the input

  files and X2,Y2,Z2 represent the UP vector of the output file, or degrees is the rotation angle in degrees around axis (A0,A1,A2).  For example, to convert a model built in a Y-Up coordinate system to a model with a Z-up coordinate system, the argument may look like

- 0,1,0-0,0,1

  or

-

  **-90-1**,0,0

- **-t** translation - Convert spatial position of output files.

  Format of translation argument must be the following :

-

  X,Y,Z

- where X, Y, and Z represent the coordinates of the

  absolute position in world space

- **--use-world-frame** - Perform transformations in the world frame, rather

  than relative to the center of the bounding sphere.

- **--simplify** n - Run simplifier prior to output. Argument must be a

  normalized value for the resultant percentage reduction. Example: **--simplify** .5

-

  will produce a 50% reduced model.

- **-s** scale - Scale size of model.

  Scale argument must be the following :

-

  SX,SY,SZ

- where SX, SY, and SZ represent the scale factors

  Caution: Scaling is done in destination orientation

- **--smooth** - Smooth the surface by regenerating surface normals on

  all geometry nodes

- **--addMissingColors** - Add a white color value to all geometry nodes

  that don't have their own color values (**--addMissingColours** also accepted).

**--overallNormal**    - Replace normals with a single overall normal.

**--enable-object-cache** - Enable caching of objects, images, etc.

**--formats**          - List all supported formats and their supported options.

- **--format** \<format\> - Display information about the specified \<format\>,

  where \<format\> is the file extension, such as "flt".

**--plugins**          - List all supported plugin files.

- **--plugin** \<plugin\> - Display information about the specified \<plugin\>,

  where \<plugin\> is the plugin's full path and file name.
