imported>Xekri Created page with "<languages></languages> <translate> <!--T:1--> {{stub}} {{Infobox Component |Image=DynamicBlendShapeDriverComponent.png |Name=Dynamic Blend Shape Driver }} <!--T:2--> == Fiel..." |
fix types |
||
(3 intermediate revisions by 3 users not shown) | |||
Line 2: | Line 2: | ||
<translate> | <translate> | ||
<!--T:1--> | <!--T:1--> | ||
This component is used to map values to Blendshapes by name. | |||
{{Infobox Component | {{Infobox Component | ||
|Image=DynamicBlendShapeDriverComponent.png | |Image=DynamicBlendShapeDriverComponent.png | ||
Line 11: | Line 11: | ||
== Fields == | == Fields == | ||
{{Table ComponentFields | {{Table ComponentFields | ||
|Renderer|SkinnedMeshRenderer| | |Renderer|'''[[Component:SkinnedMeshRenderer|SkinnedMeshRenderer]]'''|TypeAdv0=true| The renderer to use to search for shapekeys with | ||
|BlendShapes|SyncList`1| | |BlendShapes|{{RootFieldType|SyncList`1|[[#BlendShape|BlendShape]]}}|TypeAdv1=true| A list of [[#BlendShape|BlendShape]] that are searched for in order on the <code>Renderer</Code>. | ||
| | |_lastRenderer|'''[[Component:SkinnedMeshRenderer|SkinnedMeshRenderer]]'''|TypeAdv2=true| The last renderer that was searched. This value is automatically filled and is read only. | ||
}} | |||
== BlendShape == | |||
{{Table TypeFields | |||
|Name|String| The name of the blendshape this subcomponent should look for to auto fill <code>Field</code> with | |||
|Value|float| the value to drive <code>Field</code> to. | |||
|Field|{{RootFieldType|FieldDrive`1|[[Type:Float|Float]]}}|TypeAdv2=true| is usually auto filled with a blendshape's value on the <code>Renderer</code> that has a blendshape name matching <code>Name</code>. | |||
}} | }} | ||
<!--T:3--> | <!--T:3--> | ||
== Usage == | == Usage == | ||
To efficiently use this component, first add some blendshape items to the <code>blendshapes</code> list and give the blendshapes names of the blendshapes on your target mesh. Next, add the skinned mesh renderer to <code>Renderer</code> you want to automatically find the blendshapes for. The component in the next update will automatically add the value sliders of the blendshapes it can find on the target <code>Renderer</code> to the <code>Field</code> on each <code>BlendShape</code>. | |||
{{Note|The fields will not all fill if it cannot find the blendshape for a <code>BlendShape</code>. The component will find the blendshapes in order of how they are listed in this component. If a blendshape cannot be found, the component will disable itself and not fill the drive. Either remove the <code>BlendShape</code> from the list of <code>BlendShapes</code> or fix the <code>Name</code> field of the offending <code>BlendShape</code>|warning}} | |||
To drive the blendshapes, just simply drive the <code>Value</code> on each <code>BlendShape</code> for each blendshape you want. Driving <code>Value</code> is not required, and this can be used in cases where you wanna toggle, cycle, or write with flux a blendshape's value without driving it. This can be useful if you don't wanna accidentally bake blendshapes you are still using despite them not being driven | |||
<!--T:4--> | <!--T:4--> | ||
== Examples == | == Examples == | ||
This component is useful for auto detecting blendshapes like expression drivers via systems. It is also useful for counteracting issues where adding blendshapes to an existing avatar will cause the blendshapes to change order in the array of blendshapes. Using this component allows for also automatically setting drives for blendshapes, without having references to them prior. | |||
For example, putting a [[Component:DynamicReferenceVariable|Dynamic Reference Variable<SkinnedMeshRenderer>]] for the mesh on an avatar for it's face, can allow for an external system to find the mmd blendshapes on a character using this component for mmd animations. | |||
<!--T:5--> | <!--T:5--> | ||
== Related Components == | == Related Components == | ||
</translate> | </translate> | ||
[[Category:Components{{#translation:}}|Dynamic Blend Shape Driver]] | [[Category:Components{{#translation:}}|Dynamic Blend Shape Driver]] | ||
[[Category:Components With Nested Types{{#translation:}}|Dynamic Blend Shape Driver]] | |||
[[Category:Components:Transform:Drivers{{#translation:}}|Dynamic Blend Shape Driver]] | [[Category:Components:Transform:Drivers{{#translation:}}|Dynamic Blend Shape Driver]] |
Latest revision as of 16:40, 9 April 2024
This component is used to map values to Blendshapes by name.
Fields
Name | Type | Description |
---|---|---|
persistent
|
Bool | Determines whether or not this item will be saved to the server. |
UpdateOrder
|
Int | Controls the order in which this component is updated. |
Enabled
|
Bool | Controls whether or not this component is enabled. |
Renderer
|
SkinnedMeshRenderer | The renderer to use to search for shapekeys with |
BlendShapes
|
list of BlendShape | A list of BlendShape that are searched for in order on the Renderer .
|
_lastRenderer
|
SkinnedMeshRenderer | The last renderer that was searched. This value is automatically filled and is read only. |
BlendShape
Name | Type | Description |
---|---|---|
Name
|
String | The name of the blendshape this subcomponent should look for to auto fill Field with
|
Value
|
float | the value to drive Field to.
|
Field
|
field drive of Float | is usually auto filled with a blendshape's value on the Renderer that has a blendshape name matching Name .
|
Usage
To efficiently use this component, first add some blendshape items to the blendshapes
list and give the blendshapes names of the blendshapes on your target mesh. Next, add the skinned mesh renderer to Renderer
you want to automatically find the blendshapes for. The component in the next update will automatically add the value sliders of the blendshapes it can find on the target Renderer
to the Field
on each BlendShape
.
To drive the blendshapes, just simply drive the Value
on each BlendShape
for each blendshape you want. Driving Value
is not required, and this can be used in cases where you wanna toggle, cycle, or write with flux a blendshape's value without driving it. This can be useful if you don't wanna accidentally bake blendshapes you are still using despite them not being driven
Examples
This component is useful for auto detecting blendshapes like expression drivers via systems. It is also useful for counteracting issues where adding blendshapes to an existing avatar will cause the blendshapes to change order in the array of blendshapes. Using this component allows for also automatically setting drives for blendshapes, without having references to them prior.
For example, putting a Dynamic Reference Variable<SkinnedMeshRenderer> for the mesh on an avatar for it's face, can allow for an external system to find the mmd blendshapes on a character using this component for mmd animations.