Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk® Softimage® / XSI SDK / Model transformation
  RSS 2.0 ATOM  

Model transformation
Rate this thread
 
45524
 
Permlink of this thread  
avatar
  • MoSin
  • Posted: 21 July 2010 08:59 AM
  • Total Posts: 18
  • Joined: 02 March 2010 09:07 AM

Hey,

I’m exporting a model from the scene and it looks like the data i get from it isn’t transformed liek I see it in XSI. 

XSI::Primitive prim xobj.GetActivePrimitive();
XSI::PolygonMesh mesh prim.GetGeometry();
XSI::CGeometryAccessor ga mesh.GetGeometryAccessorSI::siConstructionModeAnimationXSI::siCatmullClark);

With the geometry accessor, I extract vertex positions, normals, UVs etc. If I call GetTransform on the GA, I get the local ones but still not the fully transformed one compared to what’s written in the parent view of the model.

Any ideas…

thanks!



Replies: 1
/img/forum/dark/default_avatar.png

You have to apply the transformation of the node on each positions, normals ....

X3DObject x3d;
CTransformation trans = x3d.GetKinematics().GetGlobal().GetTransform();
CVector3 outVect;
vect.MulByTransformation(position, trans);
With position, a CVector3 of the position of a vertex for example ...

Author: Tanguy

Replied: 31 August 2010 03:20 AM