WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   vcc avatars: defining bone length (https://forum.worldviz.com/showthread.php?t=1174)

bjgold 08-07-2007 02:45 PM

vcc avatars: defining bone length
 
I'm new to the world of full character avatars, and as such I'm playing with the vcc_ avatars because they afford us the bones like in our Measurand motion capture system.

However, as the people wearing the system are different sizes, we need to set the bone lengths (especially the arms) for each person. Is there a way to do this in Vizard? Thanks to the forum, I can find the length of the upper and lower arms, using

Code:

                pos1 = leftShoulder.getPosition(viz.ABSOLUTE_WORLD)
                pos2 = upperLeftArm.getPosition(viz.ABSOLUTE_WORLD)
                length = vizmat.Distance(pos1,pos2)
                print 'distance between left shoulder and elbow, ', length

However, the distance seems to vary depending on the movement of the sensors, and thus must be some sort of relative distance, where we need an absolute distance.

mspusch 08-08-2007 11:24 AM

Sounds like you want to get the distance from a bone is from its parent bone. Get this distance by calling getPosition with the defualt arguemnt: viz.REL_PARENT.

You can set the bones position offset from its parent bone by calling the setPosition command. You can also pass the optional argument viz.ABS_GLOBAL to the setPosition command to set the bone in world corrdinates.


All times are GMT -7. The time now is 02:37 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC