Render Artifacts When Using Planet Water Shader for Rivers (Classic Erosion)

Started by CriticalTodd, July 19, 2020, 11:03:58 AM

Previous topic - Next topic

CriticalTodd

Hey All,

Have access to a PC now so I picked up the Classic Erosion plugin and spent yesterday messing about with it. I followed the guide and set up the plugin to output a river system. Per the guide, I tried setting up a planet to act as the water body. It took me a bit to wrap my mind around how to do this and I'm not 100% sure I got it right but after outputing the water depth map from the plugin, converting it to a scalar, and feeding it as a function into a Displacement shader with the output of the main Compute Terrain. I ran that output into the input of a Water shader that I set as the surface shader of the second planet I set up for the water.

All of this seemed to work as far as visible water goes but when the water planet is enabled, I get a lot of black artifacts (not sure that's the correct word) in the render that aren't there if I disable the planet. Any ideas on what I've done wrong or what I need to do?

river render test 1.png

river render test 1 -no-water.png

WAS

The river system is more a fake setup to be viewed from a distance from my experience.

CriticalTodd

Quote from: WAS on July 19, 2020, 01:09:59 PMThe river system is more a fake setup to be viewed from a distance from my experience.
Fair enough but that doesn't explain, or help with, the artifacts. Any ideas on that front?

WAS

I'm assuming the artifacts are displaced/offsetted terrains intersecting perhaps. You may dry hardening the river map and than use it to offset the river up to the main planets surface (using a negative offset on the rest of the terrain for the river planet). This should hide the river planets terrain and leave you with the river popping up the river bed.

CriticalTodd

Quote from: WAS on July 19, 2020, 01:29:49 PMI'm assuming the artifacts are displaced/offsetted terrains intersecting perhaps. You may dry hardening the river map and than use it to offset the river up to the main planets surface (using a negative offset on the rest of the terrain for the river planet). This should hide the river planets terrain and leave you with the river popping up the river bed.
Thanks. As I am a noob at this, what does it mean to, and how does one, harden the terrain?

EDIT:

Also, not sure how to make the offsets... I see some functions to affect heightfields. Is creating a heightfield and then manipulating that on the right track or should I be doing something else?

Dune

The black is very likely the water planet/sphere seeping through the skin of the main planet, but without the water shader, as that's masked out.
I think the erosion river setup is best used on one planet, just use the mask to add a water shader to the flattened river.
Or use the erosion shader to carve the rivers (then don't check the flattening), and use the uncarved, slightly lowered terrain on a sphere as water surface. You need to mask the river area then, and maybe clamp/color adjust the mask, or use a opacity mask (default shader) to take out all surface except river.

CriticalTodd

Quote from: Dune on July 20, 2020, 02:24:53 AMThe black is very likely the water planet/sphere seeping through the skin of the main planet, but without the water shader, as that's masked out.
I think the erosion river setup is best used on one planet, just use the mask to add a water shader to the flattened river.
Or use the erosion shader to carve the rivers (then don't check the flattening), and use the uncarved, slightly lowered terrain on a sphere as water surface. You need to mask the river area then, and maybe clamp/color adjust the mask, or use a opacity mask (default shader) to take out all surface except river.
Thanks for the tips. I'll give that a try.

WAS

Carving method may work best there. The flat part of the river isn't supposed to be the surface of the river, where the entire river has huge banks in low drought.

Here is quick offset example. This is smoothing the original terrain so you can have it follow the terrain, but I only used a smoothness of 2.5 and not sure that's enough to really blend it well (can see it pop up). But using the banks map, you can offset the river sphere back up to the rivers only, keeping the rest of the terrain under the planets.

Dune

I usually start with a very smooth terrain, make the line to the water sphere, and only after that add more displacement to the main terrain, masking out the river, helped by color adjust for narrow or soft borders.
But as you can see, the river mode is best used for more aerial views, not this low. Water inevitably creeps upward and slants sideways. And then you can easily just add a water shader to a masked last surface shader, so no water sphere.

CriticalTodd

Thanks guys. I've definitely got some things to try. As tim still groping my way around the software, a lot of steps that seem so easy when I read them end up opening all sorts of cans of worms for me but they do provide learning moments for me.  ;D

WAS

Quote from: Dune on July 21, 2020, 01:30:48 AMI usually start with a very smooth terrain, make the line to the water sphere, and only after that add more displacement to the main terrain, masking out the river, helped by color adjust for narrow or soft borders.
But as you can see, the river mode is best used for more aerial views, not this low. Water inevitably creeps upward and slants sideways. And then you can easily just add a water shader to a masked last surface shader, so no water sphere.

This is why, if I can, I'll just paint in a river with a very soft brush, or even SSS system like the river shader I shared (https://planetside.co.uk/forums/index.php/topic,25926.0.html). It's alot easier to control the river masking from terrain to have that level water surface. Though some shots may require rivers running over terain which it'd be nice to have a more straight forward masks outputted from classic erosion. For example, another map "water surface" which has boundaries past the banks allowing you to move your water surface up/down along the banks of the river without the rising effect present in my example above.