hai-vr / combo-gesture-expressions-av3

Attach face expressions to hand gestures, and make it react to Avatars 3.0's features, including Contacts, PhysBones and OSC.
https://docs.hai-vr.dev/docs/products/combo-gesture-expressions/reference
MIT License
296 stars 21 forks source link

WriteDefaults - Reconsider Write Defaults OFF as recommended by VRChat Documentation #146

Closed hai-vr closed 3 years ago

hai-vr commented 4 years ago

Since this weeks' update, VRChat Documentation recommends Write Defaults to be OFF.

This has several impacts on CGE:

FX Animations are not impacted by this change, as all FX animations are already generated exhaustively ( see https://hai-vr.github.io/combo-gesture-expressions-av3/corrections.html#exhaustive-animation-curves ). However, some FX logical layers may be.


Copy of the documentation as of today:

https://docs.vrchat.com/docs/avatars-30#write-defaults-on-states

Write Defaults is an option available on states in Animators in Unity. The documentation Unity provides is a bit sparse, and the actual function of this option is a bit cryptic! Basically, Write Defaults being On will tell the state to write the things it is animating as the new "default state" of that transform, blendshape, etc.

However, this causes some significant issues. Normally, when you're working with other game developers on a project, you agree on a standard. In VRChat, we're all game developers, so let's set the standard here.

VRChat does not use "Write Defaults" in our built-in and example animators. This means that only the actual properties that are in animations get played by any one animation node. We recommend that creators also follow this workflow, as it is easier to keep track of what properties will be animated through any specific layer.

The Write Defaults value defaults to on when you create a new node, so creators must be aware they will have to uncheck this value. If you want to use Write Defaults, you will have to keep track of all the possible properties that may be written by a node with this enabled.

We recommend keeping Write Defaults off and explicitly animating any parameter that needs to be set by the animation. Note that this may require adding "reset" animations or adding properties to the animation to "initialize" transforms in a specific orientation.


For reference, other Write Defaults related conversations months before this change:

https://twitter.com/Hibihira_Mii/status/1298790205034397697

Always Write Defaults, don't anyone dare uncheck Write Default in any state for their VRChat avatar animations, or there'll be all sort of headaches ...I totally didn't do that for mine, yep I didn't (exposed)

https://twitter.com/vr_hai/status/1298907005093019648

In ComboGestureExpressions, I went the other way: There's too many conflicts with other layers where Write Defaults must be OFF.

By default, CGE will generate new animations with Write Defaults OFF

https://twitter.com/Hibihira_Mii/status/1298912635103019008

I tweeted this cause someone has trouble with VRCLens causing their facial expression blend shape to not return/reset correctly Write Defaults OFF was the culprit and turning it on for all 4 of the states fixed it

https://twitter.com/vr_hai/status/1293348942370021376

ComboGestureExpressions V0.4.0 has been released on GitHub.

"Write Defaults" breaks if any other layer has an active state with "Write Defaults" off, causing residual face expressions to remain. CGE V0.4.0 tries to fix this by generating animations that resets all unused curves.

hai-vr commented 4 years ago

Blocked, see #150

hai-vr commented 3 years ago

Reopened due to https://github.com/hai-vr/combo-gesture-expressions-av3/issues/206

hai-vr commented 3 years ago

Attempted to fix this by allowing transforms of MeshRenderer and SkinnedMeshRenderer in the avatar mask, see #206 and #207

hai-vr commented 3 years ago

Only allowing renderers will break some prefabs that use transforms in the FX layer. Introspect the FX layer animations for maximum compatibility

hai-vr commented 3 years ago

Post mortem:

https://hai-vr.github.io/combo-gesture-expressions-av3/writedefaults