Runtime Function Library
Last updated
Last updated
Bakes the morphs on the SkeletalMesh
based on the preset passed in.
Parameters:
BakeParameters
: The bake parameters
Returns:
A baked SkeletalMesh Asset
Note:
This version does not require the morphs to be set on the mesh beforehand.
No delay is needed for this function.
Does not modify the original mesh; it makes a copy before baking.
Important: This function is asynchronous, and you must use the callback to know when it is done.
Bakes the morphs on the USkeletalMesh
of the provided USkeletalMeshComponent
.
Parameters:
BakeParameters
: The bake parameters
Returns:
Nothing
Note:
A copy of the skeletal mesh is made first, ensuring the original mesh remains unaffected.
The copy is automatically assigned to the USkeletalMeshComponent
after the baking process is completed.
If BulkMatchSettings
is not supplied or empty, all morphs will be baked.
Morph values to be baked must already be set on the SkeletalMeshComponent
in this version.
Retrieve the baked mesh from your mesh component and save it in your save game system.
Copy morphs from any number of source meshes to a target mesh.
Serializes a baked skeletal mesh into an FMorphToolsSerializedMesh for saving. In the example project I show you how to save it in the Save Game
Deserialize a baked mesh that was serialized from "Save Baked Mesh"
Constructs a new mesh using the Mesh
parameter as a template, permanently removing vertices based on the data in VertsToRemove
.
Parameters:
Mesh
: The template mesh.
VertsToRemove
: Vertices to be removed.
RuntimeData
(optional): Required if you want the new mesh to have its morph targets intact.
Note:
Do not use this function if baking the mesh. Instead, use "Bake Morphs From Preset Async" or "Bake Morphs Async" to avoid building the mesh twice.
Returns:
A new skeletal mesh with removed vertices.
Combines multiple vertex mask assets into a single mask.
Parameters:
Assets
: Array of vertex mask assets to combine.
Returns:
A combined vertex mask asset.
Derives a vertex mask from morph target names.
Parameters:
MorphNames
: Array of morph target names.
Data
: Morph tools runtime data.
Returns:
A vertex mask derived from the specified morph targets.
Combines multiple opacity mask textures into one. They must all be the same dimension. Only the red channel is used.
Parameters:
Masks
: Array of opacity mask textures with identical dimensions.
Returns:
A combined opacity mask texture.
Initializes a new preset map with morph weights from the provided skeletal mesh component.
Parameters:
Component
: The skeletal mesh component.
PresetDataList
: Output map for preset data.
Applies morph weights based on the preset to the specified skeletal mesh component.
Parameters:
SkeletalMeshComponent
: The target skeletal mesh component.
Preset
: The morph tools runtime preset.
Returns the estimated size, in bytes, of the specified skeletal mesh.
Parameters:
SkeletalMesh
: The skeletal mesh.
Returns:
The size of the skeletal mesh in bytes.
Forces the garbage collector to free memory. Use with caution.
Parameters:
bFullPurge
(optional): If true, performs a full purge.
Note:
Included for demonstration purposes only.
Initializes morph copy options with specified parameters.
Parameters:
NumSmoothingVerts
: Average number of vertices to take into account.
bUseWeightedAverage
: Use weighted average when averaging vertex effects.
bOverwrite
: Overwrite existing morphs.
PositionTolerance
: Max distance for morph projection.
SpecificMorphsList
: Optional newline delimited list of specific morphs to copy.
OffsetMagnitude
: Add this to multiply the morph value farther in the direction of the morph target.
Returns:
Morph copy options object.
Updates the per poly collision shape for a SkeletalMeshComponent
Parameters:
SkeletalMeshComponent
: The target skeletal mesh component.
NewPositions
: Array of new positions (Vectors)