Jump to content
  • Advertisement
Sign in to follow this  
golgoth13

BVH Hierarchy (Mocap)

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

[font="Calibri"]How to find segment orientations with multiple children?[/font]

[font="Calibri"]Greetings,[/font]

[font="Calibri"]I’m not sure in wish category this should fall in but I figured I’ll give it a try here. For those not familiar with BVH (motion capture file format) there is no given initial rotation for each segment, to find the segment length and orientation you must take the distance between the current segment and its parent.[/font]

[font="Calibri"]Let’s take this example of hierarchy:[/font]

[font="Calibri"]Hips (0,0,0)[/font]
[font="Calibri"] -Chest (0,1,0)[/font]
[font="Calibri"] -[/font]LeftHip [font="Calibri"](1,0,0)[/font]
[font="Calibri"] -RightHip (-1,0,0)[/font]
[font="Calibri"][/font]

[font="Calibri"]The problem I’m facing is how to find what child of the Hips will determine its length and orientation?[/font]

[font="Calibri"]At first, it made sense to take the first child as a reference but I find out that sometimes the hierarchy come like this:[/font]

[font="Calibri"]Hips (0,0,0)[/font]
[font="Calibri"] -[/font]LeftHip [font="Calibri"](1,0,0)[/font]
[font="Calibri"] -RightHip (-1,0,0)[/font]
[font="Calibri"] -Chest (0,1,0)[/font]

[font="Calibri"]As far as I could see, this is a dead end… I hope someone could come up with a hint because I’m clueless.[/font]

[font="Calibri"]Thx in advance for any constructive input.[/font]
[font="Calibri"][/font]

Share this post


Link to post
Share on other sites
Advertisement
I'd rather define the chest bone be to be from hips->chest, that way the length of that bone is the same in either format. If you define the hips bone to be from hips->first-child then, yes, it will depend on which bone is the first child.

When I've used BVH's before I defined a bone to be a displacement & rotation pair, where the displacement is the offset from the parent bone. In the case of the root bone, its displacement is the overall position of the skeleton from the coordinate system's origin and you don't actually render that bone (it would look like a bone going from (0, 0, 0) to your skeleton... weird). So, now, when you're reading in the HIERARCHY section of a BVH you're just loading in all the displacements and leaving the rotation to be the identity (zero) rotation.

Share this post


Link to post
Share on other sites
[font="Calibri"]Hey dmatter, thanks for your comments,[/font]




I defined a bone to be a displacement & rotation pair, where the displacement is the offset from the parent bone.

[/quote]

Could you explain what you mean by rotation pair?


Unless I’m missing something, it would make sense if all hierarchies were identical and with the same name convention but sometimes, fingers are added for instance, so the same problem would rise with the wrist connecting fingers. Plus, Hips could be call Pelvis… etc.




So, now, when you're reading in the HIERARCHY section of a BVH you're just loading in all the displacements and leaving the rotation to be the identity (zero) rotation.

[/quote]

Leaving the rotations to zero would mean that the orientation of each segment (bone) are in WORLD coordinate and it also means that the actual rotations are not in synch with what it is actually rendered. Which wouldn’t be efficient and or practical. Or is it?


I’m new to mocap data but I find BVH files a bit sketchy. What would be a more robust and widely use mocap format these days?

Share this post


Link to post
Share on other sites

[font="Calibri"][size=2][/font]Could you explain what you mean by rotation pair?
I should have been clearer, I meant a pairing of displacement and rotation to define a bone.

Unless I’m missing something, it would make sense if all hierarchies were identical and with the same name convention but sometimes, fingers are added for instance, so the same problem would rise with the wrist connecting fingers. Plus, Hips could be call Pelvis… etc.[/quote]That would be nice although BVH is much more general that though; you could be mocapping a dog for example :)

Leaving the rotations to zero would mean that the orientation of each segment (bone) are in WORLD coordinate and it also means that the actual rotations are not in synch with what it is actually rendered. Which wouldn’t be efficient and or practical. Or is it?[/quote]It's not so bad, essentially you're just allowing a bone to displace in 3 directions rather than in 1. You can attempt to calculate a rotation of a bone based on its start and end points but you'll need to adjust the animations to accommodate that extra rotation.

I’m new to mocap data but I find BVH files a bit sketchy. What would be a more robust and widely use mocap format these days?[/quote]BVH certainly is widely used, there are others too though, not sure I can comment on which is best.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!