Sign in to follow this  
lucky6969b

Exporter Question

Recommended Posts

When I export, 3ds max always shows some symmetrical information about the mesh. For example On the far left = Point3(-10,10,...); On the far right = Point3(10,10...); On the top = Point3(0, 20, ...); On the bottom = Point3(0, -20,...); You understand the pattern? Then I google and guessing the cause of it I think the exporter is exporting object space coordinates rather than world So that I need to apply a transformation to it, so that I can get the correct x,y,z in the world space... Am I correct? Thanks Jack

Share this post


Link to post
Share on other sites
Quote:
Original post by lucky6969b
I think the exporter is exporting object space coordinates rather than world


Assuming it's your own code, then the answer is probably yes. If it's a 3rd party exporter, there will probably be some matrix transform there somewhere.

Quote:
Original post by lucky6969b
So that I need to apply a transformation to it, so that I can get the correct x,y,z in the world space...


Get the world space matrix from INode::GetNodeTM(). There is also an object offset matrix you'll need to apply - see the docs for INode::GetObjOffsetPos(), INode::GetObjOffsetRot() and INode::GetObjOffsetScale(). You'll then need to concat those matrices together, and use the PointTransform and VectorTransform matrix funcs to get the world space co-oords.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this