secondlife / jira-archive

2 stars 0 forks source link

[BUG-231771] Avatar "Connectedness" - Auxiliary Animation Constraints #9168

Open sl-service-account opened 2 years ago

sl-service-account commented 2 years ago

How would you like the feature to work?

My proposal is to add support for 'Auxiliary' constraints to our animations, by adding some new supported target volume names to the animation format.

For the sake of being able to animate bones in relation to multiple objects/avatars at once, I propose we have 3 auxiliary slots that we can target to things. For the sake of discussion, lets call them {_}AUX1{}, _AUX2 and {_}AUX3{}.

From a script, we could tell the viewer what each of these Auxiliary constraints point to, using a new function which I propose as follows

 

Function {}llSetConstraintTarget{}(integer aux_slot, key target, string target_volume)
- -
- integer  aux_slot - One of AUX_1 AUX_2 or AUX_3
- key        target    -  Agent key or object key.
- string     target_volume - Agents only. One of the target volume names supported by the animation format such as L_HAND etc.


## Examples:
### Reach out and hold an object

Lets say we create an animation where the avatar should reach out and hold an object in world and look at that object. Our animation "{_}reach_out_and_touchthis{}" has {_}LHAND{}, _RHAND and HEAD constrained to _AUX1.  the animation does not contain any rotation information for our joints but does contain basic offset information in the constraints.

 

The following code snippet would cause our avatar to reach out and hold our _shinyobject with both hands.
java<br> <br>llSetConstraintTarget(AUX_1, shiny_object, ""); <br>llStartAnimation("reach_out_and_touch_this"); <br>
As the object moves around in world, our hands will attempt to follow the object because they are constrained to the object.

This could be useful for all sorts of things. Catch a ball, pick up an object, open a door (with your hand on the door handle). Get on a bicycle and have your hands and feet placed correctly, and animate correctly. There are many many, many more possibilities.
### Hold hands

Auxiliary constraints would allow us to better connect with other avatars in our world. For example, we could create hand holding animations where the hands will always line up.

Lets say we create our animation "hold_hands_l" and constrain our R_HAND to AUX_1. If we target _AUX1 to {_}mypartner{}'s left hand, our right hand will reach for their left!
java<br> <br>llSetConstraintTarget(AUX_1, my_partner, "L_HAND"); <br>llStartAnimation("hold_hands_l"); <br>
Now we just need to play hold_hands_r from my partners avatar, and we're both holding hands together. Our hands are constrained to each other and will always line up, no matter if we are big or small.

Humans make contact with each other in all sorts of ways, and this could be used for more than just hand holding. Maybe you need to seal the deal and shake hands at a business meeting. High five your team mate, or kiss your loved one. With auxiliary constraints, you'd never miss!
# Why is this feature important to you? How would it benefit the community?

I think that what would help 'sell' the idea that SecondLife is a truly connected virtual world is if our Avatars could be animated in such a way that they really were 'connected' to it, with bones moving in relation to objects and people in-world.

SecondLife is already part way there. It has animation constraint support (IK) which in laymans terms allows one bone to move in relation to another. In technical terms this is done through 'target volumes' for example we can target L_HAND to HEAD to move our hand in relation to our head.|

Original Jira Fields | Field | Value | | ------------- | ------------- | | Issue | BUG-231771 | | Summary | Avatar "Connectedness" - Auxiliary Animation Constraints | | Type | New Feature Request | | Priority | Unset | | Status | Accepted | | Resolution | Accepted | | Reporter | Extrude Ragu (extrude.ragu) | | Created at | 2022-02-09T18:47:27Z | | Updated at | 2022-02-16T18:53:41Z | ``` { 'Build Id': 'unset', 'Business Unit': ['Platform'], 'Date of First Response': '2022-02-09T16:37:25.456-0600', 'How would you like the feature to work?': 'Using the full fat editor', 'ReOpened Count': 0.0, 'Severity': 'Unset', 'Target Viewer Version': 'viewer-development', 'Why is this feature important to you? How would it benefit the community?': 'Check back later', } ```
sl-service-account commented 2 years ago

Lucia Nightfire commented at 2022-02-09T22:37:25Z, updated at 2022-02-09T22:40:26Z

This "reads" like an attempt to offer something similar to global target references and IK feedback effect, the "global target and IK insertion" protocol I've been saying we've needed for years.

My only critique is that the constraints seem to lack bone local pos/rot offset, weighting and motion range like point/plane.

Also, I don't think target names will work. Object/Agent keys would be needed instead.

sl-service-account commented 2 years ago

Extrude Ragu commented at 2022-02-10T12:29:54Z

My only critique is that the constraints seem to lack bone local pos/rot offset, weighting and motion range like point/plane.  

Are you imagining setting these from a script?

The Internal Animation Format already has support for point/plane and rotation in constraints

For example an animation where L_HAND is constrained to AUX_1 might look like this inside the .ANIM file:-

field val
- - -
chain_length 3
constraint_type 0: point, 1: plane
source_volume L_HAND
source_offset <0,0,0>
target_volume AUX_1
target_offset <0,0,0>
target_dir (rotation)<0,0,0>
etc  



 |

sl-service-account commented 2 years ago

Lucia Nightfire commented at 2022-02-10T21:08:04Z


Are you imagining setting these from a script? 

Of course.

If we do not have a means of overriding animation data, we're still back to hard asset data environment with 0 modularity.

We absolutely need a scripted means to adjust for differences between two agents of variable body size/shape as well as adjust for an agent of variable body size/shape and an in-world object's variable pos/rot/size.

 

 

 

sl-service-account commented 2 years ago

Kyle Linden commented at 2022-02-16T18:53:41Z

Thank you for the suggestion. We may implement some version of this at a future data.