Component:SkinnedMeshRenderer: Difference between revisions

From Resonite Wiki
m Add to Renderer Category
describe what MergeBlendshapes does
 
(6 intermediate revisions by 5 users not shown)
Line 6: Line 6:
|Name=SkinnedMeshRenderer
|Name=SkinnedMeshRenderer
}}
}}
== Intoduction == <!--T:1-->
<!--T:1-->
The '''SkinnedMeshRenderer''' component is used for rendering animated/dynamic 3D meshes in the world, and applying materials to that mesh.  
The '''SkinnedMeshRenderer''' component is used for rendering animated/dynamic 3D meshes in the world, and applying materials to that mesh.  


Line 12: Line 12:
== Usage == <!--T:2-->
== Usage == <!--T:2-->
{{Table ComponentFields
{{Table ComponentFields
|Mesh|Mesh| The mesh to be rendered. Can be a [[StaticMesh (Component)|StaticMesh]] or a [[:Category:Components:Assets:Procedural Meshes|Procedural Mesh]]
|Mesh|{{RootFieldType|AssetRef`1|[[Type:Mesh|Mesh]]}}|TypeAdv0=true| The mesh to be rendered. Can be a [[StaticMesh (Component)|StaticMesh]] or a [[:Category:Components:Assets:Procedural Meshes|Procedural Mesh]]
|Materials|Material| A list of materials to be applied to the mesh
|Materials|{{RootFieldType|SyncAssetList`1|[[Type:Material|Material]]}}|TypeAdv1=true| A list of materials to be applied to the mesh
|MaterialPropertyBlocks|MaterialPropertyBlock|  
|MaterialPropertyBlocks|{{RootFieldType|SyncAssetList`1|[[Type:MaterialPropertyBlock|MaterialPropertyBlock]]}}|TypeAdv2=true|
|ShadowCastMode|ShadowCastMode| How this object will cast shadows onto the world, or if it <i>only</i> draws a shadow.
|ShadowCastMode|ShadowCastMode| How this object will cast shadows onto the world, or if it <i>only</i> draws a shadow.
|SortingOrder|Int|  
|MotionVectorMode|MotionVectorMode|
|SortingOrder|Int|
|BoundsComputeMethod|SkinnedBounds| How the bounds of this mesh will be calculated. Should be left as ''Static'' if possible, for performance reasons.
|BoundsComputeMethod|SkinnedBounds| How the bounds of this mesh will be calculated. Should be left as ''Static'' if possible, for performance reasons.
|ProxyBoundsSource|SkinnedMeshRenderer|  
|ProxyBoundsSource|'''[[Component:SkinnedMeshRenderer|SkinnedMeshRenderer]]'''|TypeAdv7=true|
|Bones|Slot| ''Automatically Assigned'' &mdash; List of bones present in this mesh
|ExplicitLocalBounds|BoundingBox|
|BlendShapeWeights|Float| ''Automatically Assigned'' &mdash; List of blendshapes present in this mesh, and their respective weights.
|Bones|{{RootFieldType|SyncRefList`1|[[Type:Slot|Slot]]}}|TypeAdv9=true| ''Automatically Assigned'' &mdash; List of bones present in this mesh
|BlendShapeWeights|{{RootFieldType|SyncFieldList`1|[[Type:Float|Float]]}}|TypeAdv10=true| ''Automatically Assigned'' &mdash; List of blendshapes present in this mesh, and their respective weights.
}}
}}
== Behavior ==
== Behavior ==
Line 31: Line 33:


<!--T:5-->
<!--T:5-->
{| class="wikitable" style="font-size:10pt;"
{{Table ComponentTriggers
! colspan="2" style="background: lightblue; font-size:10pt;" | Custom UI Elements
|SplitBlenshapeAlongAxis:[[Type:Func`7|Func`7]]&lt;[[Type:Int|Int]], [[Type:Axis3D|Axis3D]], [[Type:Float|Float]], [[Type:Float|Float]], [[Type:String|String]], [[Type:String|String]], [[Type:Task`1|Task`1]]&lt;[[Type:Bool|Bool]]&gt;&gt;|[[Type:Func`7|Func`7]]&lt;[[Type:Int|Int]], [[Type:Axis3D|Axis3D]], [[Type:Float|Float]], [[Type:Float|Float]], [[Type:String|String]], [[Type:String|String]], [[Type:Task`1|Task`1]]&lt;[[Type:Bool|Bool]]&gt;&gt;|false|
|- style="font-size:10pt; text-align:center; font-weight:bold;"
|BakeBlendshape:[[Type:Func`2|Func`2]]&lt;[[Type:Int|Int]], [[Type:Task`1|Task`1]]&lt;[[Type:Bool|Bool]]&gt;&gt;|[[Type:Func`2|Func`2]]&lt;[[Type:Int|Int]], [[Type:Task`1|Task`1]]&lt;[[Type:Bool|Bool]]&gt;&gt;|false|
| Name
|RemoveBlendshape:[[Type:Func`2|Func`2]]&lt;[[Type:Int|Int]], [[Type:Task`1|Task`1]]&lt;[[Type:Bool|Bool]]&gt;&gt;|[[Type:Func`2|Func`2]]&lt;[[Type:Int|Int]], [[Type:Task`1|Task`1]]&lt;[[Type:Bool|Bool]]&gt;&gt;|false|
| Description
|VisualizeApproximateBoneBounds:[[Type:ButtonEventHandler|ButtonEventHandler]]|[[Type:ButtonEventHandler|ButtonEventHandler]]|true|
|-
|VisualizeBoneBounds:[[Type:ButtonEventHandler|ButtonEventHandler]]|[[Type:ButtonEventHandler|ButtonEventHandler]]|true|
| Split into separate meshes by material
|ClearBoundsVisuals:[[Type:ButtonEventHandler|ButtonEventHandler]]|[[Type:ButtonEventHandler|ButtonEventHandler]]|true|
| Will split this mesh into additional submeshes, each having only one material
|SeparateOutBlendshapes:[[Type:ButtonEventHandler|ButtonEventHandler]]|[[Type:ButtonEventHandler|ButtonEventHandler]]|true|
|-
|StripEmptyBlendshapes:[[Type:ButtonEventHandler|ButtonEventHandler]]|[[Type:ButtonEventHandler|ButtonEventHandler]]|true|
| Merge submeshes with same material
|BakeNonDrivenBlendshapes:[[Type:ButtonEventHandler|ButtonEventHandler]]|[[Type:ButtonEventHandler|ButtonEventHandler]]|true|
| Will merge all submeshes that use the same material
|BakeToStaticMesh:[[Type:ButtonEventHandler|ButtonEventHandler]]|[[Type:ButtonEventHandler|ButtonEventHandler]]|true|
|-
|MergeBlendshapes:[[Type:ButtonEventHandler|ButtonEventHandler]]|[[Type:ButtonEventHandler|ButtonEventHandler]]|true|Combine all blendshapes in to one blendshape, which interpolates between the source blendshapes like a playback timeline
| Separate parts of mesh unaffected by blendshapes
|StripEmptyBones:[[Type:ButtonEventHandler|ButtonEventHandler]]|[[Type:ButtonEventHandler|ButtonEventHandler]]|true|
| Any part of the mesh that isn't animated by a [[Blendshape]] will be separated into a submesh
|ComputeExplicitBoundsFromPose:[[Type:ButtonEventHandler|ButtonEventHandler]]|[[Type:ButtonEventHandler|ButtonEventHandler]]|true|
|-
|ExtendExplicitBoundsFromPose:[[Type:ButtonEventHandler|ButtonEventHandler]]|[[Type:ButtonEventHandler|ButtonEventHandler]]|true|
| Strip empty blendshapes
|SortBlendshapesByName:[[Type:ButtonEventHandler|ButtonEventHandler]]|[[Type:ButtonEventHandler|ButtonEventHandler]]|true|
| Blendshapes that don't animate any vertices will be removed from the mesh
|SortBlendshapesByNameLength:[[Type:ButtonEventHandler|ButtonEventHandler]]|[[Type:ButtonEventHandler|ButtonEventHandler]]|true|
|-
|SplitSubmeshes:[[Type:Action|Action]]|[[Type:Action|Action]]|false|Will split this mesh into additional submeshes, each having only one material
| Strip empty bones
|MergeByMaterial:[[Type:Action|Action]]|[[Type:Action|Action]]|false|Will merge all submeshes that use the same material
| Bones that aren't weighted to any vertices will be removed from the mesh
}}
|-
| Visualize bone bounding boxes
| Shows the bounding boxes for all of the bones in this mesh
|-
| Visualize approximate merged bone sphere bounds
|  
|-
| Remove bone bounding box visuals
| Hides the bounding boxes for the bones in this mesh.
|-
|}


== Examples == <!--T:6-->
== Examples == <!--T:6-->
Line 67: Line 58:
== Related Components == <!--T:7-->
== Related Components == <!--T:7-->
</translate>
</translate>
[[Category:Components{{#translation:}}|SkinnedMeshRenderer (Component){{#translation:}}]]
[[Category:Components{{#translation:}}|Skinned Mesh Renderer]]
[[Category:Components:Rendering{{#translation:}}|SkinnedMeshRenderer (Component){{#translation:}}]]
[[Category:Components:Rendering{{#translation:}}|Skinned Mesh Renderer]]
[[Category:Renderer]]
[[Category:Renderer]]

Latest revision as of 13:57, 25 March 2025


This article or section is a Stub. You can help the Resonite Wiki by expanding it.


Component image 
SkinnedMeshRenderer component as seen in the Scene Inspector

The SkinnedMeshRenderer component is used for rendering animated/dynamic 3D meshes in the world, and applying materials to that mesh.


Usage

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. Some components stop their functionality when this field is disabled, but some don't.
Mesh Mesh The mesh to be rendered. Can be a StaticMesh or a Procedural Mesh
Materials list of Material A list of materials to be applied to the mesh
MaterialPropertyBlocks list of MaterialPropertyBlock
ShadowCastMode ShadowCastMode How this object will cast shadows onto the world, or if it only draws a shadow.
MotionVectorMode MotionVectorMode
SortingOrder Int
BoundsComputeMethod SkinnedBounds How the bounds of this mesh will be calculated. Should be left as Static if possible, for performance reasons.
ProxyBoundsSource SkinnedMeshRenderer
ExplicitLocalBounds BoundingBox
Bones list of Slot Automatically Assigned — List of bones present in this mesh
BlendShapeWeights direct SyncFieldList`1<Float> Automatically Assigned — List of blendshapes present in this mesh, and their respective weights.

Behavior

While it can be used for rendering static meshes, it is not recommended as there is a slight performance penalty for using SkinnedMeshRenderer, even if the animation features aren't used — Please try to use MeshRenderer where possible.

Special Functions

Triggers
Method Name Method type and Arguments. Is the method hidden? Description
SplitBlenshapeAlongAxis:Func`7<Int, Axis3D, Float, Float, String, String, Task`1<Bool>> Func`7<Int, Axis3D, Float, Float, String, String, Task`1<Bool>> X
BakeBlendshape:Func`2<Int, Task`1<Bool>> Func`2<Int, Task`1<Bool>> X
RemoveBlendshape:Func`2<Int, Task`1<Bool>> Func`2<Int, Task`1<Bool>> X
VisualizeApproximateBoneBounds:ButtonEventHandler ButtonEventHandler
VisualizeBoneBounds:ButtonEventHandler ButtonEventHandler
ClearBoundsVisuals:ButtonEventHandler ButtonEventHandler
SeparateOutBlendshapes:ButtonEventHandler ButtonEventHandler
StripEmptyBlendshapes:ButtonEventHandler ButtonEventHandler
BakeNonDrivenBlendshapes:ButtonEventHandler ButtonEventHandler
BakeToStaticMesh:ButtonEventHandler ButtonEventHandler
MergeBlendshapes:ButtonEventHandler ButtonEventHandler Combine all blendshapes in to one blendshape, which interpolates between the source blendshapes like a playback timeline
StripEmptyBones:ButtonEventHandler ButtonEventHandler
ComputeExplicitBoundsFromPose:ButtonEventHandler ButtonEventHandler
ExtendExplicitBoundsFromPose:ButtonEventHandler ButtonEventHandler
SortBlendshapesByName:ButtonEventHandler ButtonEventHandler
SortBlendshapesByNameLength:ButtonEventHandler ButtonEventHandler
SplitSubmeshes:Action Action X Will split this mesh into additional submeshes, each having only one material
MergeByMaterial:Action Action X Will merge all submeshes that use the same material

Examples

Related Components