Problem with MD3 file format.

Started by
4 comments, last by kimryo 21 years, 1 month ago
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.
God create the world,we create another one.-Reference
Advertisement
md3 uses right-handed coordinate system.
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.
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]
God create the world,we create another one.-Reference
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.
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.
God create the world,we create another one.-Reference

This topic is closed to new replies.

Advertisement