# Generating Height Map from static meshes.

**URL:** <https://forums.unrealengine.com/t/generating-height-map-from-static-meshes/1324672>\
**Category:** Asset Creation\
**Tags:** unreal-engine, question\
**Created:** [October 6, 2023, 9:44pm UTC](https://forums.unrealengine.com/t/generating-height-map-from-static-meshes/1324672 "2023-10-06T21:44:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ryucarta1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ryucarta1](https://forums.unrealengine.com/u/Ryucarta1)\
**Post date:** [October 6, 2023, 9:44pm UTC](https://forums.unrealengine.com/t/generating-height-map-from-static-meshes/1324672/1 "2023-10-06T21:44:16Z")

</div>

Hello, I’m very new to UE5 (less than a year) and I’m trying to figure out to no avail how, or if its even possible, to place static meshes in a level and then get a height map generated from those static meshes. IE: Say i want my landscape to be the shape of a 2d plane with a sphere sitting in the middle. How would i get the height data from the static meshes and create a height map within ue5(or using other programs if needed) Thanks in advance if someone figures this out.

---

<div class="post-metadata">

**Author:** ![SupportiveEntity](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SupportiveEntity](https://forums.unrealengine.com/u/SupportiveEntity)\
**Post date:** [October 7, 2023, 8:31pm UTC](https://forums.unrealengine.com/t/generating-height-map-from-static-meshes/1324672/2 "2023-10-07T20:31:48Z")

</div>

Hey there @Ryucarta1! Are you just trying to get depth information based on everything landscape + static meshes? You could get depth from a SceneCapture2D like the user does in this thread:

> [@How to capture scene depth into an image and then sample it?](https://forums.unrealengine.com/t/how-to-capture-scene-depth-into-an-image-and-then-sample-it/573213):
>
> I need to capture scene depth for my level, top down view. I am using Scene Capture 2D component placed on the level and this is what I am getting: [[2022 06 02 21 40 11] ](https://www.youtube.com/watch?v=PkQpupwp-g0) When I worked with depth in other engines and 3D apps, it was always a grayscale image with smooth transitions (kinda like a heightmap). I am not quite sure why it’s coming out like a stencil mask in UE4. If I capture scene color, the image comes out the way it suppose to come out. So that’s the first issue I need …

> [@SceneCapture Depth as Texture](https://forums.unrealengine.com/t/scenecapture-depth-as-texture/434150):
>
> Hi, I want to get a depth map from a specific view. And I want it as texture because I want to be able to access the data in C++. So I did the following setup. I placed a SceneCapture2D in the view I want. In the rendering settings it should render the scene into rgb and the depht into a-channel of a rendertarget: When It take a look at the render target, the rgb channels are good: but the alpha channel does not conta…

---

<div class="post-metadata">

**Author:** ![Ryucarta1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ryucarta1](https://forums.unrealengine.com/u/Ryucarta1)\
**Post date:** [October 8, 2023, 8:23am UTC](https://forums.unrealengine.com/t/generating-height-map-from-static-meshes/1324672/3 "2023-10-08T08:23:02Z")

</div>

Hmmm. I’m really bad at articulating what I want to say. Say for instance you have an empty world and place a bunch of static meshes in a world close enough together to form a “landscape of sorts” for the character to walk on (IE: That UE5 demo a while ago with the golem) I want to figure out if there is a way to create a height map of that worlds “mesh landscape” so i can then use said height map to create an actual landscape from that.

---

<div class="post-metadata">

**Author:** ![SupportiveEntity](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SupportiveEntity](https://forums.unrealengine.com/u/SupportiveEntity)\
**Post date:** [October 8, 2023, 7:33pm UTC](https://forums.unrealengine.com/t/generating-height-map-from-static-meshes/1324672/4 "2023-10-08T19:33:56Z")

</div>

The method I showed would _mostly_ work for that as well. Thought since landscapes can only have vertical deformation it wouldn’t have any overhangs like the example map does. Resolution also gets a bit harder at that scale as well. Getting a height map from existing non-landscape terrain would entail rendering it through the SceneCapture2D in most cases.

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [November 7, 2023, 7:34pm UTC](https://forums.unrealengine.com/t/generating-height-map-from-static-meshes/1324672/5 "2023-11-07T19:34:43Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
