# Get Landscape Heightmap of Static Mesh Surface

**URL:** <https://forums.unrealengine.com/t/get-landscape-heightmap-of-static-mesh-surface/1700852>\
**Category:** Blueprint\
**Tags:** unreal-engine, Landscape, question\
**Created:** [February 20, 2024, 12:19am UTC](https://forums.unrealengine.com/t/get-landscape-heightmap-of-static-mesh-surface/1700852 "2024-02-20T00:19:27Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Das\_Biest\_3000](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Das\_Biest\_3000](https://forums.unrealengine.com/u/Das_Biest_3000)\
**Post date:** [February 20, 2024, 12:19am UTC](https://forums.unrealengine.com/t/get-landscape-heightmap-of-static-mesh-surface/1700852/1 "2024-02-20T00:19:27Z")

</div>

Hi,  
I’ve got a special static mesh which needs to be converted to a landscape (the surface/top view of my static mesh).  
For this case, I thought that a heightmap would be the best to solve this problem. But I tried to get a heightmap with SceneCapture 2D, but I don’t know how to get an image file and then a heightmap that is fully detailed. How can I model a landscape to get the same surface as my static mesh, is there a way without modelling by hand because this way in my opinion the landscape is not accurate enough.

Hope you can help me out 🙂

---

<div class="post-metadata">

**Author:** ![Majj\_1089](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Majj\_1089](https://forums.unrealengine.com/u/Majj_1089)\
**Post date:** [February 21, 2024, 2:51am UTC](https://forums.unrealengine.com/t/get-landscape-heightmap-of-static-mesh-surface/1700852/2 "2024-02-21T02:51:15Z")

</div>

You can convert your mesh to a heightmap in Blender. I think there are a lot of different ways to do it, here’s one way I’ve tried:

1. put an Orthographic camera over your special mesh
2. set the material of the mesh
3. render the image

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/f/a/6fac515c72110cf5ef3354497a24b88df2a59bc9.jpeg)

Then you can use this image to create a landscape in UE.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/c/c/cccba79b5ca43ddbc1c3d76050b5624d7c3395c0.jpeg)

---

<div class="post-metadata">

**Author:** ![Das\_Biest\_3000](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Das\_Biest\_3000](https://forums.unrealengine.com/u/Das_Biest_3000)\
**Post date:** [February 21, 2024, 1:10pm UTC](https://forums.unrealengine.com/t/get-landscape-heightmap-of-static-mesh-surface/1700852/3 "2024-02-21T13:10:08Z")

</div>

Hi Majj\_1089,

thx thats what i was looking for. Especially the result of your way is great. Can you explaine your way with more details? My mesh in blender is huge (30m long and 4m high with lots of details), do you know if my results in the landscape would be similar to yours? Or is there a way to get more detail in my landscape, can you also show more details from the import to UE?

---

<div class="post-metadata">

**Author:** ![Majj\_1089](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Majj\_1089](https://forums.unrealengine.com/u/Majj_1089)\
**Post date:** [February 22, 2024, 3:45am UTC](https://forums.unrealengine.com/t/get-landscape-heightmap-of-static-mesh-surface/1700852/4 "2024-02-22T03:45:43Z")

</div>

Hi @Das_Biest_3000, you can follow these steps:

1. I use this planar mesh as your 30m x 30m x 4m mesh  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/e/c/cec57a8c2bd2b8307398663c368b48299f5be438.jpeg)
2. put an Orthographic camera over the mesh and make sure the Camera View includes all, you need to set Orthographic Scale to 30, and a large resolution in Output Properties (like 4096x4096 or larger)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/e/a/dea9b45573e0f510bdb07a9bb9727af6f84ac40a.jpeg)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/2/9/2290104fdbc798d2f58ea0f8807245ef8920ca1f.png)
3. give the mesh a new material, and set the node like this in Shader Editor  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/8/b/18ba72671e92b222f969d9b3c6929bb0c84b946f.png)  
then it looks like a heightmap  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/0/a/30af58cb8cd44d421b949e7945ebc479cbcaa6c8.jpeg)
4. set View Tranform to Raw in Color Management  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/4/1/341e5e13477b80fe2865657edd42a81a2555ec0b.png)
5. now you can render the image, I used Eevee and defalut Render Sampling 64  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/7/4/77437bfb051ba8ce3a7eafe6b8cb5068a9995c49.png)
6. I saved the image as PNG with RGB16  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/1/a/f1a557c820afd26cb56ce280d3681e834a58bbc7.png)
7. When I import to UE, I used the default value except the Number of Components (17x17-\>16x16)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/0/4/90418a14218e884bf34da8e17b69e74f4869bb31.png)  
the result should be the same as in blender  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/9/5/a957053b747c2d9d9da3835b8f56ae272225e398.jpeg) ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/7/7/977c56d7e42e99a6482c144c0fd975cfd051ac75.jpeg)

I think in this way you can get the result you want. If you have any trouble please let me know.

---

<div class="post-metadata">

**Author:** ![Das\_Biest\_3000](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Das\_Biest\_3000](https://forums.unrealengine.com/u/Das_Biest_3000)\
**Post date:** [February 24, 2024, 7:16pm UTC](https://forums.unrealengine.com/t/get-landscape-heightmap-of-static-mesh-surface/1700852/5 "2024-02-24T19:16:57Z")

</div>

@Majj_1089 Hi,  
i tried your solution but i dont know why my results are so worse. I sent you some pictures of my problem, in Blender i set the same things like you did and thats the picture:

 ![Heightmap1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/b/3/0b3bd182b70b8db13ff5214b50b3ba9919615de6.jpeg)

This is the blender view:

 ![Screenshot 2024-02-24 201856](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/0/7/0077fc3cad5c299d39648911ce2106f4a662e2e8.jpeg)

But with that the import to unreal is really bad:

 ![Screenshot 2024-02-24 201257](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/f/1/cf11d78ef84c61de7e1fb53a3d5716cae97d8eac.jpeg)

similar to your settings in Unreal:

 ![Screenshot 2024-02-24 201252](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/e/8/3e8ee7917557a2331831c12dc20092a7fb13f438.png)

I will try an other mesh to find out why i have this huge problem, maybe you know why i get so worse results

---

<div class="post-metadata">

**Author:** ![Das\_Biest\_3000](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Das\_Biest\_3000](https://forums.unrealengine.com/u/Das_Biest_3000)\
**Post date:** [February 24, 2024, 9:49pm UTC](https://forums.unrealengine.com/t/get-landscape-heightmap-of-static-mesh-surface/1700852/6 "2024-02-24T21:49:13Z")

</div>

Hi @Majj_1089 I also tried your ape version but i dont know what i do wrong but here i have the same issue too. For example here is my render image of the ape, and also the import to UE:

 ![HeightmapApe](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/a/1/1a132e89816586d15d62568649862edd15306c6f.jpeg)

 ![Screenshot 2024-02-24 224840](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/e/7/ee79808f71a0e1262272a5d3c157ef4cb1b861a5.png)

 ![Screenshot 2024-02-24 224849](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/3/5/035817f0ac19b0c776ee6ba3cebe3ab0bd215c38.jpeg)

 ![Screenshot 2024-02-24 224936](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/6/5/165b92bc82439cb8a7dc101b26b1823b5bfce83f.jpeg)

maybe i render my image wrong i dont know, but my settings are the same like yours:

 ![Screenshot 2024-02-24 225056](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/4/8/748f2af7093a07f0c210cdbd6450497134cbbcbc.png)

i render my image with this button:

 ![Screenshot 2024-02-24 225133](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/b/c/6bc2a2700ef5fb8fba5c772d71bac940651ae8f4.jpeg)

---

<div class="post-metadata">

**Author:** ![Majj\_1089](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Majj\_1089](https://forums.unrealengine.com/u/Majj_1089)\
**Post date:** [February 25, 2024, 1:50am UTC](https://forums.unrealengine.com/t/get-landscape-heightmap-of-static-mesh-surface/1700852/7 "2024-02-25T01:50:01Z")

</div>

Would you mind sharing your final rendered image?

> [@Das\_Biest\_3000](#):
>
> i render my image with this button:

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/4/0/940d252ccb6b1a78219b2c6fdfe2618eda6aba81.png)  
you should render the image here

---

<div class="post-metadata">

**Author:** ![Das\_Biest\_3000](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Das\_Biest\_3000](https://forums.unrealengine.com/u/Das_Biest_3000)\
**Post date:** [February 25, 2024, 4:11pm UTC](https://forums.unrealengine.com/t/get-landscape-heightmap-of-static-mesh-surface/1700852/8 "2024-02-25T16:11:10Z")

</div>

@Majj_1089 Thx for your help, really appreciate it:)  
For your import of the monkey can you send me the import landscape settings too?  
I was able to create better pngs now, but when i want to import them, i need lots of total components for the best resolution and all above 1000 components its crahes and i cant fix this issue:

![Screenshot_2024-02-25_170412](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/1/f/31fc7d852c862ff7d88437a7bb65e4365a52a59d.png)

I tried also the monkey but with 4096x4096 png, i set my landscape import settings to Number of Components 256x256 to get max resolution and Sector Size 7x7 Quads, cause the components getting smaller. But with those settings i always get near to the 10k components of my landscape and then UE always crashes cause its not able to rebuild all those actors in my project. Now i dont know how you get the monkey head with so much resolution.  
Thats my png for the ape:

 ![HeightmapApe](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/6/4/164677ef7fb375fdb724f9eb610c39bfa284a87b.jpeg)  
Thats weird, the resolution of my png here in the message is worse, and the original file is better:

 ![Screenshot 2024-02-25 172022](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/6/c/26cb473ebc6a49cf7de56707ee465a4edc2a975e.png)

I added some pictures to show you my problem:

1. perfect resolution preview of the monkey head

2. lower resolution

3. bad resolution

4. your settings

5. 

 ![Screenshot 2024-02-25 172525](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/8/3/0835aa6ca76e48febd3bfe874df268e8a6de68e4.jpeg)

1. 

 ![Screenshot 2024-02-25 172537](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/1/0/01068e8e74187568b48988a3644fa9e40da86e46.jpeg)

1. 

 ![Screenshot 2024-02-25 172550](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/d/f/1df8a6ff623c87a4adabfdefe9daf238658ac027.jpeg)

1. 

 ![Screenshot 2024-02-25 172609](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/6/2/062aaca52551ab2db7d08582bfd8501e7c6cd24c.jpeg)

I cant start the import of the 1. Version or the other cause the total components are really too much over 60k. Only your version is possible with 256 components but the resolution is not like yours do you know why?

---

<div class="post-metadata">

**Author:** ![Majj\_1089](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Majj\_1089](https://forums.unrealengine.com/u/Majj_1089)\
**Post date:** [February 26, 2024, 2:18am UTC](https://forums.unrealengine.com/t/get-landscape-heightmap-of-static-mesh-surface/1700852/9 "2024-02-26T02:18:44Z")

</div>

Here is my setting:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/3/6/2367251e1c7086479625a1d834c51eb62c465c51.jpeg)  
and the result after clicking ‘import’:  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/b/3/1b306842594037eeb132761e4408bfe61a9a1df5.jpeg)

The dimensions for a Landscape are based on the number of quads in each section, the number of sections in each Landscape Component, and the total number of Landscape Components in the Landscape. You can also check the documentation: [Landscape Technical Guide in Unreal Engine | Unreal Engine 5.1 Documentation](https://docs.unrealengine.com/5.1/en-US/landscape-technical-guide-in-unreal-engine/)

---

<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:** [March 27, 2024, 2:18am UTC](https://forums.unrealengine.com/t/get-landscape-heightmap-of-static-mesh-surface/1700852/10 "2024-03-27T02:18:55Z")

</div>

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