Jump to content
  • Advertisement
Sign in to follow this  
Anddos

render the bones for this animated mesh

This topic is 2230 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

ok ive asked this before but now i have a compiled version so you know what i mean
i want to render the bones as LINELIST, the trouble is i don't know how to get the matrix for each bone and convert correctly so i can render them as vertex's.

this is the file,its clean so dont worry ,
https://rapidshare.com/files/3277186560/AnimatedMesh.rar
compiled exe with visual studio 2008 so you need a vs version greater than this because i dont think you can convert projects downwards...

https://rapidshare.com/files/2798286316/AnimatedMesh_Source_Code.rar

this is a list of bones

Bip01_R_UpperArm
Bip01_Spine3
Bip01_Neck
Bip01_Spine2
Bip01_Spine1
Bip01_R_Clavicle
Bip01_Spine
Bip01_L_UpperArm
Bip01_L_Clavicle
Bip01_Pelvis
Bip01_R_Thigh
Bip01_L_Thigh
Bip01_R_Calf
Bip01_R_Foot
Bip01_R_Toe0
Bip01_L_Calf
Bip01_L_Foot
Bip01_L_Toe0
Bip01_L_Forearm
Bip01_L_Hand
Bip01_L_Finger1
Bip01_L_Finger11
Bip01_L_Finger0
Bip01_L_Finger01
Bip01_L_Finger02
Bip01_L_Finger12
Bip01_R_Forearm
Bip01_R_Hand
Bip01_R_Finger1
Bip01_R_Finger11
Bip01_R_Finger0
Bip01_R_Finger01
Bip01_R_Finger02
Bip01_R_Finger12
Bip01_Head Edited by Anddos

Share this post


Link to post
Share on other sites
Advertisement
You don't need a matrix for each bone, only the position.

Actually, when people say bones, they really mean joints, and that's what those are.

You get the position of the first joint (root joint), then find the positions of it's children, and draw a line between the root joint and each of it's children. then do the same thing for the children.

Joints are always organized in a hierarchy (they do not appear to be in your post, which will make it take longer to search through each joint to find it's children, instead of going down the list). They have an ID and ParentID. The first (root) joint usually has an ID of "0" and a ParentID of "-1" so you know it's the root joint. You will start by finding the position of the joint with an ID of "0", then find all other joints that have a parentID of "0", and draw a line between the joint with a "0" id and each of it's children. You will then find the joint with the ID of "1" and find it's children and draw lines to them. Just keep going down the ID list until you run out of joints. Don't forget to set the topology to linelist, since that can easily happen

Share this post


Link to post
Share on other sites

You don't need a matrix for each bone, only the position.

Actually, when people say bones, they really mean joints, and that's what those are.

You get the position of the first joint (root joint), then find the positions of it's children, and draw a line between the root joint and each of it's children. then do the same thing for the children.

Joints are always organized in a hierarchy (they do not appear to be in your post, which will make it take longer to search through each joint to find it's children, instead of going down the list). They have an ID and ParentID. The first (root) joint usually has an ID of "0" and a ParentID of "-1" so you know it's the root joint. You will start by finding the position of the joint with an ID of "0", then find all other joints that have a parentID of "0", and draw a line between the joint with a "0" id and each of it's children. You will then find the joint with the ID of "1" and find it's children and draw lines to them. Just keep going down the ID list until you run out of joints. Don't forget to set the topology to linelist, since that can easily happen


so how do you get there position for each bone?

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!