jmvp

 

How to : rotate models on import

Page history last edited by Phil Lavery 1 yr ago

 

Rotation of models on import using osgconv or rot plugin

 

osgconv

 

-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

.

 

An example of it in action is a rotation of 90 degrees about the z axis:

 

osgconv cow.osg -o 90-0,0,1 test.osg

 

For Maya models you'll want something like:

 

osgconv cow.osg -o 90-1,0,0 test.osg

 

rot psuedo plugin

 

There is also the rot psuedo plugin which you can use like:

 

osgviewer cow.osg.90,0,0.rot

 

Which does a rotation by 90 degrees about the x axis. The parameters are rotation-X, rotation-Y, rotation-Z.

 

You'll be able to us the rot plugin in conjunction with the P3D xml file format, so instread of references cow.osg you just reference cow.osg.90,0,0.rot. The nice thing about this is you don't need to modify the file itself.

  

Comments (0)

You don't have permission to comment on this page.