Daily Unreal Column #84 - Mesh merging
Sometimes you might want to make a single mesh out of multiple parts. Unreal Engine has a functionality for merging multiple meshes into a single mesh and here is how.
One if such helper structures is FSkeletalMeshMerge
. It can be found inside SkeletalMeshMerge.h
file inside the engine. It it’s constructor it takes a skeletal mesh object that will store the result of the merge, an array of skeletal meshes we want to merge, and few other properties. With this structure created we just need to call DoMerge
function which will return a boolean value indicating a success or a failure. Here is a link to the source to this class on GitHub.
Merging meshes into a single one is not always beneficial, but there are some cases where it is. In case of skeletal mesh for example, it allows you to run a single animation blueprint on a single skeletal mesh component instead running multiple instances on multiple parts. Even other instances do nothing but copy the pose, that still costs us some computation time.