Component:StaticMesh: Difference between revisions

From Resonite Wiki
m ProbablePrime moved page StaticMesh (Component) to Component:StaticMesh: Creating component Namespace
fix table for auto process
Line 20: Line 20:


<!--T:3-->
<!--T:3-->
== Usage ==
== Sync Delegates ==


{| class="wikitable" style="font-size:10pt;"
{{Table ComponentTriggers
! colspan="2" style="background: lightblue; font-size:10pt;" | Custom UI Elements
|ResaveMesh()|null|Will generate a new asset and URL, without destroying or modifying the previous one.
|- style="font-size:10pt; text-align:center; font-weight:bold;"
|RecalculateNormals()|null|Will recalculate all of the vertex normals on the mesh.
| Name
|RecalculateNormalsMerged()|null|
| Description
|RecalculateTangentsMikktspace()|null|
|-
|RecalculateTangentsSimple()|null|
| Resave Mesh
|FlipNormals()|null|Flips the vertex normals of the mesh (used to fix issues with shadows being on the lit side of a mesh)
| Will generate a new asset and URL, without destroying or modifying the previous one.
|ReverseWinding()|null|Reverses the vertex winding order of the mesh (used to fix issues where mesh is "inside out")
|-
|MakeDualSided()|null|Duplicates all vertices on the mesh, but with an inverted winding, which allows it to be seen from both sides.
| Recalculate Normals
|ConvertToFlatShading()|null|Duplicates all shared vertices on the mesh, so that the vertex normals for a given face can be perpendicular, resulting in a faceted (or "flat") look.
| Will recalculate all of the vertex normals on the mesh.
|ConvertToConvexHull()|null|
|-
|ConvertToPointCloud()|null|
| Recalculate Normals (Smooth Shading)
|MergeDoubles()|null|
|
|StripEmptyBlendshapes()|null|
|-
|StripBlendshapeNormals()|null|
| Recalculate Tangents (Mikktspace)
|StripBlendshapeTangents()|null|
|
|GetBoneList()|null|
|-
|GetBoneData()|null|
| Recalculate Tangents (Simple)
|TrimBoneWeightCount()|null|Trims the number of bones affecting any vertex in the mesh to 1, 2, 3 or 4 Bones.
|
|ScaleUVs()|null|Multiplies the texture coordinates of the mesh by the given value.
|-
}}
| Flip Normals
| Flips the vertex normals of the mesh (used to fix issues with shadows being on the lit side of a mesh)
|-
| Reverse Winding
| Reverses the vertex winding order of the mesh (used to fix issues where mesh is "inside out")
|-
| Make Dual Sided
| Duplicates all vertices on the mesh, but with an inverted winding, which allows it to be seen from both sides.
|-
| Convert to Flat Shading
| Duplicates all shared vertices on the mesh, so that the vertex normals for a given face can be perpendicular, resulting in a faceted (or "flat") look.
|-
| Convert to Convex Hull
|
|-
| Convert to Point Cloud
|
|-
| Merge Doubles
|
|-
| Strip Empty Blendshapes
|
|-
| Strip Blendshape Normals
|
|-
| Strip Blendshape Tangents
|
|-
| Get Bone List
|
|-
| Get Bone Data
|
|-
| Trim Vertex Bone Weights To <i>X</i>
| Trims the number of bones affecting any vertex in the mesh to 1, 2, 3 or 4 Bones.
|-
|Scale UVs
|Multiplies the texture coordinates of the mesh by the given value.
|-
|}
<!--T:4-->
<!--T:4-->
== Examples ==
== Examples ==

Revision as of 20:11, 5 November 2024


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


Component image 
Static Mesh component as seen in the Scene Inspector


The StaticMesh component is used to load a static mesh asset from the Uri specified in `URL`

Generally, you will not need to use this component directly, as it is created automatically when importing a new mesh, or when baking a Procedural Mesh

Fields

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.
URL Uri The Uri pointing to the .meshx asset to be loaded
Readable Bool

Sync Delegates

Triggers
Method Name Method type and Arguments. Description
ResaveMesh() null Will generate a new asset and URL, without destroying or modifying the previous one.
RecalculateNormals() null Will recalculate all of the vertex normals on the mesh.
RecalculateNormalsMerged() null
RecalculateTangentsMikktspace() null
RecalculateTangentsSimple() null
FlipNormals() null Flips the vertex normals of the mesh (used to fix issues with shadows being on the lit side of a mesh)
ReverseWinding() null Reverses the vertex winding order of the mesh (used to fix issues where mesh is "inside out")
MakeDualSided() null Duplicates all vertices on the mesh, but with an inverted winding, which allows it to be seen from both sides.
ConvertToFlatShading() null Duplicates all shared vertices on the mesh, so that the vertex normals for a given face can be perpendicular, resulting in a faceted (or "flat") look.
ConvertToConvexHull() null
ConvertToPointCloud() null
MergeDoubles() null
StripEmptyBlendshapes() null
StripBlendshapeNormals() null
StripBlendshapeTangents() null
GetBoneList() null
GetBoneData() null
TrimBoneWeightCount() null Trims the number of bones affecting any vertex in the mesh to 1, 2, 3 or 4 Bones.
ScaleUVs() null Multiplies the texture coordinates of the mesh by the given value.

Examples

Related Components