Skip to main content
GameDev.net gamedev.net
🔒 Locked 🎮 Unity

tranform information from a .3ds file

Started by bwhiting Jul 22, 2010 at 11:05 AM 1 replies 850+ views
Original Post
bwhiting
bwhiting
is it possible to obtain the tranformation of a 3ds encoded object in the form...

x
y
z
scaleX
scaleY
scaleZ
rotationX
rotationY
rotationZ

I have put together a basic 3ds file parser and it works ok.

But it seems that the 3ds files I have all seem to have the vertices in their final positions (already transformed), for some applications this is fine but I would like to be able to undo any tranformations on the mesh AND convert the transform into individual parts (x,y,z...).

The 3ds file also includes the transform matrix of the object, from this I can get most of the information I need but I can't figure out how to fully reverse engineer the matrix. Getting the x,y,z was easy, the rotation is kinda there but I think Im in over my head.

Any ideas, or anyone know how to do what I'm after.



oh and woooo 1st post.
Buckeye
Buckeye
What you're looking for is "decompose matrix" or "decompose matrix code" which you can google for. There are several results with code examples. You can even find some discussions here on gamedev by searching using the box in the upper right-hand corner of this screen.
Please don't PM me with questions. Post them in the forums for everyone's benefit, and I can embarrass myself publicly. You don't forget how to play when you grow old; you grow old when you forget how to play.
bwhiting
bwhiting
woo speedy reply!

thanks for the answer, just did a search for that and have already found some things to try out.


:D

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.