# Build a Vertex Buffer / Data Structure of Interpolated Landscape Height?

**URL:** <https://forums.unrealengine.com/t/build-a-vertex-buffer-data-structure-of-interpolated-landscape-height/42231>\
**Category:** C++\
**Tags:** unreal-engine\
**Created:** [September 19, 2015, 1:30pm UTC](https://forums.unrealengine.com/t/build-a-vertex-buffer-data-structure-of-interpolated-landscape-height/42231 "2015-09-19T13:30:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jambax](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jambax/32/904177_2.png) [@Jambax](https://forums.unrealengine.com/u/Jambax)\
**Post date:** [September 19, 2015, 1:30pm UTC](https://forums.unrealengine.com/t/build-a-vertex-buffer-data-structure-of-interpolated-landscape-height/42231/1 "2015-09-19T13:30:10Z")

</div>

I need to build a data structure of some kind, that stores a bunch of FVectors that represent world-space locations on a Landscape. I need to basically build an approximation of the Landscapes terrain in Vertex form, with say a 10-meter spread between vertices, and then ultimately render that as a wireframe.

I haven’t got as far as the rendering yet, since I still need an efficient way to get the points themselves. I want to be able to do a fast range-based lookup on the points, so that I can return all vertices within a specified range of a world location. Speed is fairly key to this, the data can be a singleton as can the manager that creates it. The problem is, I have no idea what the best way is to actually generate the vertex buffer in the first place, since I want an equal density of points, I can’t simply access the Landscapes’ vertex data.

So, is there a fast and easy way for me to be able to get the interpolated Z-location on a Landscape, at World location X-Y? If I can do that, I can feed the algorithm an X-Y location in world space and have it return the final Z-component, which is what I need to be able to render a 3D wireframe with equal spacing.

Any suggestions on how to do this? I’d like to be able to get the Landscape, access the Heightfield, translate that to World-Space then get an altitude from it based on X-Y. Any ideas how to do that?
