2
$\begingroup$

does anyone have an idea how I can create a wavetextur in geometry nodes with a flowing gradient?. I can limit the texture but I always have a sharp edge and no smooth transition. I hope the picture can make that clearer.

many thanks

Julian

enter image description here

$\endgroup$
1
  • $\begingroup$ You already use a Scale node to control the strength of the effect - you can similarly control the strength based on the Z position. $\endgroup$ Oct 11, 2022 at 17:34

1 Answer 1

4
$\begingroup$

Sure. But first, let's identify something you're doing that doesn't make sense: you're turning a fac into a vector via vector math, then turning that vector into a scalar by plugging it into your bottom vector math/scale input. Your vector math/multiply isn't really serving much purpose here, and you'd be better off using a math/multiply node here, or building that multiplication into your Map Range node (with "clamp" disabled.)

After that, the reason that you always have a sharp edge is because you're either displacing it or you're not, because you are operating via "selection"; and the size of that scale is not at all a function of the Z position of the vertex.

enter image description here

Here, instead of acting on a selection, I'm acting on all vertices, but I'm modulating the displacement down to 0 for most of them. By remapping the Z position with the Map Range and RGB curves nodes, then scaling my displacement vector by that remapping Z position, I can create a smooth gradient of no displacement (at or above Z = 0.0) to full wave displacement (at or below Z = -0.5). With just the map range node on Linear, this would be interpolated linearly; the RGB curves node shows how I change that interpolation curve arbitrarily.

$\endgroup$
3
  • 1
    $\begingroup$ +1.. tiny thing... GN has a Float Curve node. $\endgroup$
    – Robin Betts
    Oct 11, 2022 at 18:23
  • 1
    $\begingroup$ @RobinBetts I didn't know that! But it didn't used to, and it ends up being the same thing, so I'm probably not going to switch :) I'm still in the habit of using a bunch of RGB stuff where Blender doesn't really support it, or maybe only didn't used to support it, like mixRGB to do any kind of lerp3, color or vector. $\endgroup$
    – Nathan
    Oct 11, 2022 at 18:30
  • 1
    $\begingroup$ Zackerly. No need to edit ... FYI only. $\endgroup$
    – Robin Betts
    Oct 11, 2022 at 19:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .