# Fast way of accessing the vertices of a SkeletalMesh?

**URL:** <https://forums.unrealengine.com/t/fast-way-of-accessing-the-vertices-of-a-skeletalmesh/136118>\
**Category:** C++\
**Tags:** unreal-engine, Engine-Source-Code, GitHub, Engine-Source-GitHub\
**Created:** [January 8, 2020, 4:35pm UTC](https://forums.unrealengine.com/t/fast-way-of-accessing-the-vertices-of-a-skeletalmesh/136118 "2020-01-08T16:35:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_433cae0f](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_433cae0f](https://forums.unrealengine.com/u/anonymous_user_433cae0f)\
**Post date:** [January 8, 2020, 4:35pm UTC](https://forums.unrealengine.com/t/fast-way-of-accessing-the-vertices-of-a-skeletalmesh/136118/1 "2020-01-08T16:35:54Z")

</div>

Hello,

I’m currently developing a plugin for UE4.23. I’m looking for a solution to my problem that doesn’t involve modifying the source code of Unreal, the plugin needs to be able to stand on its own.

I need to access the vertex positions of a skeletal mesh **once**  **every frame**. I do not need to modify the vertices, only access/copy them. I’m currently retrieving the vertices using the following code:

```auto

USkeletalMeshComponent * sm_component;
TArray<FVector> vertex_array;

...

sm_component->GetCurrentRefToLocalMatrices(ref_to_local_m, 0);

USkeletalMeshComponent::ComputeSkinnedPositions(sm_component, [INDENT=9]vertex_array,
ref_to_local_m,
sm_render_data->LODRenderData[0],
*skin_weight_vb);[/INDENT]
 
 

```

Which fills **vertex\_array** with the data I need. However, it is too slow for what I’m doing. The skeletal mesh contains ~15k vertices and **ComputeSkinnedPositions** ]([USkinnedMeshComponent::ComputeSkinnedPositions | Unreal Engine 5.2 Documentation](https://docs.unrealengine.com/en-US/API/Runtime/Engine/Components/USkinnedMeshComponent/ComputeSkinnedPositions/index.html)) slows down my application significantly.

I’ve also tried **[GetCPUSkinnedVertices](https://docs.unrealengine.com/en-US/API/Runtime/Engine/Components/USkinnedMeshComponent/GetCPUSkinnedVertices/index.html)**, but sadly, as the documentation says:

> [@](#):
>
> Get CPU skinned vertices for the specified LOD level. Includes morph targets if they are enabled. **Note: This function is very SLOW as it needs to flush the render thread.**

This means that I can’t really use any of the two functions, unless I am doing something wrong which I can’t see.

I’m wondering if there is a faster way of retrieving the vertex positions of a skeletal mesh?

Thank you!

---

<div class="post-metadata">

**Author:** ![Hhhhoyu](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Hhhhoyu](https://forums.unrealengine.com/u/Hhhhoyu)\
**Post date:** [October 26, 2022, 8:48am UTC](https://forums.unrealengine.com/t/fast-way-of-accessing-the-vertices-of-a-skeletalmesh/136118/2 "2022-10-26T08:48:38Z")

</div>

I have the same problem. Did you find a way to solve it?  
Thanks.

---

<div class="post-metadata">

**Author:** ![DentonJC](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DentonJC](https://forums.unrealengine.com/u/DentonJC)\
**Post date:** [November 5, 2024, 12:02am UTC](https://forums.unrealengine.com/t/fast-way-of-accessing-the-vertices-of-a-skeletalmesh/136118/3 "2024-11-05T00:02:08Z")

</div>

there is a function USkeletalMeshComponent::GetSkinnedVertexPosition()  
that will do what you need
