| Version 7 (modified by martin, 6 years ago) |
|---|
osgconv
TracNav
- About
- Screenshots
- News
- Developer Blog
- Mailing Lists
- Forum
Documentation
- Getting Started
- Platform Specifics
- Tutorials
- Examples
- User Guides
- Programming Guides
- Reference Guides
- LatestDevelopments
- Porting
- CMake
- CDash
- CPack
- FAQ
- Tips And Tricks
- Maths
- Knowledge Base
- Trac Usage Examples
- TracGuide Documentation
- Software Patents
- Software Patents Europe
- Downloads
- Community
- Links
osgconv is utility program for reading in 3d databases, apply basic operations to them, then saving out as a single 3d database.
Using osgconv to convert into native osg formats
osgconv can be very useful to read from standard 3d formats such as OpenFlight, 3DS, Alias Wavefront (OBJ) etc and then convert to an OSG native format supported such as the OpenSceneGraph .osg ascii format or .ive binary format. By default, optimization of the loaded scene graph will be peformed so the resulting scene graph written out will be smaller and faster to use at run-time, and the .ive file format is particular fast for loading making it ideal for database paging and large database.
Convert cow.obj to equivilant IVE format file:
osgconv cow.obj cow.ive
Convert cow.obj to equivilant IVE format file and compress and automatically generate mipmapped textures:
osgconv --compressed cow.obj cow.ive
Command line options available
For a full list of command line options supported type:
osgconv --help
Which will print out out the following:
usage:
osgconv [options] infile1 [infile2 ...] outfile
options:
| -O option | ReaderWriter option |
| --compressed | Compress textures. |
| --compressed | Enable the usage of 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 |
| -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 |
| -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 will be done in destination orientation |
