Q&A World machine / Godot / Terrain3D

I use this forum post to discuss problems and solutions between World Machine, Godot and Terrain3D. Don’t want to pollute my other post.

The other forum post which is mainly for stepwise manual how to:

Please post if you got an good idea.

Yesterday I started my journey with above software. managed near the end of the day to export a self made map from World Machine (WM) to Godot using Terrain3D. Was happy, then I tried to replicate it again with the WM tutorial projects. I could not replicate it. All my exported height maps (EXR) were imported flat into terrain3D. Tried hours, different settings, heightmap PNG convert with Gimp to EXR. Nothing worked. I scaled it, I raised the height as some forum posts mentioned.

WM project px size was below the trial version limit, which is 1025 px. I wonder if that causes problems. I am using trial version.

So today I try to create a WM project from scratch, just like I did at first, when it worked.
Shame I forgot which project worked.

Hope to get an consistant WM export and re-import that always works. And know why it does.

Question: World machine, what is the EXR format that WM exports?

link:Importing & Exporting Data — Terrain3D 1.0.0 documentation
Terrain3D likes to have the following format:

  • EXR, RGB 16 or 32 bit (no greyscale, no transparantcy)
  • R16
  • RAW 8/16/32 bit, godot sees as this as R16

I opened WM EXR in Gimp, WM exports as greyscale. That is wrong. Can WM export as RGB?

Gimp confirms it is 32 float, that is according to terrain3D specs.

Gimp can convert it from greyscale to sRGB as D65 linear greyscale.
has more options:
Rendering intent setting options: Perceptual, Relative colorimetric, saturation , absolute colorimetric.

Gimp default: Relative colorimetric,
Gimp setting enabled: black point compensation

Above did not work.

Used gimp to create a new file in gimp. painted it, saved it as openEXR default. no changing.
And imported it in Terrain3D with a scale of 500. I think I know what the problem is now with
World Machine, 1025 pixels is just too tiny. My gimp creation proofs it. It is an canvas of 1025 by 1025 pixels.

Above is black in the middle, then lighter and lighter grey outwards.

++++ import scale -100 ++++
the picture data is inverted, making a mountain go down. thus need to invert.

Tried to export your height as “R16” yet? According to the docs, that’s supported by terrain 3d as well as Raw format.

@WFab : there are multiple formats that can be used. I tried /world Machine PNG.
In my taste it is good. but someone commented it creates staircase effect.

==== save WM mesh into terrain3D ====

if you have not saved the project yet, we are going to do that now.
Go to Terrain3D Importer >> and add the PNG with height data, and the terrain colour data.

My WM exports are only 1025 pixels, that is just too low unfortunately.

In my case with tutorial 11 I will add:

  • in “height file name” , the file “Tutorial 11 - Automatic Rivers Height Output 1024.png”

  • in “Colour file name”, the file “Tutorial 11 - Automatic Rivers Bitmap Output 1024.png”

  • Import scale change to 1000

My resolution is 1025 pixels, max, so I cannot create a huge terrain.
I asked if it is possible to create a small higher detail terrain, like 10 by 10 meters with water flowing past.

managed to get the low resolution mesh into Godot, but it ain’t looking pretty, due to 1025 pixels. Obvious stair casing , texture not looking great. Still have to learn a lot.

Thinking what to do. If I cannot create a small piece of land, then only option is to buy indie version at least. wanted to keep it small for now. Full blown 3D game is not my priority list.
Wanted to create a smaller 3D game. (eyes rolling, thinking)

Below is the Tutorial 11 of World machine:

i just added a player into the game scene:

source to add player, adding player control script, lighting, adding camera.

So the world is big, just not enough pixels to show it’s full glory.
Just going to get things working, not how it looks. Must be torture for some of you.

click the player and camera, use their gizmo (has red/green/blue arrows) to move them near each other. For instance, move the camera3D such a way it is above and behind the player. Fine tweak the position by enabling the “preview” in the 3D view top left corner. Then use the Transform settings to twist and / or move the camera any direction needed.

1 Like

@w-sheep PNG format is always downgraded to 8 bit in Godot engine, at least as far as I know. 8bits of color depth mean just 256 levels of brightness, which is not enough to capture a landscape. That causes those stairstepping artifacts.

I suggested “r16” because it’s just raw format with 16bits per pixel brightness. That should be enough to capture your slope properly.

Why not use an optimised mesh instead? Wouldn’t that be a more favourable approach?

Learning here. I just wanted to import the WM default into terrain3D for a quick view.

Side note: I bought a license of WM now. Thinking why not. Going to use it any way.

Optimised mesh? Is there a way to further optimise it inside WM? Is that what you mean?

There is indeed a mesh optimiser within WM, which will significantly reduce the number of triangles, and also give you a normal map to retain the now removed details! It is a really neat device and can greatly improve performance within rendering software.

1 Like

ah thank you Hylk. much to learn.