adjust altitude mask to terrain?

Started by Dune, May 15, 2021, 04:14:53 AM

Previous topic - Next topic

Dune

Once more the question that I can't answer; is there a way to adjust an altitude mask to a terrain? I need a maximum altitude to undulate with the terrain, to be used for texture later on in the line. The purple should end just under the overhang, and follow its displacements, and it obviously doesn't.

I figured I could warp an altitude (not final) with the terrain, but can't get it to work, not with the redirect into warp, nor with the direct input of the displacement from the terrain into the warp shader, nor using Y.
Perhaps the answer is real simple, so please embarrass me :P

The only way I can imagine is put the big displacement at the end of the line, but that's not how it should be done.

WAS

Is it right to assume this layer is the sinkholes walls ice? Just trying to understand the scenario before attempting a replication.

cyphyr

Can you convert the displacement to scalar and then use that as an input to a re-direct shader (y).
www.richardfraservfx.com
https://www.facebook.com/RichardFraserVFX/
/|\

Ryzen 9 5950X OC@4Ghz, 64Gb (TG4 benchmark 4:13)

Dune

Yes, it's the ice. And thanks Richard. Just this morning I woke up with the idea of using the displacement to scalar, but probably not to warp, but with a color adjust to set it's altitude as a direct mask. Must be possible.

Dune

Got it figured out. A few XYZ shaders messed up the altitude in terrain, so it's actually extremely simple. I only had to find a way to circumvent the XYZ's I needed.

sboerner

Great thread. Thanks for sharing the solution -- have to try this.

WAS

Are you using final positions or something?

XYZ shader should gives you an exact altitude to the terrain imo. For example, if you need height limitations before a compute terrain, you use a texture coordinates.

Dune

No final positions. I needed the altitude inside those sinkholes (and conforming to the undulating terrain), but had a construction set up with some XYZ shaders in the main line to 'solidify' the displacements, so I could smooth any displacements after that XYZ in a later surface shader. But those XYZ shaders messed up the orginal altitudes off the compute terrain, even if using altitude in terrain! I disabled/deleted them, and altitude a few meters under the rim did conform to the bigger displacements after the compute terrain. So it's very easy; just do the bigger displacements after a compute terrain and later in line you can have the original altitudes 'warped' with the terrain, but don't use any XYZ between the 2.
And then you probably say; of course. :P

Dune

Two latest versions. In one I used fractal warp to warp the simple shapes, but the result gave too much zigzag in the ground strata, so I changed that to a warp and vdisp setup (final 2).

WAS

Oh I see what you mean, yeah. The warpies from displacement after computation of XYZ?

The new second result looks good.

Dune

Right. Very useful XYZ, but handle with care ;)