render the bones for this animated mesh

Started by
1 comment, last by Anddos 11 years, 11 months ago
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
:)
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

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?
:)

This topic is closed to new replies.

Advertisement