Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

BVH offset vs. SL offset. In world pose tool

Gearsawe Stonecutter
Over there
Join date: 14 Sep 2005
Posts: 614
02-28-2006 20:09
I have been working on in world posing tool and have run into a little snag. Is SL using any of the offset information from the BVH file or is it only using the animation/pose angles? Im trying to make an adjustable mannequin with adjustable limb lengths/body parts so you can make custom fit poses. Poses always seem to suffer from this. You make a pose where a person has their hand on their chin or somthing. Then you upload it just to find your hand in your mouth or not even close to your face. Basically I'm trying to reverse engineer the Appearnce editor in SL. There is even a odd ball offset when you use a the llSitTarget which seems to be about .27m from the sit target and not at the hip root. This seems to be the only constant thing. There is a visable diffence from the SL offset in in the legs. The BHV offset seems to taper inward from the hips to the to the ankles as where in SL if you zero out all the angles your leg appear to drop straight down from your hips. Any Lindens out there like to give any inside information as to where the joint positions are before they are scaled from a custom appearances or even the scaling formulas applied to the skeleton.
Beatfox Xevious
is THOUSANDS OF PEOPLE
Join date: 1 Jun 2004
Posts: 879
02-28-2006 22:57
SL only reads joint rotations and hip position in the BVH. It completely ignores the offsets, going by the individual av's slider settings instead. That much I know for certain; someone with more knowledge in this area is welcome to chime in with the rest of the details.
_____________________
My Beatworks: Zephyr Chimes wind chimes, the KanaMaster Japanese kana tutor, and the FREE Invisibility Prim Public. Look for them at the Luskwood General Store in Lusk (144, 165).

"You have been frozen. You cannot move or chat. A pony will contact you via instant message (IM)."
- mysterious system message I received after making off with Pony Linden
Vince Plunkett
Registered Geek
Join date: 2 Jan 2006
Posts: 91
03-01-2006 01:48
Gearsawe, Beatfox is right about the offsets being affected by bone modifications you make to your av. However, that's probably not the reason you are seeing the discrepency between the legs tapering in vs. straight down for the 0-angle pose. When you say that you zero-out all the angles in SL, how are you doing that exactly? Are you uploading a single frame BVH with all the angles at 0? If it is more than one frame, is frame 2 the same as frame 1? Remember that frame 1 is the reference frame, so even if you zero out all the angle in all the frames, SL will think that none of the parts are moving and it will position the legs according to the default pose (which is legs straight down...not tapered).
Gearsawe Stonecutter
Over there
Join date: 14 Sep 2005
Posts: 614
03-01-2006 06:27
From: Vince Plunkett
Gearsawe, Beatfox is right about the offsets being affected by bone modifications you make to your av. However, that's probably not the reason you are seeing the discrepency between the legs tapering in vs. straight down for the 0-angle pose. When you say that you zero-out all the angles in SL, how are you doing that exactly? Are you uploading a single frame BVH with all the angles at 0? If it is more than one frame, is frame 2 the same as frame 1? Remember that frame 1 is the reference frame, so even if you zero out all the angle in all the frames, SL will think that none of the parts are moving and it will position the legs according to the default pose (which is legs straight down...not tapered).

Right now I'm just worrying about the single frame pose not sure how feasible animtion will be in SL or just to time consuming to setup. Although that explains alot when I was messing will the animations. But yes I did put in zeros in for all the angles in a one frame pose and upload to see where everything landed. Guess I need to know what the skeletal model is in SL (in metric would be nice but maybe asking to much). Right now I'm stuck with the method of posing the legs straight forward and bending the knees downward in order to get a rought idea how long the upper leg is. What I need is a starting point such as where the hip is from the Sit Target.
Vince Plunkett
Registered Geek
Join date: 2 Jan 2006
Posts: 91
03-01-2006 18:42
Gearsawe, just make a one frame animation with all the angles at 0 (the T-Pose) and the priorities set to 4. This should play as T-Pose in world. Now, the height of a T-Pose figure from bottom of the feet to eye-level is 72 units (whatever units those are...who knows?). So, just play the T-Pose animation on your avatar and measure its height from the ground to the height of its eyes using a block. This should give you the scale factore to convert from BVH units to SL meter coordinates.
Gearsawe Stonecutter
Over there
Join date: 14 Sep 2005
Posts: 614
03-01-2006 21:21
Did use the T pose as a starting point. There are things that have to be taken into account, over all scale (height), hip length, hip width, leg length, torso length, neck length, arm length and knee angle. These appearance setting all messing with joint distances. As far as the units for the T-pose where done in Inches but still do not match up to the default AV. It still appears that the Lindens programmers did not use the data from the T-Pose.BHV file for their model not by a long shot. Who knows what they use years ago.
Jesse Murdock
Moves You
Join date: 23 Jun 2004
Posts: 149
03-01-2006 21:23
From: Vince Plunkett
Now, the height of a T-Pose figure from bottom of the feet to eye-level is 72 units (whatever units those are...who knows?).


little less than an inch sounds like. How tall is the sl avatar mannequin? Five foot ten(average human height)?
_____________________
The writing's on the wall...
Gearsawe Stonecutter
Over there
Join date: 14 Sep 2005
Posts: 614
03-01-2006 22:41
Mannquien height is 1.5m (4'11";) to 2.5m (8'3";)
Seagel Neville
Far East User
Join date: 2 Jan 2005
Posts: 1,476
03-02-2006 00:40
I'm afraid that I don't understand what you're discussing. But about scale and bvh issue, you may get some from this thread.
_____________________
:) Seagel Neville :)
Gearsawe Stonecutter
Over there
Join date: 14 Sep 2005
Posts: 614
03-02-2006 10:58
What are the joint offset is SL before diffent Appearance scales have been applied to them? That is the question now that I know what to ask. Was hoping a Linden might say somthing. After over month of development this is the last bit of data needed.

The whole point is to make an accurate model of a SL Avatar. Let say you want a pose for a motor cycle. You could have a custom made pose so your foot hits gear shifter, hand on the handles and your butt firmly planted on the seat. Now because every one has bifferent scales applied to their joints not everone will line up the same. So you would size the mannenquin to the AV. Pose the mannenquin on the motor cycle, copy paste the output data into a BVH file, upload it to the servers and have a perfect fit pose, with the only external software being NotePad or what ever simple text editor you like to use. ;-P
Seagel Neville
Far East User
Join date: 2 Jan 2005
Posts: 1,476
03-02-2006 12:17
As Beatfox said, every joint has just the information of rotation in BVH. You can't deal with any scale in it. Presume the both forearms are bent 90 degrees forward along yRotate. A figure-A that someone set 0.7m its shoulder length might have 0.7m length between hands. If the length of the motercycle's handle was 1m, the figure-A would have to unfurl its arms a bit. But what if the figure-B's shoulder length was 0.5m, or the figure-C's one was 1.2m?
So is it the scale offset of figures that you want? Hey, you need to consider the thickness of their arms. Males and females are another. And it must have something to do with their arms' length, too. These are too complex to think and it doesn't seem worthwhile to expect it. This must be the fundamental question of SL avatar's system and using BVH for its posture.
_____________________
:) Seagel Neville :)
Vince Plunkett
Registered Geek
Join date: 2 Jan 2006
Posts: 91
03-02-2006 12:36
How about providing an animation that makes your avatar stand in a T-Pose? Then you would place your default T-Pose mannequin object directly over your avatar and use a HUD to adjust the lengths of arms, legs, torso and neck so that the mannequin matches up with your avatar. Once you've done this setup step one time, you can save that information. From then on, just load this custom mannequin and adjust rotations as normal to build your avatar specific pose.

EDIT: By the way, to do the scaling for a part, say the left arms, just scale the offsets for lForeArm and lHand in your mannequin by the scale factor set by the slider. You may have to play with the weights a little since SL might scale the hand offet differently than the forearm when it lengthens the arms (and other body parts). You can use the elbow as a test to see how far off you are with the weights. You only need to do determine the weights one time (since they will be the same for every avatar).
Seagel Neville
Far East User
Join date: 2 Jan 2005
Posts: 1,476
03-02-2006 13:01
From: Vince Plunkett
From then on, just load this custom mannequin and adjust rotations as normal to build your avatar specific pose.
That's interesting. :) Got an idea for your Avimator. :D
What about using this tool and allowing us to import our figures into your Avimator. And in the showing skelton mode, if we could tweak the joint balls... :cool:
_____________________
:) Seagel Neville :)
Jesse Murdock
Moves You
Join date: 23 Jun 2004
Posts: 149
03-02-2006 14:07
From: Gearsawe Stonecutter
Mannquien height is 1.5m (4'11";) to 2.5m (8'3";)


"mannequin" refers to the downloadable poser figures on the Second Life Website. Not the in game "avatar". And it comes in one size standard, if we don't know how big that is, it really doesnt do us much good since you don't know how much to adjust to size it to your avatar.

I am liking Vince and Seagal's tack here, pulling a duplicate of the exact avatar out of the SL would be *sweet* to say the least!
_____________________
The writing's on the wall...
Vince Plunkett
Registered Geek
Join date: 2 Jan 2006
Posts: 91
03-02-2006 14:10
From: Seagel Neville
That's interesting. :) Got an idea for your Avimator. :D
What about using this tool and allowing us to import our figures into your Avimator. And in the showing skelton mode, if we could tweak the joint balls... :cool:


Woah... now that's a useful tool. Cool idea Seagel. :cool: (Apologies to Gearsawe for sidetracking your thread...we'll stop now)
Gearsawe Stonecutter
Over there
Join date: 14 Sep 2005
Posts: 614
03-02-2006 14:14
From: Seagel Neville
That's interesting. :) Got an idea for your Avimator. :D
What about using this tool and allowing us to import our figures into your Avimator. And in the showing skelton mode, if we could tweak the joint balls... :cool:


Ah! You are one step ahead of me Seagel. Want to make sure I get thig thing working first. But as you can see HERE just when you get everthing lined up you make an adjustment just to find there is somthing off. See the foot sticking out with the one leg forward while the leg which is straight down lines up just fine and does not stick out.
Vince Plunkett
Registered Geek
Join date: 2 Jan 2006
Posts: 91
03-02-2006 14:17
From: Jesse Murdock
"mannequin" refers to the downloadable poser figures on the Second Life Website. Not the in game "avatar". And it comes in one size standard, if we don't know how big that is, it really doesnt do us much good since you don't know how much to adjust to size it to your avatar.


All that SL pulls out of a BVH file is the joint angles (and the hip position...it completely ignores the joint offsets). So if the in-game mannequin matches up to the T-Posed avatar (in terms of joint locations), then any poses you make in-game will look correct when you apply the exported BVH file to your avatar. You don't need to do any fancy measurements or calculations with the joint offsets.
Vince Plunkett
Registered Geek
Join date: 2 Jan 2006
Posts: 91
03-02-2006 14:35
From: Gearsawe Stonecutter
Ah! You are one step ahead of me Seagel. Want to make sure I get thig thing working first. But as you can see HERE just when you get everthing lined up you make an adjustment just to find there is somthing off. See the foot sticking out with the one leg forward while the leg which is straight down lines up just fine and does not stick out.


Gearsawe, very slick interface! :)

EDIT:
Have you seen these files in you SecondLife\character directory:

avatar_skeleton.xml
avatar_lad.xml

Together, they will probably solve all your problems... ;)
Gearsawe Stonecutter
Over there
Join date: 14 Sep 2005
Posts: 614
03-02-2006 15:05
Vince! That appears to be exactly what I'm looking for Thank you! The avatar_skeleton looks very familiar for the "bone name" and "pos". Is this what you used for your Avimator?
Seagel Neville
Far East User
Join date: 2 Jan 2005
Posts: 1,476
03-03-2006 04:43
From: Gearsawe Stonecutter
Ah! You are one step ahead of me Seagel. Want to make sure I get thig thing working first. But as you can see HERE just when you get everthing lined up you make an adjustment just to find there is somthing off. See the foot sticking out with the one leg forward while the leg which is straight down lines up just fine and does not stick out.
That explains it. It is really neat interface. :) And congrats to solve your problem. :)
_____________________
:) Seagel Neville :)
Vince Plunkett
Registered Geek
Join date: 2 Jan 2006
Posts: 91
03-03-2006 10:33
From: Gearsawe Stonecutter
Vince! That appears to be exactly what I'm looking for Thank you! The avatar_skeleton looks very familiar for the "bone name" and "pos". Is this what you used for your Avimator?


No, I just saw them for the first time yesterday while trying to solve your problem. :) I'm going to use them for Avimator since now, it will make it really easy to scale the mannequin properly for those people wanting to make highly accurate animations for their avatar.
Tiger Crossing
The Prim Maker
Join date: 18 Aug 2003
Posts: 1,560
03-03-2006 11:48
It would be nice if, in Second Life iteself, you could go into a Position Editing mode where your avatar freezes and "handles" appear at each joint. Selecting a handle brings up the normal rotaion edit locus we use to rotate prims, but it rotates that joint instead. Once done editing all the joints you want, and your own actual avatar is in the position you desire you can save this pose as an animation.

This would just be a one-frame pose, but with the addition of a window to track multiple frames, I can see the possibility of doing full animations.

All we lose this way is reverse kinematics, but that usually causes more problems for new animators than it helps them. (But it could still be added, as a toggle option later.)

If you are playing a moddable animation when you trigger this Position Editing mode, you are editing that animation (but like the Appearance Editing mode, you can save... or Save As... when done). If it's no mod, or you aren't playing anything, the avatar reverts to the standard starting pose before you start to edit. (And you can only Save As...)
_____________________
~ Tiger Crossing
~ (Nonsanity)
Oz Spade
ReadsNoPostLongerThanHand
Join date: 23 Sep 2003
Posts: 2,708
03-03-2006 11:53
From: Tiger Crossing
It would be nice if, in Second Life iteself, you could go into a Position Editing mode where your avatar freezes and "handles" appear at each joint. Selecting a handle brings up the normal rotaion edit locus we use to rotate prims, but it rotates that joint instead. Once done editing all the joints you want, and your own actual avatar is in the position you desire you can save this pose as an animation.

This would just be a one-frame pose, but with the addition of a window to track multiple frames, I can see the possibility of doing full animations.

All we lose this way is reverse kinematics, but that usually causes more problems for new animators than it helps them. (But it could still be added, as a toggle option later.)

If you are playing a moddable animation when you trigger this Position Editing mode, you are editing that animation (but like the Appearance Editing mode, you can save... or Save As... when done). If it's no mod, or you aren't playing anything, the avatar reverts to the standard starting pose before you start to edit. (And you can only Save As...)


Signed. (and fixed a typo)
_____________________
"Don't anticipate outcome," the man said. "Await the unfolding of events. Remain in the moment." - Konrad
Chandra Page
Build! Code. Sleep?
Join date: 7 Oct 2004
Posts: 360
03-03-2006 11:57
From: Tiger Crossing
It would be nice if, in Second Life iteself, you could go into a Position Editing mode where your avatar freezes and "handles" appear at each joint. Selecting a handle brings up the normal rotaion edit locus we use to rotate prims, but it rotates that joint instead. Once done editing all the joints you want, and your own actual avatar is in the position you desire you can save this pose as an animation.


I heartily endorse this product and/or feature.
_____________________
Come visit the In Effect main store and café
Drawbridge (160, 81)
Particle effects, fashion, accessories, and coffee!
On the Web at SL Exchange and SL Boutique
Gearsawe Stonecutter
Over there
Join date: 14 Sep 2005
Posts: 614
03-03-2006 15:04
yes it would be nice if SL had this build in, but I got sick of waiting. till this is added to SL gives us somthing to do in the mean time . Features of my posing system are, tha ability to load and save data using notecard(s), as many poses as you want can be stored in them. Menus thru chat hsitory window allows you to chose notecard then choose pose in note card. Same goes for the Avatar sizings. Two HUD systems one for Adjusting/Creating the pose. THe other for sizing the mannequin to your avatar. Can change chat channel it communicates on, so you can have more that one poser out at a time. Axis move to the joint you are adjusting. still in the proccess of adding a few more features and or bugs. and all done in 122 scripts and counting.

Animation is possible with it, but it is a real pain and hard to predict if it will run correctly once loaded into SL.
1 2