# Unreal Engine 4. Import heightmap using the button in the menu.

**URL:** <https://forums.unrealengine.com/t/unreal-engine-4-import-heightmap-using-the-button-in-the-menu/1467439>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, CPP, question, Blueprint\
**Created:** [December 4, 2023, 9:49am UTC](https://forums.unrealengine.com/t/unreal-engine-4-import-heightmap-using-the-button-in-the-menu/1467439 "2023-12-04T09:49:03Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![0000shurique](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@0000shurique](https://forums.unrealengine.com/u/0000shurique)\
**Post date:** [December 4, 2023, 9:49am UTC](https://forums.unrealengine.com/t/unreal-engine-4-import-heightmap-using-the-button-in-the-menu/1467439/1 "2023-12-04T09:49:03Z")

</div>

Good afternoon!  
I have a project in which the game engine generates a landscape and a heightmap on it by pressing a button. I’ve searched the Internet and haven’t found anything similar. It seems that there can be only one heightmap, and it is set at the very beginning of the landscape creation. Is it possible to do this at all?  
Maybe I need to change my approach. Not through a button, but somehow else.

---

<div class="post-metadata">

**Author:** ![Quetzalcodename](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Quetzalcodename](https://forums.unrealengine.com/u/Quetzalcodename)\
**Post date:** [December 4, 2023, 10:49am UTC](https://forums.unrealengine.com/t/unreal-engine-4-import-heightmap-using-the-button-in-the-menu/1467439/2 "2023-12-04T10:49:46Z")

</div>

Hey @0000shurique!

You can use multiple landscape actors in a scene, but only one heightmap per landscape. Check out this thread for more information:

> [@Multiple landscapes in one larger](https://forums.unrealengine.com/t/multiple-landscapes-in-one-larger/118602/3):
>
> You can use multiple landscape actors in the same scene, absolutely no problem. You probably want to set higher resolution for your houses and lower resolution for the other 3 landscapes. I always use 2 landscape actors, one for the more detailed area and one for the outer area with less detail and resolution. I’m a bit confused with what you say are your base materials? - I hope you don’t mean ONE big texture for the whole landscape actor? That’s not how it works. You wo…

I hope the above has the information you were looking for!

---

<div class="post-metadata">

**Author:** ![0000shurique](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@0000shurique](https://forums.unrealengine.com/u/0000shurique)\
**Post date:** [December 4, 2023, 10:59am UTC](https://forums.unrealengine.com/t/unreal-engine-4-import-heightmap-using-the-button-in-the-menu/1467439/3 "2023-12-04T10:59:26Z")

</div>

**Thank you for your response!** The potential problem with one landscape has been resolved. If necessary, I will delete the old landscape and create a new one.  
Now I just need to find out how to apply the heightmap by button.

---

<div class="post-metadata">

**Author:** ![Quetzalcodename](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Quetzalcodename](https://forums.unrealengine.com/u/Quetzalcodename)\
**Post date:** [December 4, 2023, 11:03am UTC](https://forums.unrealengine.com/t/unreal-engine-4-import-heightmap-using-the-button-in-the-menu/1467439/4 "2023-12-04T11:03:12Z")

</div>

Hey @0000shurique,

Are you needing to change your heightmap during runtime? Or is this going to be an editor utility that changes the landscape via blueprint/c++ or something similar?

---

<div class="post-metadata">

**Author:** ![0000shurique](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@0000shurique](https://forums.unrealengine.com/u/0000shurique)\
**Post date:** [December 4, 2023, 11:34am UTC](https://forums.unrealengine.com/t/unreal-engine-4-import-heightmap-using-the-button-in-the-menu/1467439/6 "2023-12-04T11:34:07Z")

</div>

On Google Maps, for example, I select a section of the territory, and then Unreal Engine 4 accesses some libraries and takes the heightmap for that section from there. The game engine **applies this heightmap to the landscape it has just created**. This way, the landscape is loaded with the heightmap on it. After a few operations, the operator closes the landscape and **its further fate is unimportant** (it can be deleted).  
Therefore, first, I need to learn how to create a landscape and apply heightmap to it through a button or code.  
The short answer to your question is: I need to create a landscape with a heightmap and **then it will be unchanged**.

---

<div class="post-metadata">

**Author:** ![Quetzalcodename](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Quetzalcodename](https://forums.unrealengine.com/u/Quetzalcodename)\
**Post date:** [December 4, 2023, 12:13pm UTC](https://forums.unrealengine.com/t/unreal-engine-4-import-heightmap-using-the-button-in-the-menu/1467439/7 "2023-12-04T12:13:33Z")

</div>

Hey @0000shurique,

Looks like it may be possible to set the heightmap via the landscape component as stated in this post:

> [@Making Heightmaps with c++?](https://forums.unrealengine.com/t/making-heightmaps-with-c/270928):
>
> I am trying to find a way to set the heightmap of a landscape from a AlevelScripterActor C++ class. I think I have found a way to do this by setting the heightmap in the landscape component. “landscape-\>LandscapeComponents[0]-\>SetHeightmap(test);” But now I am trying to find a way to create a heightmap using C++. I am planning on combining perlin noise with different frequencies to create fractal noise and use that as the heightmap. Now I know that you can create the images this way but are th…

However, setting the heightmaps via geodata / Google’s API looks to be an entirely different can of worms.

---

<div class="post-metadata">

**Author:** ![Quetzalcodename](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Quetzalcodename](https://forums.unrealengine.com/u/Quetzalcodename)\
**Post date:** [December 7, 2023, 10:03am UTC](https://forums.unrealengine.com/t/unreal-engine-4-import-heightmap-using-the-button-in-the-menu/1467439/8 "2023-12-07T10:03:45Z")

</div>

Hey @0000shurique!

Checking in, was the above the solution you were looking for?

---

<div class="post-metadata">

**Author:** ![0000shurique](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@0000shurique](https://forums.unrealengine.com/u/0000shurique)\
**Post date:** [December 12, 2023, 10:09am UTC](https://forums.unrealengine.com/t/unreal-engine-4-import-heightmap-using-the-button-in-the-menu/1467439/9 "2023-12-12T10:09:34Z")

</div>

Hey, @Quetzalcodename!  
Yes, I looked at the solution above and realized that my task looks like it can be done, but no one does it.  
This solution **looks realistic** , but when scaling the project’s tasks, I will again run into a similar dilemma.
