Navigation
API > API/Plugins > API/Plugins/GeometryScriptingCore > API/Plugins/GeometryScriptingCore/UGeometryScriptLibrary_MeshNorma-
Overloads
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static static UPARAM
(
DisplayName |
Flip/Invert the normal vectors of TargetMesh by multiplying them by -1, as well as reversing the mesh triangle orientations, ie triangle (a,b,c) becomes (b,a,c) | GeometryScript/MeshNormalsFunctions.h |
|
static static UPARAM
(
DisplayName |
Flip/Invert the normal vectors of the triangles in a given selection of TargetMesh. | GeometryScript/MeshNormalsFunctions.h |
|
static static UPARAM
(
DisplayName |
Attempt to repair inconsistent normals in TargetMesh. | GeometryScript/MeshNormalsFunctions.h |
|
static static UPARAM
(
DisplayName |
Recompute the normals of TargetMesh by averaging the triangle/face normals around each vertex, using combined area and angle weighting. | GeometryScript/MeshNormalsFunctions.h |
|
static static UPARAM
(
DisplayName |
Recompute the normals of TargetMesh by setting the normals of each triangle vertex to the triangle/face normal. | GeometryScript/MeshNormalsFunctions.h |
|
static static UPARAM
(
DisplayName |
Recompute the normals of TargetMesh using the given CalculateOptions. | GeometryScript/MeshNormalsFunctions.h |
|
static static UPARAM
(
DisplayName |
Recompute the normals of TargetMesh on all the triangles/vertices of the given Selection using the given CalculateOptions. | GeometryScript/MeshNormalsFunctions.h |
|
static static UPARAM
(
DisplayName |
Recompute hard edges / split-normals for TargetMesh based on the provided SplitOptions, and then recompute the new shared triangle-vertex normals using the given CalculateOptions. | GeometryScript/MeshNormalsFunctions.h |
|
static static UPARAM
(
DisplayName |
Set or remove split normals (aka sharp normals) for all edges in the Selection | GeometryScript/MeshNormalsFunctions.h |
|
static static UPARAM
(
DisplayName |
Set the triangle-vertex normals for the given TriangleID on the TargetMesh. | GeometryScript/MeshNormalsFunctions.h |
|
static static UPARAM
(
DisplayName |
Set all normals in the TargetMesh Normals Overlay to the specified per-vertex normals | GeometryScript/MeshNormalsFunctions.h |
|
static static UPARAM
(
DisplayName |
Get a list of single normal vectors for each mesh vertex in the TargetMesh, derived from the Normals Overlay. | GeometryScript/MeshNormalsFunctions.h |
|
static static UPARAM
(
DisplayName |
Check if the TargetMesh has a Tangents Attribute Layer enabled | GeometryScript/MeshNormalsFunctions.h |
|
static static UPARAM
(
DisplayName |
Remove any existing Tangents Attribute Layer from the TargetMesh | GeometryScript/MeshNormalsFunctions.h |
|
static static UPARAM
(
DisplayName |
Recompute Tangents for the TargetMesh, using the method and settings specified by FGeometryScriptTangentsOptions | GeometryScript/MeshNormalsFunctions.h |
|
static static UPARAM
(
DisplayName |
Set all tangents in the TargetMesh Tangents Overlays to the specified per-vertex tangents | GeometryScript/MeshNormalsFunctions.h |
|
static static UPARAM
(
DisplayName |
Get a list of single tangent vectors for each mesh vertex in the TargetMesh, derived from the Tangents Overlays. | GeometryScript/MeshNormalsFunctions.h |
|
static static UPARAM
(
DisplayName |
Update the Normals and/or Tangents at VertexID of TargetMesh. | GeometryScript/MeshNormalsFunctions.h |
|
UPARAM(DisplayName)
Description
Flip/Invert the normal vectors of TargetMesh by multiplying them by -1, as well as reversing the mesh triangle orientations, ie triangle (a,b,c) becomes (b,a,c)
| Name | UPARAM |
| Type | function |
| Header File | /Engine/Plugins/Runtime/GeometryScripting/Source/GeometryScriptingCore/Public/GeometryScript/MeshNormalsFunctions.h |
| Include Path | #include "GeometryScript/MeshNormalsFunctions.h" |
UFUNCTION (BlueprintCallable, Category="GeometryScript|Normals",
Meta=(ScriptMethod, HidePin="Debug"))
static static UPARAM
(
DisplayName
)
UPARAM(DisplayName)
Description
Flip/Invert the normal vectors of the triangles in a given selection of TargetMesh. For edge or vertex selections, normals for the triangles touching the selected edges or vertices will be flipped.
| Name | UPARAM |
| Type | function |
| Header File | /Engine/Plugins/Runtime/GeometryScripting/Source/GeometryScriptingCore/Public/GeometryScript/MeshNormalsFunctions.h |
| Include Path | #include "GeometryScript/MeshNormalsFunctions.h" |
UFUNCTION (BlueprintCallable, Category="GeometryScript|Normals",
Meta=(ScriptMethod, HidePin="Debug"))
static static UPARAM
(
DisplayName
)
Parameters
| Name | Remarks |
|---|---|
| bFlipTriangleOrientation | If true, triangles are flipped by reversing the mesh triangle orientations, ie triangle (a,b,c) becomes (b,a,c) |
| bFlipNormalDirection | If true, normals of vertices on the selected triangles are flipped by multiplying them by -1 |
UPARAM(DisplayName)
Description
Attempt to repair inconsistent normals in TargetMesh. Currently this is done in two passes. In the first pass, triangles with reversed orientation from their neighours are incrementally flipped until each connected component has a consistent orientation, if this is possible (note that this is not always globally possible, eg for a mobius-strip topology there is no consistent orientation). In the second pass, the "global" orientation is detected by casting rays from outside the mesh. This may produce incorrect results for meshes that are not closed.
| Name | UPARAM |
| Type | function |
| Header File | /Engine/Plugins/Runtime/GeometryScripting/Source/GeometryScriptingCore/Public/GeometryScript/MeshNormalsFunctions.h |
| Include Path | #include "GeometryScript/MeshNormalsFunctions.h" |
UFUNCTION (BlueprintCallable, Category="GeometryScript|Normals",
Meta=(ScriptMethod, HidePin="Debug"))
static static UPARAM
(
DisplayName
)
UPARAM(DisplayName)
Description
Recompute the normals of TargetMesh by averaging the triangle/face normals around each vertex, using combined area and angle weighting. Each vertex will have a single normal, ie there will be no hard edges.
| Name | UPARAM |
| Type | function |
| Header File | /Engine/Plugins/Runtime/GeometryScripting/Source/GeometryScriptingCore/Public/GeometryScript/MeshNormalsFunctions.h |
| Include Path | #include "GeometryScript/MeshNormalsFunctions.h" |
UFUNCTION (BlueprintCallable, Category="GeometryScript|Normals",
Meta=(ScriptMethod, HidePin="Debug", DisplayName="Set Mesh To Per Vertex Normals (Computed)"))
static static UPARAM
(
DisplayName
)
UPARAM(DisplayName)
Description
Recompute the normals of TargetMesh by setting the normals of each triangle vertex to the triangle/face normal. Each vertex will have a unique normal in each triangle, ie there will be hard edges / split normals at every mesh edge
| Name | UPARAM |
| Type | function |
| Header File | /Engine/Plugins/Runtime/GeometryScripting/Source/GeometryScriptingCore/Public/GeometryScript/MeshNormalsFunctions.h |
| Include Path | #include "GeometryScript/MeshNormalsFunctions.h" |
UFUNCTION (BlueprintCallable, Category="GeometryScript|Normals",
Meta=(ScriptMethod, HidePin="Debug", DisplayName="Set Mesh To Facet Normals"))
static static UPARAM
(
DisplayName
)
UPARAM(DisplayName)
Description
Recompute the normals of TargetMesh using the given CalculateOptions. This method will preserve any existing hard edges, ie each shared triangle-vertex normal is recomputed by averaging the face normals of triangles that reference that shared triangle-vertex normal
| Name | UPARAM |
| Type | function |
| Header File | /Engine/Plugins/Runtime/GeometryScripting/Source/GeometryScriptingCore/Public/GeometryScript/MeshNormalsFunctions.h |
| Include Path | #include "GeometryScript/MeshNormalsFunctions.h" |
UFUNCTION (BlueprintCallable, Category="GeometryScript|Normals",
Meta=(ScriptMethod, HidePin="Debug"))
static static UPARAM
(
DisplayName
)
UPARAM(DisplayName)
Description
Recompute the normals of TargetMesh on all the triangles/vertices of the given Selection using the given CalculateOptions. This method will preserve any existing hard edges, ie each shared triangle-vertex normal is recomputed by averaging the face normals of triangles that reference that shared triangle-vertex normal
| Name | UPARAM |
| Type | function |
| Header File | /Engine/Plugins/Runtime/GeometryScripting/Source/GeometryScriptingCore/Public/GeometryScript/MeshNormalsFunctions.h |
| Include Path | #include "GeometryScript/MeshNormalsFunctions.h" |
UFUNCTION (BlueprintCallable, Category="GeometryScript|Normals",
Meta=(ScriptMethod, HidePin="Debug"))
static static UPARAM
(
DisplayName
)
UPARAM(DisplayName)
Description
Recompute hard edges / split-normals for TargetMesh based on the provided SplitOptions, and then recompute the new shared triangle-vertex normals using the given CalculateOptions. The normal recomputation is identical to calling RecomputeNormals.
| Name | UPARAM |
| Type | function |
| Header File | /Engine/Plugins/Runtime/GeometryScripting/Source/GeometryScriptingCore/Public/GeometryScript/MeshNormalsFunctions.h |
| Include Path | #include "GeometryScript/MeshNormalsFunctions.h" |
UFUNCTION (BlueprintCallable, Category="GeometryScript|Normals",
Meta=(ScriptMethod, HidePin="Debug"))
static static UPARAM
(
DisplayName
)
UPARAM(DisplayName)
Description
Set or remove split normals (aka sharp normals) for all edges in the Selection
| Name | UPARAM |
| Type | function |
| Header File | /Engine/Plugins/Runtime/GeometryScripting/Source/GeometryScriptingCore/Public/GeometryScript/MeshNormalsFunctions.h |
| Include Path | #include "GeometryScript/MeshNormalsFunctions.h" |
UFUNCTION (BlueprintCallable, Category="GeometryScript|Normals",
Meta=(ScriptMethod, HidePin="Debug"))
static static UPARAM
(
DisplayName
)
Parameters
| Name | Remarks |
|---|---|
| TargetMesh | The mesh to update |
| Selection | Which edges to operate on |
| bSplit | Whether to split normals along the selected edges; if false, they will be merged instead |
| bRecalculateNormals | Whether to recalculate normals along edges where they were split/merged |
| CalculateOptions | Options for computing the normals, if bRecalculateNormals is true |
| bDeferChangeNotifications | If true, no mesh change notification will be sent. Set to true if performing many changes in a loop. |
UPARAM(DisplayName)
Description
Set the triangle-vertex normals for the given TriangleID on the TargetMesh. This will create unique triangle-vertex normals, ie it will create hard edges / split normals in the normal overlay for each edge of the triangle.
| Name | UPARAM |
| Type | function |
| Header File | /Engine/Plugins/Runtime/GeometryScripting/Source/GeometryScriptingCore/Public/GeometryScript/MeshNormalsFunctions.h |
| Include Path | #include "GeometryScript/MeshNormalsFunctions.h" |
UFUNCTION (BlueprintCallable, Category="GeometryScript|Normals", Meta=(ScriptMethod))
static static UPARAM
(
DisplayName
)
Parameters
| Name | Remarks |
|---|---|
| bIsValidTriangle | will be returned as false if TriangleID does not refer to a valid triangle |
| bDeferChangeNotifications | if true, no mesh change notification will be sent. Set to true if changing many normals in a loop. |
UPARAM(DisplayName)
Description
Set all normals in the TargetMesh Normals Overlay to the specified per-vertex normals
| Name | UPARAM |
| Type | function |
| Header File | /Engine/Plugins/Runtime/GeometryScripting/Source/GeometryScriptingCore/Public/GeometryScript/MeshNormalsFunctions.h |
| Include Path | #include "GeometryScript/MeshNormalsFunctions.h" |
UFUNCTION (BlueprintCallable, Category="GeometryScript|Normals",
Meta=(ScriptMethod, HidePin="Debug", DisplayName="Set Mesh To Per Vertex Normals (From List)"))
static static UPARAM
(
DisplayName
)
Parameters
| Name | Remarks |
|---|---|
| VertexNormalList | per-vertex normals. Size must be equal to the MaxVertexID of TargetMesh (ie non-compact TargetMesh is supported) |
UPARAM(DisplayName)
Description
Get a list of single normal vectors for each mesh vertex in the TargetMesh, derived from the Normals Overlay. The Normals Overlay may store multiple normals for a single vertex (ie split normals) In such cases the normals can either be averaged, or the last normal seen will be used, depending on the bAverageSplitVertexValues parameter.
| Name | UPARAM |
| Type | function |
| Header File | /Engine/Plugins/Runtime/GeometryScripting/Source/GeometryScriptingCore/Public/GeometryScript/MeshNormalsFunctions.h |
| Include Path | #include "GeometryScript/MeshNormalsFunctions.h" |
UFUNCTION (BlueprintCallable, Category="GeometryScript|Normals", Meta=(ScriptMethod))
static static UPARAM
(
DisplayName
)
Parameters
| Name | Remarks |
|---|---|
| NormalList | output normal list will be stored here. Size will be equal to the MaxVertexID of TargetMesh (not the VertexCount!) |
| bIsValidNormalSet | will be set to true if the Normal Overlay was valid |
| bHasVertexIDGaps | will be set to true if some vertex indices in TargetMesh were invalid, ie MaxVertexID > VertexCount |
| bAverageSplitVertexValues | control how multiple normals at the same vertex should be interpreted |
UPARAM(DisplayName)
Description
Check if the TargetMesh has a Tangents Attribute Layer enabled
| Name | UPARAM |
| Type | function |
| Header File | /Engine/Plugins/Runtime/GeometryScripting/Source/GeometryScriptingCore/Public/GeometryScript/MeshNormalsFunctions.h |
| Include Path | #include "GeometryScript/MeshNormalsFunctions.h" |
UFUNCTION (BlueprintCallable, Category="GeometryScript|Normals",
Meta=(ScriptMethod, HidePin="Debug"))
static static UPARAM
(
DisplayName
)
UPARAM(DisplayName)
Description
Remove any existing Tangents Attribute Layer from the TargetMesh
| Name | UPARAM |
| Type | function |
| Header File | /Engine/Plugins/Runtime/GeometryScripting/Source/GeometryScriptingCore/Public/GeometryScript/MeshNormalsFunctions.h |
| Include Path | #include "GeometryScript/MeshNormalsFunctions.h" |
UFUNCTION (BlueprintCallable, Category="GeometryScript|Normals",
Meta=(ScriptMethod, HidePin="Debug"))
static static UPARAM
(
DisplayName
)
UPARAM(DisplayName)
Description
Recompute Tangents for the TargetMesh, using the method and settings specified by FGeometryScriptTangentsOptions
If recomputing Tangents for use with a DynamicMeshComponent, it is also necessary to set the Tangents Type on the Component to "Externally Provided"
| Name | UPARAM |
| Type | function |
| Header File | /Engine/Plugins/Runtime/GeometryScripting/Source/GeometryScriptingCore/Public/GeometryScript/MeshNormalsFunctions.h |
| Include Path | #include "GeometryScript/MeshNormalsFunctions.h" |
UFUNCTION (BlueprintCallable, Category="GeometryScript|Normals",
Meta=(ScriptMethod, HidePin="Debug"))
static static UPARAM
(
DisplayName
)
UPARAM(DisplayName)
Description
Set all tangents in the TargetMesh Tangents Overlays to the specified per-vertex tangents
If setting Tangents for use with a DynamicMeshComponent, it is also necessary to set the Tangents Type on the Component to "Externally Provided"
| Name | UPARAM |
| Type | function |
| Header File | /Engine/Plugins/Runtime/GeometryScripting/Source/GeometryScriptingCore/Public/GeometryScript/MeshNormalsFunctions.h |
| Include Path | #include "GeometryScript/MeshNormalsFunctions.h" |
UFUNCTION (BlueprintCallable, Category="GeometryScript|Normals",
Meta=(ScriptMethod, HidePin="Debug"))
static static UPARAM
(
DisplayName
)
Parameters
| Name | Remarks |
|---|---|
| TangentXList | per-vertex tangent vectors. Size must be equal to the MaxVertexID of TargetMesh (ie non-compact TargetMesh is supported) |
| TangentYList | per-vertex bitangent/binormal vectors. Size must be equal to TangentXList |
UPARAM(DisplayName)
Description
Get a list of single tangent vectors for each mesh vertex in the TargetMesh, derived from the Tangents Overlays. The Tangents Overlay may store multiple tangents for a single vertex (ie split tangents) In such cases the tangents can either be averaged, or the last tangent seen will be used, depending on the bAverageSplitVertexValues parameter.
| Name | UPARAM |
| Type | function |
| Header File | /Engine/Plugins/Runtime/GeometryScripting/Source/GeometryScriptingCore/Public/GeometryScript/MeshNormalsFunctions.h |
| Include Path | #include "GeometryScript/MeshNormalsFunctions.h" |
UFUNCTION (BlueprintCallable, Category="GeometryScript|Normals", Meta=(ScriptMethod))
static static UPARAM
(
DisplayName
)
Parameters
| Name | Remarks |
|---|---|
| TangentXList | output Tangent "X" vectors list will be stored here. Size will be equal to the MaxVertexID of TargetMesh (not the VertexCount!) |
| TangentYList | output Tangent "Y" vectors (Binormal/Bitangent) list will be stored here. Size will be equal to TangentXList |
| bIsValidTangentSet | will be set to true if the Tangent Overlay was valid |
| bHasVertexIDGaps | will be set to true if some vertex indices in TargetMesh were invalid, ie MaxVertexID > VertexCount |
| bAverageSplitVertexValues | control how multiple tangents at the same vertex should be interpreted |
UPARAM(DisplayName)
Description
Update the Normals and/or Tangents at VertexID of TargetMesh. Note that the specified vertex may have "split normals" or "split tangents", ie in the case of hard/crease normals, UV seams, and so on. In these situations, by default each of the unique normals/tangents at the vertex will be updated, but they will not be "merged", ie they will remain split. However if bMergeSplitValues=true, then the vertex will be "un-split", ie after the function call the vertex will have a single unique shared normal and/or tangents.
Note that this function requires that some normals/tangents already exist on the TargetMesh. If this is not the case, functions like SetPerVertexNormals and ComputeTangents can be used to initialize the normals/tangents first.
| Name | UPARAM |
| Type | function |
| Header File | /Engine/Plugins/Runtime/GeometryScripting/Source/GeometryScriptingCore/Public/GeometryScript/MeshNormalsFunctions.h |
| Include Path | #include "GeometryScript/MeshNormalsFunctions.h" |
UFUNCTION (BlueprintCallable, Category="GeometryScript|MeshEdits",
Meta=(ScriptMethod, bUpdateNormal="true"))
static static UPARAM
(
DisplayName
)
Parameters
| Name | Remarks |
|---|---|
| bUpdateNormal | if true (default) then the normals overlay is updated |
| NewNormal | the new normal vector. This vector will not be normalized, it must be normalized by the calling code. |
| bUpdateTangents | if true then the tangents overlay will be updated. If the tangents overlay does not exist, this function returns an error. |
| NewTangentX | the new tangent vector. This vector will not be normalized, it must be normalized by the calling code. |
| NewTangentY | the new bitangent/binormal vector. This vector will not be normalized, it must be normalized by the calling code. |
| bIsValidVertex | will be set to true on return if the VertexID was valid, ie had valid normals and tangents |
| bMergeSplitValues | if true, any split normals/tangents at the vertex will be cleared, and a unique normal/tangent element will be set in the connected triangles |
| bDeferChangeNotifications | if true, no mesh change notification will be sent. Set to true if changing many normals in a loop. |