Rendering Biped Bones with DirectX 9

This is a discussion on Rendering Biped Bones with DirectX 9 within the Game Programming forums, part of the General Programming Boards category; I am new to DirectX and have an animated model up on screen thats in .X format, what i want ...

  1. #1
    Registered User
    Join Date
    Nov 2002
    Posts
    301

    Rendering Biped Bones with DirectX 9

    I am new to DirectX and have an animated model up on screen thats in .X format, what i want todo is render the bones, there is 35 of them

    Here is a list

    Bip01_R_UpperArm 0
    Bip01_Spine3 1
    Bip01_Neck 2
    Bip01_Spine2 3
    Bip01_Spine1 4
    Bip01_R_Clavicle 5
    Bip01_Spine 6
    Bip01_L_UpperArm 7
    Bip01_L_Clavicle 8
    Bip01_Pelvis 9
    Bip01_R_Thigh 10
    Bip01_L_Thigh 11
    Bip01_R_Calf 12
    Bip01_R_Foot 13
    Bip01_R_Toe0 14
    Bip01_L_Calf 15
    Bip01_L_Foot 16
    Bip01_L_Toe0 17
    Bip01_L_Forearm 18
    Bip01_L_Hand 19
    Bip01_L_Finger1 20
    Bip01_L_Finger11 21
    Bip01_L_Finger0 22
    Bip01_L_Finger01 23
    Bip01_L_Finger02 24
    Bip01_L_Finger12 25
    Bip01_R_Forearm 26
    Bip01_R_Hand 27
    Bip01_R_Finger1 28
    Bip01_R_Finger11 29
    Bip01_R_Finger0 30
    Bip01_R_Finger01 31
    Bip01_R_Finger02 32
    Bip01_R_Finger12 33
    Bip01_Head 34

    heres how the update function gets the bone matrix

    // set FinalMatrices to that frame's offset matrix
    FinalMatrices[i] = *pMeshContainer->pSkinInfo->GetBoneOffsetMatrix(i);

    // multiply that by the animated frame matrix
    FinalMatrices[i] *= *pMeshContainer->ppFrameMatrices[i];

    now do i need to convert the FinalMatrix array to D3DXVECTORS?

  2. #2
    RoD
    RoD is offline
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331
    Here is a link that has a good amount of information on working with the .x format. I'm an OpenGL person so I cannot answer you off hand

    xbdev.net 2012 (c) - Tutorials - Demos - Software and Game Development

  3. #3
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,515
    You can render spheres using the bone matrices which will give a good representation of the bone structure. Alternatively you can render cones oriented according to the bone transformation matrix that is being represented.
    Arrogance breeds bad code

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. DIRECTX 9 , Rendering Bones
    By Anddos in forum Game Programming
    Replies: 1
    Last Post: 03-13-2012, 08:11 PM
  2. Replies: 14
    Last Post: 12-31-2006, 08:49 AM
  3. Rendering problems (DirectX?)
    By OnionKnight in forum Tech Board
    Replies: 0
    Last Post: 08-17-2006, 12:17 PM
  4. bare bones grades program
    By stormy in forum C Programming
    Replies: 6
    Last Post: 09-13-2005, 04:06 PM
  5. Rendering primitives in DirectX
    By confuted in forum Game Programming
    Replies: 0
    Last Post: 08-16-2003, 10:47 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21