Heightmap Precision

Hello,

What I’m experiencing was there since I started to work with WM2 + UE4, but generally after the terrain is textured and a proper lighting is done in game engine this problem is really hard to see but I want to get rid of it once and for all. :slight_smile:

After exporting a heightmap from WM2 to UE4.

(Sun angle normal)

(Sun angle very extreme)

This I have tried:

Exporting as .PNG
Exporting as .RAW16

What do you suggest?

Hi,

Just to clarify, when you inspect the terrain in WM, you do or do not see the same precision-related terracing?

It looks all good in WM. I even tried a radial grad and the result in engine has the same step effects.

It definitely looks like a precision-terracing issue. I’m not the best person to answer questions on the UE4 side of things. Usually 16bit precision is more than enough.

To double check, load your exported file back into WM with a file input and make sure you’re not seeing any terracing inside WM in the re-imported heightfield. If you do not, then the problem is purely on the UE4 import side of things, which hopefully someone else can chime in here!

What are your configuration in WM?, resolution (512*512)? width (km)? height (km), Vertical scale (m)?

Have match WM configuration with same configuration inside UE4 (drawscale)

Width/Height 8km
Resolution 8129x8129 OR 8192x8192 and resizing to 8129x8129 in Photoshop. (8129 is the recommended size for 8km terrains in UE4).

I am a UDK user and I use Landscape system. I guess it almost the same in UE4.
I export in 4033 from WM and import it directly into UDK (no resizing inside photoshop), Maybe it happens something when you resize it and saves it in photoshop?

I directly import in UE4 too. I guess it’s a problem with UE4 as I see much less artifact like that when creating 4k landscapes. OP is 8k.

What drawscale are you using inside UE4?
On a 4033 heghtmap, I use 128 in x and y and z.

That makes it 10324*10324 meter and a height of 1311 meter
and that is how I set it up in WM

TBH, if your heightmap is 4033x4033 in engine you should also create a landscape of 4033x4033 meters. Creating bigger than that means you are stretching your heightmap which results in loss of quality.

Yes exactly. To get a 10km 10 km I need to stretch it, other vice I can only build a 4 km4 km map

Well if you want a 10x10km map why not just build a 10x10km heightmap in wm instead of stretching a smaller one? you’d get a lot more details that way.

4033*4033 is the Max size that UDK can import. I can not import a bigger Heightmap. I could tile them in VM and import 4 40334033 heightmap.

Hmmm. Thought you’re talking about UE4.

I believe problem is that you are resizing in photoshop. What kind of .raw did you save in photoshop? Adobe’s raw implementations are meant for photography, not high precision heightmaps.

Try resizing in wm itself. Import using file input, then export with height output with your new extents.

The artifacts are also present if I’m directly importing from world machine. I figured the root of the problem is within UE4. Those artifacts appear only on 8km landscapes. If I use the same hieghtmap to create a 4km or anything lower there are no problems like that.