# How do I access tessellated vertex positions?

**URL:** <https://forums.unrealengine.com/t/how-do-i-access-tessellated-vertex-positions/440329>\
**Category:** Rendering\
**Tags:** vertex-position, procedural-mesh-comp, unreal-engine, CPP, question\
**Created:** [December 30, 2018, 6:51pm UTC](https://forums.unrealengine.com/t/how-do-i-access-tessellated-vertex-positions/440329 "2018-12-30T18:51:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ModModTerrain](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ModModTerrain](https://forums.unrealengine.com/u/ModModTerrain)\
**Post date:** [December 30, 2018, 6:51pm UTC](https://forums.unrealengine.com/t/how-do-i-access-tessellated-vertex-positions/440329/1 "2018-12-30T18:51:47Z")

</div>

Hiya,  
I need to access the displaced vertex positions of a static or procedural mesh at runtime after it has been tessellated and the surface displaced by a height map so I can process the mesh outside of the game thread. Any ideas how I can get hold of this information?  
Best,  
Richard

---

<div class="post-metadata">

**Author:** ![Luos](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/luos/32/918700_2.png) [@Luos](https://forums.unrealengine.com/u/Luos)\
**Post date:** [December 30, 2018, 7:33pm UTC](https://forums.unrealengine.com/t/how-do-i-access-tessellated-vertex-positions/440329/2 "2018-12-30T19:33:18Z")

</div>

afaik you cant, since the tessellation runs entirely on gpu. so there is no way for the cpu to retrieve that information.

---

<div class="post-metadata">

**Author:** ![ModModTerrain](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ModModTerrain](https://forums.unrealengine.com/u/ModModTerrain)\
**Post date:** [December 30, 2018, 8:54pm UTC](https://forums.unrealengine.com/t/how-do-i-access-tessellated-vertex-positions/440329/3 "2018-12-30T20:54:31Z")

</div>

Hmmm. I’m hoping there’s a way to hook into the [stream output stage](https://docs.microsoft.com/en-gb/windows/desktop/direct3d11/d3d10-graphics-programming-guide-output-stream-stage) of the D3D pipeline after the geometry shader and tessellation stages without going too far down the hacking on shaders rabbit hole. Will keep browsing the API

---

<div class="post-metadata">

**Author:** ![ModModTerrain](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ModModTerrain](https://forums.unrealengine.com/u/ModModTerrain)\
**Post date:** [January 13, 2019, 5:25pm UTC](https://forums.unrealengine.com/t/how-do-i-access-tessellated-vertex-positions/440329/4 "2019-01-13T17:25:42Z")

</div>

Ok, so I’ve had a poke around in the API and found [FShaderFactoryInterface::CreateGeometryShaderWithStreamOutput](http://api.unrealengine.com/INT/API/Runtime/ShaderCore/FShaderFactoryInterface/CreateGeometrySh-/index.html) which is looking quite promising. If anyone has any tips for where to go next to get the displaced, tessellated vertices from a mesh I’d love to hear them, otherwise I’m going to continue chipping away in between doing stuff I’m vaguely competent at.  
Oh yeah, the reason for doing this is so I can voxelize a mesh that has had a heightmap applied and also so I can export the tessellated meshes and process them outside of UE4.
