River resolution is not according rest of the terrain:

I made 16k build. As you can see, terrain height map has big resolution enough to show even very small details, but all rivers seems like in resolution MUCH lower. This is quite big issue, it is not possible to fix it by hand in game engine, because we are speaking about kilometers and kilometers:


It does not look well even from bigger distance:

1 Like

I would double check the parameters on the river itself, it looks like you may have some settings pumped up to their extreme limits (valley width, floodplain height, and maybe bankfull width are the ones that come immediately to mind, assuming you’re using the river node). I will say, as a casual user, it wasn’t immediately obvious to me how to access the river parameters, so just in case you also didn’t know how to access them, while in the layout view where you initially created the river, if you double click on it, it will open up a dialog box where you can edit various parameters. There’s a lot there, so it’s very possible your answer lies in there. Also, another way to add detail and an element of randomness to the river banks, if you didn’t already know, is by using the Reach Characteristics node. You can use curve nodes to create some pretty natural effects on the banks.

If playing around with the settings doesn’t yield the desired results, something you could try is using a combiner with the original terrain and the terrain after the river has been carved into it, and play with different modes and values until you get a result you like.

There is no way to fix it by tweaking the setting, it not manual river but it is auto river from Create Water or Flow Restructer device so we can’t plug Reach Character device into them, this issue alse occure in Erosion device. The issue come from simulation itself so tweaking its code or simulate in many different angle [rotate your terrain and click simulate] and average them or making it more complicate is the best way to fix it

Well, there is nothing I have under control. River is generated automatically by create water device. I think this is problem of code, because in lower resolutions it is OK, but from some resolutions device stops scaling.
Rotating of terrain an averaging results is quite interesting idea, but even 1 degree of rotation will move rivers by hundreds of meters on 60km terrain, so I am afraid this is not solution.
It seems like I had to carve rivers manually, which is something I really didnt want to do and actually create water was one of the reasons, why I decided to use WM for this project.

I will try to use some post errosions, so lets see, what it can do with it. Maybe it could be tuned to not destroy river banks (we are speaking bout details in size of meters…)

I tried some post errosions, but that does not help much. I also tried masked blur, which helps, but even the weakest blur destroys small rivers. So I dont think this bug can be easily workarounded.

What I would to is instead of blurring the rivers I would make a localized displacement around the rivers to break up the straight lines. You would also have to do the same thing with all the masks. Here is an example at 2k


Very interesitng idea, I will try. Thanks!

edit: I ve used displacement according to your advice to destroy these straight lines and masked blur to little bit tune edges. It is definitelly better, but it little bit corrupts river borders and shape of river is sometimes too much displaced. I will try to tune parameters little bit more, but one iteration takes 30 minutus on my 16 core CPU…but this is different story about currently biggest weaknes of WM.
Anyway I would prefere solution directly in device, this is just workaround, especially because I need to modify every other mask like that, so it increases complexity of already quite complex project. I consider this quite serious bug.

Thanks for help again.

A couple things:

  1. Rivers are limited to the resolution of the terrain they are built against. Essentially, the minimum width of a river is 2 pixels in the heightfield, for various reasons.

So if your terrain is at 10m/pixel, for example, the river can’t be finer across than approximately 20m. At a first glance, the rivers above don’t look necessarily that much lower res than the terrain. However,

  1. Unnaturally straight rivers can be solved by adding a bit of noise to the base terrain prior to flow and create water - this will cause meanders to occur instead of straight lines. The flow algorithm tries its best to avoid straight lines, but if your terrain is very flat (like a valley bottom), it can happen.

Hello,

screens are from 16k build, where I have cca 1,25m per pixel. If you look at the sceens, you can see very fine small details on the terrain (the first picture), also you can compare width of river to tree (tree is cca 17m high). So resolution of heightmap is really not the cause. It is very easy to fix these issues by hand in game engine (on the small scale, not for Kms of rivers), which only confirms, that heightmap resolution is enough.
Problem are not only long straight lines (this is actually the least problem), but there is not one single curve, everything is from straight lines (i know, vector graphics…). On the last picture of the first post is evident, that even very short parts and meanders are minecraft like. On the picture in my last post (after “post processing”) is showed, that this minecraft issue was removed, (blur+displacement), but river bank is broken somewhere.

This problem is not much visible in low res builds, but once you go higher, it starts to be evident and increasing resolution of HM does not help at all.

I really cant use rivers like this, I tried some post processing and it helps, but solution is quite complex, far from perfect and I have to do it for each mask, so my already complex project becames nightmare. So this is issue, which must be solved on device level. What about some antialiasing for the river line?

Note: this issue is not much visible in WM renderer (it does not display any detail above 4k), it must be imported into any game engine.

Thanks

image

Meander, there is at least 10-12px for width of the river :

image

4k render in WM and import in game engine:

Alright, to try to help further here, can you either upload the file you’re having trouble with, or (if this file is for a project where you’d rather not have that file floating around on the Internet), upload a file where you replicate the issue with a different terrain? I can’t seem to replicate the issue on my end just going off of what you’re saying, so I’m starting to think there may be a different underlying problem here.

Edit: After spending a bit more time trying to replicate your issue, here’s a couple parameters you could try adjusting to smooth out those rivers.

In Flow Restructure, try adjusting the Ridge Carving parameter. By default it’s set to the highest value, I’ve found by lowering it, you can get smoother results from a Create Water node following it.

In Create Water, try adjusting Minimum Water Depth and Discharge Scalar. It’ll take a lot of iterating, but I’ve successfully used those parameters to smooth out harsh river channels in a test scene.

If any of these parameters seem to have an effect, it may just take a balance of all three parameters to smooth them out in a way that you like. The Flow Speed parameter in Create Water may have an effect as well, but I didn’t notice any changes when playing with that parameter alone. Failing all of these, an upload of a tmd where the problem you are facing is present would still be very helpful in further trying to troubleshoot this.

1 Like

Hello, replication is pretty easy, any noise, flow restructure, create water, height output. All default values. Render in 4k and export into game any engine. As I wrote before, in WM renderer it is not much visible. Yesterday I ve created such scene with default values for further experimenting, to be sure I dont messed something when tuning values.

I ve found different workaround. I dont use output from create water device, I use its river output, then some very small expand and blur (It is simulation of suggested antialiasing). Then I substract this from terrain and it looks MUCH better, river is antialiased as it should be.

Thanks for help, I will also try your solution, if it works, it would be much cleaner than my (though in my main project project all these values are tuned down, see picture bellow) .

Big advantage of WM is, that you can do almost anything, so you can workaround almost any issue. This is reason, why WM still does not have much competition on the market. On the other side if current goal is to increase productivity (iterate less), these issues should be adressed device level. New GUI will really not help with lowering number of devices.

Anyway thanks a lot, I really appreciate your help.

Ah, that’s actually super helpful, thank you!

So with my own experimentation, I have been able to successfully recreate it (using Terragen rather than a game engine, as I don’t have any game engines on hand), and I have a couple more ideas for you!

The first, and probably most important, is that the Create Water node seems to greatly benefit from having an Erosion node after it, with the terrain from the Create Water plugged into the main input, and the water system plugged into the Water Channel input. This should help smooth it out a bit, and I suspect that the sediment flow and uplift parameters will be extremely useful here.

The second goes back to the minimum water depth. As best as I can tell, you’re going to want your minimum water depth to be lower than your scene scale (so if it scales to 1.25 meters per pixel, you’ll want your minimum water depth to be lower than 1.25 meters). I’ve attached two images. Both exports use the exact same settings with the only change being the minimum water depth. It’s an extreme example, to be sure, but it shows that with some tweaking of the minimum water depth, you can achieve smoother results.

As a slight aside, @Stephen, I don’t know if it’s possible, but I can see some situations in which having both a minimum water depth and a maximum water depth parameter could be useful (or, perhaps, a maximum height differential between the river channel and surrounding terrain, though I expect that would be a nightmare to program, as well as taking a long time to actually calculate).

I agree, some max water depth would help too, I am now trying to tune river ouput somehow to achieve this.

I have other idea how to improve rivers. Currently river takes water and it is bigger and bigger. Which is good enough for far renders, but in FPS mode it looks sometimes wierd (steep slope and big river corridor). So what about take into account also slope of the terrain? Same ammount of water on flat terrain will create wide river, but if there is steeper slope, water is faster, so river corrider will became actually smaller…

I am currently thinking how to do this, but so far no Idea.

I’m gonna be honest here, with some of the things you’re suggesting, it’d be far easier if you used a separate river node rather than relying fully on the flow restructure and create water nodes. With the river node, you can customize depth and width profiles, riverbank size and breakup, and a ton of other things. With a large map, it can definitely be a pain to try to trace out all the rivers, but it may end up being worth it to get the level of detail you’re aiming for here.

With that said, it’d be interesting, and very useful, I think, if in the future the Flow Restructure node could (optionally) have an output that could be fed into a river device to further customize the resulting flow lines.

Yes, this is really a good point. I already have this in my to do list. I will post results, when it is done.

1 Like