Author Topic: Heightmap Precision  (Read 8407 times)

0 Members and 1 Guest are viewing this topic.

Maximum-Dev

  • World Machine Guru
  • ****
  • Posts: 82
    • View Profile
Heightmap Precision
« on: September 14, 2015, 10:47:46 AM »
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. :)

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?

Stephen

  • Author
  • World Machine Guru
  • *****
  • Posts: 2314
    • View Profile
    • http://www.world-machine.com/
Re: Heightmap Precision
« Reply #1 on: September 14, 2015, 02:54:25 PM »
Hi,

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

-- Stephen Schmitt
- Creator of World Machine

Maximum-Dev

  • World Machine Guru
  • ****
  • Posts: 82
    • View Profile
Re: Heightmap Precision
« Reply #2 on: September 14, 2015, 03:04:59 PM »
It looks all good in WM. I even tried a radial grad and the result in engine has the same step effects.

Stephen

  • Author
  • World Machine Guru
  • *****
  • Posts: 2314
    • View Profile
    • http://www.world-machine.com/
Re: Heightmap Precision
« Reply #3 on: September 14, 2015, 04:02:55 PM »
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!

-- Stephen Schmitt
- Creator of World Machine

Hotshot

  • World Machine Guru
  • ****
  • Posts: 237
    • View Profile
Re: Heightmap Precision
« Reply #4 on: September 15, 2015, 12:52:29 AM »
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)

Maximum-Dev

  • World Machine Guru
  • ****
  • Posts: 82
    • View Profile
Re: Heightmap Precision
« Reply #5 on: September 15, 2015, 01:33:16 AM »
Width/Height 8km
Resolution 8129x8129 OR 8192x8192 and resizing to 8129x8129 in Photoshop. (8129 is the recommended size for 8km terrains in UE4).

Hotshot

  • World Machine Guru
  • ****
  • Posts: 237
    • View Profile
Re: Heightmap Precision
« Reply #6 on: September 15, 2015, 11:25:10 AM »
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?

Maximum-Dev

  • World Machine Guru
  • ****
  • Posts: 82
    • View Profile
Re: Heightmap Precision
« Reply #7 on: September 16, 2015, 04:14:14 PM »
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.

Hotshot

  • World Machine Guru
  • ****
  • Posts: 237
    • View Profile
Re: Heightmap Precision
« Reply #8 on: September 17, 2015, 07:22:42 AM »
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

Maximum-Dev

  • World Machine Guru
  • ****
  • Posts: 82
    • View Profile
Re: Heightmap Precision
« Reply #9 on: September 21, 2015, 04:20:44 AM »
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.

Hotshot

  • World Machine Guru
  • ****
  • Posts: 237
    • View Profile
Re: Heightmap Precision
« Reply #10 on: September 21, 2015, 04:54:45 AM »
Yes exactly. To get a 10km *10 km I need to stretch it, other vice I can only build a 4 km*4 km map

Maximum-Dev

  • World Machine Guru
  • ****
  • Posts: 82
    • View Profile
Re: Heightmap Precision
« Reply #11 on: September 21, 2015, 06:24:00 AM »
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.

Hotshot

  • World Machine Guru
  • ****
  • Posts: 237
    • View Profile
Re: Heightmap Precision
« Reply #12 on: September 21, 2015, 07:33:31 AM »
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 *4033*4033 heightmap.
« Last Edit: September 21, 2015, 07:37:43 AM by Hotshot »

Maximum-Dev

  • World Machine Guru
  • ****
  • Posts: 82
    • View Profile
Re: Heightmap Precision
« Reply #13 on: September 21, 2015, 10:48:26 AM »
Hmmm. Thought you're talking about UE4.

WFab

  • World Machine Guru
  • ****
  • Posts: 424
    • View Profile
    • Blog
Re: Heightmap Precision
« Reply #14 on: September 24, 2015, 05:36:32 AM »
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.

Maximum-Dev

  • World Machine Guru
  • ****
  • Posts: 82
    • View Profile
Re: Heightmap Precision
« Reply #15 on: September 24, 2015, 08:47:33 AM »
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.