Shrink the body under clothes
When to use this
Section titled “When to use this”Shoes and jackets often need the body under them pushed in with shrink blend shapes, so the skin does not show through the piece. AvatarDoc Shapes is a small component that sits on the piece itself. While the piece is on, it holds the shapes you list, whatever switches the piece: an AvatarDoc toggle, an outfit set, or a Modular Avatar animation. It also lets the piece's own shapes follow a shape of the body, such as a chest size. It adds no parameter and no FX layer.
To change shapes only from one toggle of your own, give that toggle a Blendshapes section instead: press + Add effect in its panel.
Hold a shape while the piece is on
Section titled “Hold a shape while the piece is on”-
In the Hierarchy, select the piece, such as the shoes.
-
In the inspector, press Add Component.
You should now see Unity's list of components, with a search field.
-
Type
AvatarDoc Shapesand pick AvatarDoc Shapes.You should now see the AvatarDoc Shapes inspector with two sections, Follows and While this object is on.
-
Under While this object is on, press Add.
You should now see a row with Mesh, Shape and Value. Value starts at 100.
-
In the row, press Pick a blendshape and pick the shrink shape, such as Shrink_Feet.
You should now see the shape on the button. Picking a shape also fills in Mesh with the mesh it belongs to, usually the body.
-
Set Value to how far the shape is held while the piece is on, from 0 to 100.
In the picture, 1 is Mesh, 2 Shape, 3 Value, and 4 Add matching shapes, which the next part uses.
While the piece is on, the shape holds its value. While the piece is off, the shape goes back to the weight the mesh has in the scene.
Make the piece's shapes follow the body
Section titled “Make the piece's shapes follow the body”For this part, the component must sit on the object that carries the piece's own skinned mesh.
-
Under Follows, press Add.
You should now see a row with Source mesh, Source shape and On this piece.
-
Press the button of Source shape and pick the body's shape, such as Chest_Big. Source mesh fills in with it.
-
Leave On this piece at Same name to write the piece's shape of the same name, or press it to pick another shape of the piece.
Every animation that moves the body's shape now moves the piece's shape with it. To add many rows at once, press Add matching shapes and pick a mesh: you get a row for every shape name the piece and that mesh both have.
What counts as switching the piece
Section titled “What counts as switching the piece”- An animation that turns the piece's own object on or off.
- An animation that turns a parent of the piece on or off, while the piece and every object between them are on in the scene and nothing else switches them.
AvatarDoc reads the animations of the avatar's FX controller right after Modular Avatar: AvatarDoc's own toggles, outfit sets and triggers, merged animators, and what Modular Avatar adds. Animations that VRCFury adds later are not seen, and Gesture or Action animations are left alone.
An animation that already sets the shape itself keeps its own value.
When two pieces hold the same shape, what switches them decides:
- One animation turns both on, or nothing switches either and both stay on: the larger value wins while both are on.
- One exclusive group switches them: only one of them is on at a time, so each holds its own value.
- Different things switch them: the one that comes later decides the shape. While its piece is on, that piece's value holds. While it is off, the shape goes back where it rests, even when the other piece is on. A piece that nothing switches always loses to one that is switched. Put both pieces on one toggle, or in one exclusive group.
From first to last, the order is: your avatar's own FX layers, then AvatarDoc's toggles and exclusive groups in menu order, its other triggers, its merged animators, what Modular Avatar adds, and last AvatarDoc's blend shape triggers and contact triggers set to Fade, followed by its pin layers. Layers, Write Defaults and pinned layers gives the same order.
A warning names the piece that wins. Before an upload, the inspector and the scene preview know only AvatarDoc's own toggles, triggers and merged animators and your avatar's own FX layers. The warning at upload also covers pieces that Modular Avatar switches. Pieces that VRCFury switches are not seen at all, as What counts as switching the piece says.
Platform, at the bottom of the component, leaves the piece's rules out of the PC or the Quest build.
Check it worked
Section titled “Check it worked”- Select the toggle that switches the piece. In its Scene preview row (Advanced mode), press On. The Scene view shows the piece and the held shapes.
- Press Summary in the AvatarDoc inspector's header. The summary lists every piece that carries the component, with how many rows it has.
- In Play mode with Gesture Manager, turn the piece on and off. See Your first toggle for Play mode.
If it does not work
Section titled “If it does not work”- A warning says an animation fades the piece in and out: AvatarDoc leaves that animation alone. Make it switch the piece on and off at once. See the message.
- A warning says an animation already writes the shape: that animation keeps its own value. Remove the shape from the animation if the rule should apply there. See the message.
- A warning says two pieces hold the same shape but different layers switch them: the shape follows the later layer alone. Put both pieces on one toggle, or in one exclusive group. See the message.
- An error says the object carries no skinned mesh: Follows rows need the component on the piece's own mesh. Move the component, or remove those rows. See the message.
Related
Section titled “Related”- AvatarDoc Shapes describes every field.
- Convert from VRCFury or Modular Avatar turns Modular Avatar's Blendshape Sync and Shape Changer into AvatarDoc Shapes rows.
- Two pieces fight over a shape in Troubleshooting.
Docs for AvatarDoc 0.7.1