Jump to content
  • Advertisement
Sign in to follow this  
Lleran

Assimp question.

This topic is 2535 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi all. Now I'm developing a format using this library (COLLADA->my_format) and I have a question about the model nodes. Suppose I import the model which has only the skeleton from COLLADA. This is the part of COLLADA file:

<node id="node-Bip01" name="Bip01">
<matrix>-1.11659e-6 -0.9999999 0 0 0.9999999 -1.11659e-6 0 3.92653e-9 0 0 0.9999999 65.17503 0 0 0 1</matrix>
<node id="node-Bip01_Pelvis" name="Bip01_Pelvis">
<matrix>8.96323e-7 0.9999999 -1.266e-6 0 -8.96321e-7 1.266e-6 0.9999999 4.44089e-16 0.9999999 -8.96321e-7 8.96323e-7 0 0 0 0 1</matrix>
<node id="node-Bip01_Spine" name="Bip01_Spine">
<matrix>0.9955244 -0.09450607 -1.30992e-6 6.857667 0.09450607 0.9955244 3.7075e-6 -0.007909025 9.53674e-7 -3.8147e-6 1 2.38569e-13 0 0 0 1</matrix>
<node id="node-Bip01_Spine1" name="Bip01_Spine1">
<matrix>0.9074489 0.4201623 1.49847e-6 9.961844 -0.4201623 0.9074489 -1.68342e-7 -0.006903864 -1.43051e-6 -4.76837e-7 1 1.4421e-12 0 0 0 1</matrix>
<node id="node-Bip01_Spine2" name="Bip01_Spine2">
<matrix>0.9576223 -0.2880275 -7.13389e-7 9.563214 0.2880275 0.9576223 1.92079e-7 -0.008176597 6.27833e-7 -3.89414e-7 1 7.6294e-6 0 0 0 1</matrix>
<node id="node-Bip01_Neck" name="Bip01_Neck">
<matrix>0.9718181 -0.2357309 -9.26798e-7 11.60393 0.2357309 0.9718181 -2.2481e-7 -1.200218 9.53674e-7 -3.56239e-14 1 -9.16411e-13 0 0 0 1</matrix>
<node id="node-Bip01_Head" name="Bip01_Head">
<matrix>0.9929031 -0.1189281 -4.73453e-7 7.180753 0.1189281 0.9929031 -5.67093e-8 -3.02681e-6 4.76837e-7 -6.50238e-14 1 2.62219e-12 0 0 0 1</matrix>
<node id="node-Bip01_Ponytail1" name="Bip01_Ponytail1">
<matrix>-0.1493662 0.9887819 2.87308e-6 8.839306 -0.9887819 -0.1493662 -3.32749e-6 -5.572218 -2.86102e-6 -3.33786e-6 1 -1.52588e-5 0 0 0 1</matrix>
<node id="node-Bip01_Ponytail11" name="Bip01_Ponytail11">
<matrix>0.9105805 0.4133315 1.00309e-6 14.05035 -0.4133315 0.9105805 -4.55323e-7 -0.004968989 -1.10159e-6 -1.76652e-13 0.9999999 -6.71871e-12 0 0 0 1</matrix>
<node id="node-Bip01_Ponytail12" name="Bip01_Ponytail12">
<matrix>0.9995185 -0.03102709 -9.71259e-15 6.84024 0.03102709 0.9995185 -1.37909e-13 -0.004851814 7.28032e-14 2.05053e-13 0.9999999 7.6294e-6 0 0 0 1</matrix>
<node id="node-Bip01_Ponytail13" name="Bip01_Ponytail13">
<matrix>0.9863119 -0.1145049 -0.118651 6.101934 0.1136967 0.9934228 -0.01358097 -0.00462669 0.1194257 -9.51586e-5 0.9928433 -7.62939e-6 0 0 0 1</matrix>
<node id="node-Bip01_Ponytail14" name="Bip01_Ponytail14">
<matrix>0.9725637 -0.1944915 0.1276439 5.871038 0.1928515 0.9809043 0.02520426 -0.0104077 -0.1301085 1.03583e-4 0.9914999 1.51491e-5 0 0 0 1</matrix>



This is only the nodes of the hierarchy (no geometry). Assimp loads the correct hierarchy. The library also loads the geometric representation of each bone (mesh). How to solve this problem(maybe using post process steps...)?

Share this post


Link to post
Share on other sites
Advertisement
Did you export your bone meshes in your collada file? Usually you only need to export the bone hierarchy.
If I remember well, in 3ds max, you have to hide the bones meshes before exporting the model.
As you're working on a model converter you can just ignore the bone meshes and only convert the bone hierarchy into your custom file format.
I'm don't think there is a way to tell assimp to ignore some part of the geometry but I didn't use assimp for more then a year so I may be wrong.

Share this post


Link to post
Share on other sites
Well, as I understood this is a feature of the COLLADA exporter (and Assimp importer). Part of the correct COLLADA file

<node id="node-Bip01_L_Toe0" name="Bip01_L_Toe0" sid="joint22" type="JOINT">
<matrix>-4.37114e-8 -0.9999999 -1.34092e-14 6.761646 0.9999999 -4.37114e-8 4.91523e-7 10.59154 -4.91523e-7 5.72948e-15 0.9999999 -4.30573e-6 0 0 0 1</matrix>
</node>

XML node "node" must have an attribute (type="JOINT") to be a bone.

As you're working on a model converter you can just ignore the bone meshes and only convert the bone hierarchy into your custom file format.[/quote] Perhaps this is true. But there are many subtle points.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!