Why is my coastal water hovering above the terrain?

I’m pretty new to world machine. I’m trying to create a fairly flat ocean coastline, with a river running into the ocean. I’m generating the river using the River device and the ocean itself using Coastal Erosion.

The river seems to be fine, but for some inexplicable reason, all of the ocean water generated by Coastal Erosion is floating well above the actual height of the terrain. A side effect of this is that when I combine the river and ocean water I get this awkward reverse-waterfall right at the coastline.

Can anyone point out what I’m doing wrong here?

1 Like

That is, sadly, the expected effect.

The Coast Erosion device will create a water body based on the terrain it gets fed from the Erosion device. It changes this to create some beaches and then you have your output with a water body “linked to it”. However, when you add a River Device, it will affect the terrain, and also the terrain at the beaches sadly, destroying that “link” between the Coast Erosion’s water body and the (now changed) terrain.

But probably more important to you is how to fix this. This is some more advanced World Machine stuff, so don’t panic if this all seems like “weird magic stuff” to you and just follow the steps and look at the image below for reference. Note, not all steps (2, 4, 10 and 12) have a corresponding coloured box in the image.

  1. We are going to add a Scalar Generator to the world. This device will determine the sea level for our Coast Erosion device and two other devices. Now we will also add a Constant Device and a Select Height device (note, we are using the old version of the Select Height device, to change the version, right click on it, go to Choose device version and select the Legacy option).
    You must link the Scalar Generator to the Sea Level parameter of the Coast Erosion device, the Height parameter of the Constant Device and the Maximum parameter of the Select Height device.
  2. We will be adding 3 Combiner devices.
  3. The first Combiner will be set to Max, with its Strength set to 1, and we will link it to the Constant device and the terrain output of the River device.
  4. We will now link the Select Height device to the output of the Combiner[Max] from step 3.
  5. The second Combiner will be set to Multiply, with its Strength set to 1, and we will link it to the Select Height and Constant device.
  6. The third Combiner will be set to Absolute Differences, with its Strength set to 1, and we will link it to the Combiner[Max] output from step 3 and the terrain output of the River device.
  7. We will add a new device, the Composite Type device. Open its properties and set the Pack/Unpack parameter to Pack to Composite Type, and the Type to Core.3025.Water. The device will now have three inputs and one output. To the first input, watersurface we will link the output of the Combiner[Multiply] from step 5. To the second input, depth we will link the output of the Combiner[Absolute Differences] from step 6.
  8. We add another Constant device, and set its height to half the world’s height. So, if your world’s max height is 1500 m, you set the Height parameter to 750 m.
  9. We add another Composite Type device, and set its parameters to Pack to Composite Type and Core.Vectorfield. We now link the Constant device from step 8 to both inputs.
  10. Link the Composite Type[Core.Vectorfield] to the flowdir input of the Composite Type[Core.3025.Water] device.
  11. Now combine the two water bodies with the Combine Water macro, just like you did before.
  12. Hook up the terrain of the River device and the water of the Combine Water macro to the Scene View device.

What this scheme does is creating a new sea with the Constant device, does a bit of clever Combiner stuff to get the appropriate height maps, then creates a new Water System with the Composite Type device, which we now can combine with the river. Since this operation is done after the River device, the sea will be different from the original sea we got from the Coastal Erosion device, because the terrain has been altered by the River device. I hope this helps, let me know if you have any more questions.

And the .tmd file (118.5 KB), in case you want to download this example.

1 Like

@HYLK I think the TMD example project you posted, is from the ALPHA build. It may cause errors and glitches with the current stable builds.


Here you have the same example by @HYLK , recreated for world machine build 4020 (latest stable build). Hope it works!

custom-sea-example.tmd (201.8 KB)

1 Like

Thanks for the method posted above guys!

The Coastal Erosion device doesn’t play as nicely with the other two water devices as it should; River and Create Water work together nicely, but the Coastal Erosion and River devices don’t know how to respect each other’s work.

The release after Artist Point will include some water improvements that should help workflow issues like this.