Skip to content

Conversation

@galister
Copy link
Collaborator

ResolveAvatarMask is really powerful, but the fact that it does not allow combining AvatarMaskBodyParts with transforms makes it a lot less useful.

My use case being the gesture layer. Say you have left hand, right hand, left ear and right ear layers.

The hand layers can be simply done via VrcAssets() and the ear layers can also be simply done with ResolveAvatarMask.

However, as we know, the first layer of the gesture controller needs to union the masks of all sub-layers, so now we need a mask, which contains the ear transforms, as well as the fingers as AvatarMaskBodyPart.

This PR aims to add a way to easily achieve this without forcing the user to manually create the AvatarMask, while maintaining functionality on existing overloads.

var bodyParts = new[] { AvatarMaskBodyPart.LeftFingers, AvatarMaskBodyPart.RightFingers };
var earTransforms = new[] { leftEar, rightEar };

var firstLayer = aac.CreateMainGestureLayer();
firstLayer.ResolveAvatarMask(earTransforms, bodyParts);

@hai-vr
Copy link
Owner

hai-vr commented Apr 25, 2022

This will likely be replaced with layer.WithAvatarMask(...) and aac.CopyAsset(...), where the avatar mask asset must be created by the user (might or might not through another fluent interface).

@hai-vr hai-vr added this to the V0.2.0 milestone Apr 25, 2022
@hai-vr
Copy link
Owner

hai-vr commented Apr 25, 2022

On second thought I think it's small enough to include it.

@hai-vr hai-vr added the feature label Apr 25, 2022
@hai-vr hai-vr modified the milestones: V0.2.0, V1.0.9910 Sep 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants