Get Landscape Heightmap of Static Mesh Surface

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 :slight_smile:

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

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

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?

Hi @Das_Biest_3000, you can follow these steps:

  1. I use this planar mesh as your 30m x 30m x 4m mesh
  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
  3. give the mesh a new material, and set the node like this in Shader Editor

    then it looks like a heightmap
  4. set View Tranform to Raw in Color Management
  5. now you can render the image, I used Eevee and defalut Render Sampling 64
    image
  6. I saved the image as PNG with RGB16
    image
  7. When I import to UE, I used the default value except the Number of Components (17x17->16x16)

    the result should be the same as in blender

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

@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:

This is the blender view:

But with that the import to unreal is really bad:

similar to your settings in Unreal:

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

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:

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

i render my image with this button:

Would you mind sharing your final rendered image?

image
you should render the image here

@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

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:


Thats weird, the resolution of my png here in the message is worse, and the original file is better:

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

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?

Here is my setting:


and the result after clicking ‘import’:

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

1 Like

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