Closed zhou-fy closed 1 year ago
Hey thank you! There already has been an issue with this exact problem. I gonna add this request to the readme now :) Heres the code:
import bvhio
bvh = bvhio.readAsBvh('combat_idle_turn_270_R_001__A373.bvh')
# this removes the root bone if you want
bvh.Root = bvh.Root.Children[0]
for joint, index, depth in bvh.Root.layout():
# keep positons if it is the hip
joint.Channels = ['Xposition', 'Yposition', 'Zposition'] if joint.Name == "Hips" else []
# set order for euler rotation
joint.Channels.extend(['Zrotation', 'Yrotation', 'Xrotation'])
bvhio.writeBvh('new.bvh', bvh, percision=6)
Oh, I neglected that before. Your work is great and has helped me a lot. Thank you very much!
Hello, I am using your method to process Bandai-Namco-Research-Motion Dataset. Thank you very much for your great work! But I wonder if there is any way to converting non-root 6 channels to 3, while keeping the channel with root joint at 6? And how to ensure that the three channels of non- root are in the order of "Zrotation Yrotation Xrotation"? As the picture below shows: Thank you very much!