Announcement

Collapse
No announcement yet.

Getting coordinates of vertices from morphed meshes (set by SetMorphTarget)

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    Getting coordinates of vertices from morphed meshes (set by SetMorphTarget)

    Hello community~~

    I am trying to acquire coordinates of vertices from morphed meshes which are morphed based on weights set through SetMorphTarget.
    I tried the methods online but they only give me the unmorphed mesh.
    The methods I tried are "Mesh->ComputeSkinnedPositions(Locations)" and reading PhysX TriMeshes (https://wiki.unrealengine.com/Access...tions_in_build).

    I traced the UE4 source code which shows that the location of the morphed vertices are computed in FSkeletalMeshObjectGPUSkin, where the function FSkeletalMeshObjectGPUSkin::FSkeletalMeshObjectLOD::UpdateMorphVertexBuffer computes the new locations and saves it in MorphVertexBuffer. However, the LODs variable storing this is private, so I cannot access this from the outside code, so I am wondering if there is a more elegant solution to this than directly modifying the code and making the variable public...

    Many thanks!
Working...
X