0
$\begingroup$

I made a curve and tweaked it's radius in edit mode, then lowered the bevel value to 0 for it to be considered a curve and not a mesh in geometry nodes.

In geometry nodes I'm displacing the curve along its normals with a texture. Fairly straightforward. My current nodetree

Problem is, the curve doesn't taper off on the ends like I expected it to. I've tried using the spline parameters node but it doesn't seem to take any effect (I'm guessing it only works in a specific way). Viewport screenshot of the current curve

Does anyone know how I would be able to drive any value (or just the multiply node on my nodetree), using the curve's length so it tapers off on the ends? I'm guessing you'd have to run it through some nodes so it starts and ends in 0 instead of going from 0 to 1.

$\endgroup$

1 Answer 1

1
$\begingroup$

Right now, you're not doing anything to the radius that depends on the length of the curve. You are setting the radius to, well, the existing radius, which doesn't do anything. And while you are displacing the eventual mesh object along its normals, you're not providing a vector the Voronoi texture, so you're relying on any defaults for this vecotr-- I'm not sure if any exist, but if they do, they're not based on curve length, and Voronoi doesn't trail off to zero anyways.

If we want to drive the radius of a curve in GN, it's fairly straightforward:

enter image description here

We use a spline parameter node to drive a function (here, a float curve node) which drives the radius. Shown with two splines within a single curve, to demonstrate that the length is per-spline, and here, using the "factor" output of spline parameter, that length is relative to the total length of the spline.

What if we want to instead drive the radius of the spline from length in absolute terms, rather than relative to the length of the spline? Then we can make radius some function of spline parameter/length, which outputs the object space length of the spline at each control:

enter image description here

These are the same input splines, but now they are mapped, via a map range node, to a radius of 1.0 at the beginning of each spline and 0.0 at 2 units along each spline. The top spline is still longer, but beyond 2 units length, it has a radius of 0, so they appear the same length. More precisely, every control that is more than 2 units along the length has a radius set to 0-- between controls, the radius interpolates. So this doesn't exactly mean that the visible spline is 2 units long.

If we would like to displace the radius after the curve has been turned into a mesh, perhaps to displace it in any direction, we can capture a spline parameter and use it to modulate that displacement:

enter image description here

Here, I'm scaling my mesh displacement down by the spline factor, so there is no displacement at the first control of the spline, and there is full displacement at the end of the spline.

We could use length instead for this, just as we did above; we could use a float curve or other function to modulate it, just as we did above.

$\endgroup$
3
  • $\begingroup$ That would work if I didn't have any displacement set on the curve, but the displacement spaces the vertices apart after the curve radius is set $\endgroup$ Feb 7, 2023 at 16:21
  • $\begingroup$ @Throndronis Ok, see edit. $\endgroup$
    – Nathan
    Feb 7, 2023 at 16:40
  • $\begingroup$ Ohh, so you'd have to use the Capture Attribute node to use it somewhere else. Got it. $\endgroup$ Feb 7, 2023 at 17:52

You must log in to answer this question.

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