Cool VL Viewer forum

View unanswered posts | View active topics It is currently 2024-03-19 07:59:01



Reply to topic  [ 6 posts ] 
@adjustheight 
Author Message

Joined: 2009-03-17 18:42:51
Posts: 5523
Reply with quote
I implemented a new command in the Cool VL Viewer v1.25.0.21 (@versionnum=2040002).

This command is @adjustheight and can be used to adjust the height of the avatar so that the animation it plays can also see its height adjusted by scripts relatively to the ground/floor. It uses the feature implemented in the Cool VL Viewer (and which also exists in most viewers implementing RestrainedLove) which already allows to set this adjustment manually.

The syntax of the command is:
@adjustheight:adjustment_in_centimeters=force

with adjustment_in_centimeters being an integer between -100 and 100 (note that the total height of the avatar is further restricted server-side).

This command will also be implemented in the next version of Marine's RLV (2.05).


2011-02-03 15:20:50
Profile WWW

Joined: 2009-03-17 18:42:51
Posts: 5523
Reply with quote
In today's release (Cool VL Viewer v1.25.0.22 with RestrainedLove v2.04.00.03), the definitive version of @adjustheight has been implemented, with an additional syntax beside the one already described above (@adjustheight:adjustement_in_centimeters=force which is still valid for constant offsets to use with (usually standing) animations not depending on the avatar shape).

You can now auto-correct the avatar height for a given animation via:
@adjustheight:ref_pelvis_to_foot_length_in_meters;scalar[;optional_delta_in_meters]=force

With:
  • ref_pelvis_to_foot_length_in_meters: the pelvis to foot length for which the animation is properly leveled with the floor.
  • scalar: the multiplicator to apply to the difference between the said reference length and the current pelvis to foot length to obtain the proper avatar height adjustment offset and keep the animation leveled with the floor.
  • optional_delta_in_meters: an optional (can be omitted) additional offset. It's normally unneeded, but could prove useful in some cases such as with prim-based avatars, or avatars with extremely thick or thin limbs (the thickness of the legs, for example, is not taken into account and a kneeling animation could then look badly leveled with some avatars while it's just the result of too thin (resulting in a slightly "floating" Av animation) or too thick (resulting in a slightly "sinking" Av animation) legs when compared with the reference shape that was used to find out the ref_pelvis_to_foot_length_in_meters)

The calculation done internally by @adjustheight is then
height_adjustment = (ref_pelvis_to_foot_length_in_meters - current_av_pelvis_to_foot_length_in_meters) * scalar + optional_delta_in_meters
and this "height_adjustment" value is added to the actual avatar height when the latter is passed to the sim server, resulting in a modification of the avatar level relatively to the floor.

Example, for the well known "nadu" kneeling anim:
@adjustheight:0.97;1.60=force.

Now, here is the "recipe" to find out what are "ref_pelvis_to_foot_length_in_meters" and "scalar" for a given animation (kneeling, crawling, lying, crouching, sitting anims... Standing anims normally don't depend on the avatar shape and would at worst need a constant height adjustment).

  • First, make sure to use the Cool VL Viewer v1.25.0.22 or newer (or a viewer able to tell you what is the pelvis to foot height for the shape your avatar is wearing).
  • Create a new shape in your inventory and "wear" it. This default shape (Ruth's shape) will be our reference (though theoretically, any shape should work, but for the limbs thickness issue: see the remark for "optional_delta_in_meters" above).
  • Remove any shoes your avatar would be wearing (though theoretically, wearing shoes or not won't matter, but for the fact that with shoes on, you can't see whether or not the feet touch the floor for animations where feet must be in contact with it).
  • Make sure the "avatar Z offset" (or whatever it is called in your viewer) is set to 0. In the Cool VL Viewer, you can adjust this offset manually and in real time from the spinner in the movement controls floater (open it from "View" -> "Movement Controls").
  • Play the animation you want to find the parameters for. If the avatar is seen "floating" above the floor, its legs to pelvis length is too large, if it is seen "sinking" into the floor, it is too small.
  • Right click on the Av and click on "Appearance..." to open the appearance editor floater. Now, play with the Body/Height parameter to change the "Pelvis to foot" value (seen at the bottom left of the floater for the Cool VL Viewer v1.25.0.22 and newer). You may also adjust the Legs/Leg length or Torso/Torso length parameters should you fail to reach the proper value for "Pelvis to foot" by just touching the Body/Height (a few animations seem to have been designed for insanely (and even impossibly) tall avatars...).
  • Save the shape and close the floater, then verify how well the avatar is leveled with the ground.
  • Repeat the above two steps till you find the exact matching pelvis to foot length by trial and error, and take note of that length (you just found ref_pelvis_to_foot_length_in_meters !).
  • Now, set the Body/Height to zero and take note of the pelvis to foot length (let's call it "min_foot_to_pelvis"). Save the shape and close the appearance floater.
  • Play the animation and use the "avatar Z offset" spinner in the movement controls floater (or whatever equivalent setting in your viewer) so to get the avatar properly leveled with the floor again. Take note of the corresponding "avatar Z offset" number (let's call it "min_size_offset") and do the following calculation: min_size_offset / (ref_pelvis_to_foot_length_in_meters - min_foot_to_pelvis). This number is "scalar".
  • Now, set the Body/Height to 100 and take note of the pelvis to foot length (let's call it "max_foot_to_pelvis"). Save the shape and close the appearance floater.
  • Play the animation and use the "avatar Z offset" spinner in the movement controls floater so to get the avatar properly leveled with the floor again. Take note of the corresponding "avatar Z offset" number (let's call it "max_size_offset") and do the following calculation: max_size_offset / (ref_pelvis_to_foot_length_in_meters - max_foot_to_pelvis). This number is "scalar" again and should be equal to the one you computed for min_foot_to_pelvis. If these numbers are not equal (taking only the first two decimals into account), then either one of the calculations was imprecise (may happen if ref_pelvis_to_foot_length_in_meters is too close from min_foot_to_pelvis or max_foot_to_pelvis: you should then value more the result obtained for the shape (min or max) that gave the largest foot to pelvis difference when compared to ref_pelvis_to_foot_length_in_meters), or you did something wrong...


2011-02-11 09:59:36
Profile WWW

Joined: 2009-03-17 18:42:51
Posts: 5523
Reply with quote
And here are the values to use with @adjustheight for some common free animations (these values are used by my scripts in the Cool Collar and Cool Cuffs). Since the animations name may be slightly different in various free animations packages, I also quote the creator name and, where necessary, a short description:

bara (by Dyonis Blanc): 0.97;1.71
belly (by Gaudeon Wu): 1.07;2.00
belly2 (by Chavo Raven): 1.38;1.30
bendover (by Remo Yossarian): 35 (constant offset)
bendover2 (by Chavo Raven): -60 (constant offset)
blowjob (by Gwinivere Grayson): 1.11;1.29
boot-lick (by Betsy Hastings): 0.99;1.26
boots (by Emma Thorn): 0.97;1.50
bracelets (by Gaudeon Wu): 1.00;1.66
cleaning (by Rasah Tigereye): 0.91;2.00
cutie (by Angela Ritter): 1.15;1.74
display (by Chavo Raven): 0.95;1.75
display2 (by David Valentino): 0.97;1.52
dog (by Chavo Raven): 0.95;1.32
doggie (by Dyonis Blanc): 0.92;1.12
dolllay (by Natasha Martov): 0.97;1.94
facedown (by Indika Herbst): 0.97;1.15
foot-kiss (by Nandana Singh): 1.15;1.49
goreanbow (by Dyonis Blanc): 0.99;0.87
jerkoff (by Ricky Michelson): 1.11;1.49
karta (by Dyonis Blanc): 0.91;1.00
kneel (hands in back) (by Chavo Raven): 1.01;1.50
kneel2 (raised on knees, hands below breasts) (by Chavo Raven): 1.30;1.00
leash (by Gaudeon Wu): 1.01;1.64
lesha (by Chavo Raven): 0.95;1.65
lips (by Gaudeon Wu): 1.01;1.56
nadu (by Dyonis Blanc): 0.97;1.60
naduw (by Dyonis Blanc): 0.97;1.60
naduw2 (left knee forward) (by Chavo Raven): 1.20;1.34
naduw3 (back arched) (by Chavo Raven): 1.28;1.75
open (sitting) (by Chavo Raven): 1.03;2.00
open2 (back arched) (by Chavo Raven): 0.95;1.21
open3 (laying, legs up in the air) (by Chavo Raven): 0.99;2.00
open4 (by Leopard Loveless): 0.95;1.85
plead (by Chavo Raven): 1.13;1.50
pleasure (by Gaudeon Wu): 0.99;1.61
shackleback (by Indika Herbst): 0.87;1.15
shacklefront (by Chavo Raven): 1.01;1.52
sheen (by Gaudeon Wu): 1.07;1.16
shesleen (by Dyonis Blanc): 0.91;1.00
sit-on-ground (by Ferran Brodsky): 0.97;1.67
sleep (by Ferran Brodsky): 1.03;1.85
spank (by Emma Thorn): 0.95;1.40
submission (by Dyonis Blanc): 0.97;1.55
submit (by Chavo Raven): 0.97;1.62
sula (by Dyonis Blanc): 0.99;2.00
sula-ki (by Chavo Raven): 1.24;1.38
touchsit (by Chavo Raven): 1.03;1.96
tower (by Dyonis Blanc): 0.97;1.60
whip (by Dyonis Blanc): 1.02;1.54
whip2 (by Chavo Raven): 1.02;1.69


2011-02-25 16:16:25
Profile WWW

Joined: 2010-03-14 21:12:58
Posts: 86
Reply with quote
Henri Beauchamp wrote:
And here are the values to use with @adjustheight for some common free animations (these values are used by my scripts in the Cool Collar and Cool Cuffs). Since the animations name may be slightly different in various free animations packages, I also quote the creator name and, where necessary, a short description:

bara (by Dyonis Blanc): 0.97;1.71
belly (by Gaudeon Wu): 1.07;2.00
...


Wow. Thanks for this, Henri. I was dreading figuring all these out. You've made my day!


2011-02-27 02:07:19
Profile

Joined: 2012-01-19 03:18:40
Posts: 196
Location: Sydney, Australia (UTC +10)
Reply with quote
This is an interesting command. I've put a lot of effort into writing avatar-height-sensitive sit scripts that don't use RLV, mainly because my partner is taller than I am. The big problem I find is that there doesn't seem to be a way to capture anything other than the overall height of an avatar, so avatars with longer or shorter legs as a proportion of their overall heights are difficult to accommodate.


2022-12-07 00:18:23
Profile

Joined: 2009-03-17 18:42:51
Posts: 5523
Reply with quote
linyifei wrote:
This is an interesting command. I've put a lot of effort into writing avatar-height-sensitive sit scripts that don't use RLV, mainly because my partner is taller than I am. The big problem I find is that there doesn't seem to be a way to capture anything other than the overall height of an avatar, so avatars with longer or shorter legs as a proportion of their overall heights are difficult to accommodate.

The Cool VL Viewer does give you a "Pelvis to sole" measurement (= "pelvis to foot" as quoted in the above procedure to find the @adjustheight parameters) in the customize Appearance menu.


2022-12-07 00:30:23
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 6 posts ] 

Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.