Pixel perfect heightmap and colormap alignment for landscape mesh?

Hi

I created a landscape in Blender, then baked a displacement and a color map to a regular plane with perfect square UV layout. Then imported the heightmap into a new landscape, that worked great so I have almost the same landspcape from Blender in Unreal.

The problem I have is that I am unable to align the albedo texture properly on the landscape. Naturally they are pixel perfect aligned when baked, but not so when I try to apply it as color map in Unreal.

I tried these two methods without real solution. Either the maps are rotated, or I can’t figure out the proper dividing number.

1 pixel is 1 meter.

So your map is 8k+ which, for the 10000th time, is wrong.
You won’t be able to run your project on lower grade computers.

Also, you have it in blender. Import the mesh and use that. Obviously not at a size of 8km squared.

Landscape is pointless unless you
A) know what you are doing with it.
And
B) CHOOSE to purpously make a poorly performing game for whatever reason.

Aside from that.

Set the size of fhe landacape to the right value in the landscape layer coord node and you get the right one off effect; That one shader, on that one specific landscape, will have a UV definition that covers it enteriely which can be used to place a full texture on top of the landscape.

If you are so eger to run a project at 2fps, this is a sure fire way? :stuck_out_tongue_winking_eye:

1 Like

Thanks for the reply.

This is going to be a rendering project, I don’t care about the realtime performance as much but I don’t want sucky interaction speeds either.

The main reason I want to use the landspace tool is to be able to use material layering and painting and maybe it has some advantages with PCG too?

" landacape to the right value in the landscape layer coord node"
Which value I am interested in here? Putting 8192 or 8671 didn’t work, I am sure I am not calculating it right.

8671 in your image.

WPO > mask RG > - (8671*100)/2
Should make the UV map the full landscape texture based on world position.

Using the landscape layer coord bode is cleaner, but if it doesnt work for whatever reason then the math above should (could be *1000 instead of *100 ot sure)

1 Like

Thanks, I am unable to make it work :frowning:

I tried the world offset and the landscape coord. The landscape coords has an offset, see where the ref cube is in both the shaded and the unlit versions.

(The actual image is coming from the instanced material)

World offset based on your formula gives me


blank image :frowning:

You missed a subtraction.
Go over it once more with that in mind.

As a general tip, output RG as the base color to debug.
It will look wierd until you have it right, at which point it will look like a UV shade (If you make a cube with UV in the base color you will see what its supposed to look like).

Also, I may have used - instead of /.
Cant quite remeber…

1 Like

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