retargetting rotation data to a joint

Hello there. Complete newbie here.. :)

After importing an fbx file with some rotation data, I want to retarget that rotation data to a joint of a character (ex: his index finger).   How would I make a script for that fuction?

 

Thanks.   

 

KC

Comments

  • What exactly needs to be done?

  • What exactly needs to be done?

    basically I want to retarget rotation data of an imported fbx node to finger joints of my character.    I can do this easy in maya via sdk (set driven keys).  But I am not familiar with daz scriting commads.   I can record rotation data of a mocap prop tracker and bring that in to daz as fbx.     Then I want to assign that rotation data to drive the finger joints (open and close finger poses). Will need to retarget the rotation data to chosen finger joints with  different multiplied values (strengths).   I can already do it in maya.  hope it makes sense. 

     

     

  • algovincianalgovincian Posts: 2,562

    You may want to also want to look into importing/exporting BVH files in DS. In the options dialog, you can save/load/edit maps (click on "Show Details" for the importer), allowing you to define how the rotations are mapped.

    - Greg

  • Yes, I would suggest trying BVH. If that doesn't work - you essentially have a rigged figure, or at least a skeleton, and want to transfer a hand pose from that to a Genesis figure so that it looks the same? Script could certainly get the rotations from one figure and apply the transformed rptation to another; it also provides the means to go from local transforms to world-space; the challenge would be to stitch all of that together.

  • freenomonfreenomon Posts: 3
    edited August 2020

    thanks for the suggestions.   I am not importing a skeleton but rather just a node with rotation data.    I have a mocap system that allows me to capture and export the rotation data of a tracker (prop).    it comes in as fbx and when imported that node has rotation animation when played.   I thought can simply save that node as pose preset and reapply to a daz figures joint of my choice (finger joints), but the data from pose preset gets applied to the root of the character and not the selected finger joint.   
     

    I can control click the posepreset data which makes a window popup and from there I can choose apply to selected,  but even when I do that it gets applied to the root of the character and not the finger joint.  

     

    So Im hoping I can do that via some scripting.

    Post edited by freenomon on
  • Ah, so not actually retargeting (which takes account, as I understand it, of different bone legths and zero positions) but simply copying across? Yes, you can do that with a script. I would get the selected node list (from DzScene), sort it into bones and (hopefully) just one prop. Then you can take the prop and use node.getXRotControl() etc. to get the rotation proeprties, then get the value from each, getXRotControl() (etc.) for each bone, setValue( rot) on each.

  • Thanks for your tip.   Will this work with animation data as well?     the prop is an animated node.. with rotation data..

Sign In or Register to comment.