Archived

This topic is now archived and is closed to further replies.

kimryo

Problem with MD3 file format.

Recommended Posts

kimryo    100
In view matrix,I set Y axis as up-vec,but the MD3 character rendered lie on ground...what is wrong? thanks. We create world.

Share this post


Link to post
Share on other sites
Terren    122
If MD3 is the same as Md2, you need to swap the YZ axes when you read the model data in, then negate the new Z axis, and it should look right.

Share this post


Link to post
Share on other sites
kimryo    100
quote:
Original post by Terren
If MD3 is the same as Md2, you need to swap the YZ axes when you read the model data in, then negate the new Z axis, and it should look right.


I swaped the vertices' y,z value,but how about the rotation matrix?How to swap axis in DX?

thanks

We create world.


[edited by - kimryo on March 18, 2003 2:58:23 AM]

Share this post


Link to post
Share on other sites
Terren    122
Just swapping the YZ vertex position values when you read them in should be sufficient (oh - you should also negate the new Z value if the model appears upside down) and as long as you render with a RH coord system, the model should look fine.

Which rotation matrix?

Post some code so I can see exactly what your doing, particularly in setting up view/projection matrices.

Share this post


Link to post
Share on other sites
kimryo    100
The key feature of MD3 format is it has rotation matrix,which need spherical liner interpolation for rotation...
MD2 only do vertex translation but vertex rotation than MD3...

The rotation matrix is stored directly in file,I sould swap the rotation order of Y & Z axis.

We create world.

Share this post


Link to post
Share on other sites