# How can I read in all vertices of a mesh in a level?

**URL:** <https://forums.unrealengine.com/t/how-can-i-read-in-all-vertices-of-a-mesh-in-a-level/131881>\
**Category:** Asset Creation\
**Tags:** unreal-engine\
**Created:** [October 6, 2019, 11:38am UTC](https://forums.unrealengine.com/t/how-can-i-read-in-all-vertices-of-a-mesh-in-a-level/131881 "2019-10-06T11:38:56Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Xenial\_J](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Xenial\_J](https://forums.unrealengine.com/u/Xenial_J)\
**Post date:** [October 6, 2019, 11:38am UTC](https://forums.unrealengine.com/t/how-can-i-read-in-all-vertices-of-a-mesh-in-a-level/131881/1 "2019-10-06T11:38:56Z")

</div>

Using Unreal 4.22 (C++) I’d like to be able to chuck all the vertices of a mesh into an array to work with. I’m interested in these different levels of complexity:

- a static mesh
- a mesh that is changing with simple T/R/S transformations
- a mesh that is deforming with animation (not necessarily with bones)

Does anyone know what I should be looking into for these? Any answers to any of those 3 appreciated.

[https://www.gamedev.net/uploads/emoticons/smile.png](https://www.gamedev.net/uploads/emoticons/smile.png)

---

<div class="post-metadata">

**Author:** ![MostHost\_LA](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mosthost_la/32/907035_2.png) [@MostHost\_LA](https://forums.unrealengine.com/u/MostHost_LA)\
**Post date:** [October 6, 2019, 11:43pm UTC](https://forums.unrealengine.com/t/how-can-i-read-in-all-vertices-of-a-mesh-in-a-level/131881/2 "2019-10-06T23:43:03Z")

</div>

Even if you put the vertices in an array there is currently no method to recreate the mesh at render time from the array or data. (Save maybe alembyc).

You would have to create a completely custom C++ implementation of a new kind of procedural mesh to do this and render it. Not impossible at all, it’s just that you would be better off downloading the engine source and working off that to achieve it.

---

<div class="post-metadata">

**Author:** ![Xenial\_J](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Xenial\_J](https://forums.unrealengine.com/u/Xenial_J)\
**Post date:** [October 7, 2019, 9:22am UTC](https://forums.unrealengine.com/t/how-can-i-read-in-all-vertices-of-a-mesh-in-a-level/131881/3 "2019-10-07T09:22:25Z")

</div>

Hey again and thanks for the reply. I’m not asking how to recreate a mesh though; only how to read vertices in from an existing one.

---

<div class="post-metadata">

**Author:** ![DarkS474](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DarkS474](https://forums.unrealengine.com/u/DarkS474)\
**Post date:** [October 7, 2019, 10:15am UTC](https://forums.unrealengine.com/t/how-can-i-read-in-all-vertices-of-a-mesh-in-a-level/131881/4 "2019-10-07T10:15:33Z")

</div>

[https://answers.unrealengine.com/que…a-bluepri.html](https://answers.unrealengine.com/questions/465484/how-to-get-vertex-xyz-from-static-mesh-via-bluepri.html)

[https://forums.unrealengine.com/deve…f-static-mesh=](https://forums.unrealengine.com/development-discussion/c-gameplay-programming/7509-accessing-vertex-positions-of-static-mesh?8856-Accessing-Vertex-Positions-of-static-mesh=)

[https://forums.unrealengine.com/deve…-skeletal-mesh](https://forums.unrealengine.com/development-discussion/c-gameplay-programming/113813-accessing-vertex-positions-of-animated-skeletal-mesh)

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — ue4community.wiki! You will be able to find content from the official...

---

<div class="post-metadata">

**Author:** ![Xenial\_J](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Xenial\_J](https://forums.unrealengine.com/u/Xenial_J)\
**Post date:** [October 7, 2019, 3:10pm UTC](https://forums.unrealengine.com/t/how-can-i-read-in-all-vertices-of-a-mesh-in-a-level/131881/5 "2019-10-07T15:10:21Z")

</div>

Many thanks Dark, they look very helpful (and I admit I could have tried harder to find them myself!).

---

<div class="post-metadata">

**Author:** ![MostHost\_LA](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mosthost_la/32/907035_2.png) [@MostHost\_LA](https://forums.unrealengine.com/u/MostHost_LA)\
**Post date:** [October 7, 2019, 9:22pm UTC](https://forums.unrealengine.com/t/how-can-i-read-in-all-vertices-of-a-mesh-in-a-level/131881/6 "2019-10-07T21:22:11Z")

</div>

Just curious. What is the purpose behind getting them if you won’t be re-using them?  
calculations, sure. Moving something else based on the points, sure. But is that really the best approach for overhead?

---

<div class="post-metadata">

**Author:** ![Xenial\_J](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Xenial\_J](https://forums.unrealengine.com/u/Xenial_J)\
**Post date:** [October 9, 2019, 7:11am UTC](https://forums.unrealengine.com/t/how-can-i-read-in-all-vertices-of-a-mesh-in-a-level/131881/13 "2019-10-09T07:11:09Z")

</div>

Yep, for moving something else around the mesh based on the points. There’s no concern about overhead; it’s O(1) at run time with few calculations. The inevitable drawback is that the approach is situational – it doesn’t do everything one might need when moving something around a surface – but in the situations where it helps it helps a lot, avoiding several geometry-based edge cases and providing precise results. I’ve implemented this long ago in Unity and it worked nicely, including with animated meshes.
