In development there is a tool to fit the skeleton \ mocap actor under a set of points, including a precise calibration using ROM file.

* ROM – range of motion

Simple pelvis fitting

Let’s get a set of markers of the pelvis, calculate the area according to the points and move the rigid body in the center of the sphere. The count of the points should be no less than three. Script simple fit the pelvis under a set of markers

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
from pyfbsdk import *
actor = FBApplication().CurrentActor
if actor:
v = FBVector3d()
# get markers set for hips
markerSet = actor.MarkerSet
# calculate hips markers center
count = markerSet.GetMarkerCount(FBSkeletonNodeId.kFBSkeletonHipsIndex)
for i in range(0, count):
if markerSet.GetMarkerUsed(FBSkeletonNodeId.kFBSkeletonHipsIndex, i):
model = markerSet.GetMarkerModel(FBSkeletonNodeId.kFBSkeletonHipsIndex, i)
if model:
v2 = FBVector3d()
model.GetVector(v2)
v[0] = v[0] + v2[0]
v[1] = v[1] + v2[1]
v[2] = v[2] + v2[2]
count = markerSet.GetUsedMarkerCount(FBSkeletonNodeId.kFBSkeletonHipsIndex)
if (count > 0):
v[0] = v[0] / count
v[1] = v[1] / count
v[2] = v[2] / count
# set actor translation to the center of markers
actor.SetActorTranslation(v)
v[0] = 1.0
v[1] = 1.0
v[2] = 1.0
actor.SetDefinitionScaleVector(FBSkeletonNodeId.kFBSkeletonHipsIndex, v)

Tips From this can be repelled, by the way the pelvis is shifted to the center of the back …

Contact

If you are interested in such a development, feel free to contact. e-mail to: Neill<point>Solow<at>gmail<point>com

SkeletonBuilder WIP
Tagged on:             

Leave a Reply

Your email address will not be published. Required fields are marked *