How to use Landscape Import Heightmap from RenderTarget?

Hi everyone!

I have trouble setting up an utility widget aiming to import a landscape heightmap from a Render Target holding a procedurally generated texture.

I found something similar to this on a blog post, however the linked project doesn’t compile anymore now in 4.26 because Landscape Import Heightmap from RenderTarget can only be callable from an utility blueprint (which I am doing from an Editor Utility Widget)

The documentation ain’t helping me either :sob:

Does anyone have any idea that could help me ?

Thank you very much in advance :hugs:

image

[accidentally deleted my old post]

Hi there,

are you still searching for an answer?
I am currently working on something similar.

The following worked for me:

Create a new “EditorUtilityActor”

Add a new custom event and enable “Call in Editor” within the “Details” panel.

BP_Details

This is how my BP looks:

The material I use in the “Draw Material to Render Target” Node looks like this:

You then need to drag and drop the BP Actor into your scene.
In the “Details” panel you can find a button with the same name as your custom event.

However, I am currently still trying to figure out how to get rid of the blockiness:

UPDATE:
I found out why my landscape looked blocky even though I was using a 16 bit PNG (or at least I thought I was).