mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2025-03-09 23:34:56 +08:00
docs: document shape changer (#866)
This commit is contained in:
parent
865dae7dfc
commit
66f3e7075c
45
docs~/docs/reference/shape-changer.md
Normal file
45
docs~/docs/reference/shape-changer.md
Normal file
@ -0,0 +1,45 @@
|
||||
# Shape Changer
|
||||
|
||||
<!-- TODO: Find a good screenshot -->
|
||||
|
||||
The Shape Changer component modifies the shape keys (blendshapes) of another renderer on the avatar, when the Shape
|
||||
Changer component is enabled.
|
||||
|
||||
## When should I use it?
|
||||
|
||||
This component is intended to be used on outfit meshes, in order to delete or shrink parts of the avatar base model
|
||||
which are hidden by or interfere with the outfit mesh.
|
||||
|
||||
## When shouldn't I use it?
|
||||
|
||||
This component should not be used to modify blendshapes that are also animated by other animations. Animate the on/off
|
||||
state of the object containing the Shape Changer component instead.
|
||||
|
||||
## Setting up Shape Changer
|
||||
|
||||
Attach the Shape Changer component to an object in your outfit. Usually, this will be a skinned mesh renderer. Place the
|
||||
renderer you want to adjust (i.e. the base avatar body mesh) into the `Target Renderer` field.
|
||||
|
||||
Next, click the `+` icon to bring up a blendshape selection window. Clicking on the blendshape names will add them to the
|
||||
shape changer. The effect of the shape changer will be shown in the scene view in real time. Since the parts you select
|
||||
will likely be hidden underneath your clothing mesh, it can be helpful to use the 'overdraw' debug overlay in the scene
|
||||
view to see through the clothing and observe what's happening underneath.
|
||||
|
||||
### Shapechange modes
|
||||
|
||||
Each blendshape can be set to either 'Delete' or 'Set' mode. In 'Set' mode, the blendshape will be set to the value
|
||||
indicated when the Shape Changer is active. In 'Delete' mode, Shape Changer will attempt to delete the
|
||||
polygons affected by this blendshape - however, if the shape changer is not always active (i.e. there is an animation
|
||||
toggling it on and off), the blendshape will be animated to 100% instead.
|
||||
|
||||
In general, Delete should be used when the blendshape would shrink a bodypart to (almost) nothing, as it will produce a
|
||||
better optimized avatar when animations are not present.
|
||||
|
||||
### Interaction with animations
|
||||
|
||||
Shape Changer responds to animating the GameObject it's on, as well as its parents. Disabling these game objects will
|
||||
remove the influence of the Shape Changer on the target renderer. This can be useful for switching outfits, or removing
|
||||
parts of your outfit, and restoring the base mesh underneath.
|
||||
|
||||
If multiple shape changers try to operate the same blendshape at the same time, the lowest one in the hierarchy will
|
||||
generally win.
|
@ -0,0 +1,39 @@
|
||||
# Shape Changer
|
||||
|
||||
Shape Changerコンポーネントは、有効になっているときに、アバター内の別のレンダラーのシェープキー(Blend Shape)を変更します。
|
||||
|
||||
## いつ使うべきか?
|
||||
|
||||
このコンポーネントは、衣装メッシュに使用することを想定しており、衣装メッシュによって隠されたり干渉されたりする素体モデルの一部を自動的に削除または
|
||||
縮小します。
|
||||
|
||||
## 非推奨の場合
|
||||
|
||||
このコンポーネントは、他のアニメーションによっても操作されるシェイプキーを変更するために使用すべきではありません。
|
||||
変わりにShape Changerコンポーネントを含むオブジェクトのオン/オフの状態をアニメーション化してください。
|
||||
|
||||
## Shape Changerの設定
|
||||
|
||||
衣装ないのオブジェクトにShape Changerコンポーネントをアタッチします。通常、Skinned Mesh Rendererのあるオブジェクトにアタッチします。
|
||||
調整したいレンダラー(つまり、アバターの素体メッシュ)を`Target Renderer`フィールドに配置します。
|
||||
|
||||
次に、`+`アイコンをクリックしてシェイプキーの選択ウィンドウを表示します。シェイプキーの名前をクリックするとShape Changerに追加されます。
|
||||
Shape Changerの効果は、シーンビューでリアルタイムに表示されます。選択した部分は、衣装メッシュの下に隠れていることが多いため、シーンビューで
|
||||
'overdraw'デバッグオーバーレイを使用して、衣装の下を見透かしてみると、何が起きているかが見やすくなります。
|
||||
|
||||
### シェイプ変更モード
|
||||
|
||||
各シェイプキーは、'Delete'または'Set'モードに設定できます。'Set'モードでは、Shape Changerがアクティブなときに指定された値に
|
||||
シェイプキーが設定されます。 'Delete'モードでは、Shape Changerは指定のシェイプキーによって影響を受けるポリゴンを削除しようとします。
|
||||
ただし、Shape Changerが常にアクティブでない場合(つまり、それをオンとオフに切り替えるアニメーションがある場合)、代わりにシェイプキーを
|
||||
100%にアニメーションするようになります。
|
||||
|
||||
一般的に、Deleteは、シェイプキーが体の一部をなくすために使われる場合に使用されるべきです。アニメーションが存在しない場合には、より最適化された
|
||||
アバターが生成されます。
|
||||
|
||||
### アニメーションとの相互作用
|
||||
|
||||
Shape Changerは、そのGameObjectとその親のアニメーションに応答します。これらのゲームオブジェクトを無効にすると、Shape Changerが無効化されます。
|
||||
衣装を切り替えたり、衣装の一部を脱いだりしたときに、素体メッシュを自動的に復活させるのに便利です。
|
||||
|
||||
複数のShape Changerが同時に同じシェイプキーを操作しようとする場合、一般的にはHierarchyで見た時最も低い位置にあるShape Changerが優先されます。
|
Loading…
Reference in New Issue
Block a user