3
$\begingroup$

I was looking at @RobinBetts excellent answer in how to bend geometry with geometry nodes and trying to edit it to recreate full curve functionality, but I'm getting stuck with handling the radius property of curves.

The best I've managed to do so far is this:

enter image description here

where I'm creating a line mesh from the curve (so that I can transfer radius by index), and then using that to transfer the radius by length along the curve to the rest of my nodes. In addition to feeling very clunky, this creates a few problems:

enter image description here

The radius doesn't interpolate along the length of the curve-- I'm just getting it from the nearest vertex on the line, which is getting it from its corresponding curve control.

I could subdivide the line and transfer it to create some interpolation, or I could create some geometry for the line to get linear interpolation, but even if I do that, I won't be acquiring the actual radius from that point on the curve, not a radius that uses whatever interpolation mode is set for the curve, the way that I could with tilt.

Are there some other, better ways to create a curve modifier that uses the radius of the curve?

For convenience, which is almost entirely Betts's work from the link above, just my current, screwed-up radius implementation (and some simple bounds-clamp+stretch stuff.)

$\endgroup$
3
  • $\begingroup$ the Simple_Spiral "has" already that weird radius. Is this intended? [1]: i.sstatic.net/IHctV.jpg $\endgroup$
    – Chris
    Commented Jan 27, 2022 at 17:54
  • $\begingroup$ @Chris It was just me testing the radius for purposes of the GN modifier. The radius is fine; it'll be smooth if you set the curve to bevel (although weird looking.) The problem is the deformed mesh failing to interpolate that radius. $\endgroup$
    – Nathan
    Commented Jan 27, 2022 at 18:24
  • $\begingroup$ Ok, thanks for the info $\endgroup$
    – Chris
    Commented Jan 27, 2022 at 18:49

1 Answer 1

4
$\begingroup$

I don't think I can do any better than what you have already tried:

  1. Collapse the mesh onto the curve
  2. Sample the radius of the curve on another branch, from a separate conversion to points
  3. Attribute Transfer the radius from the other branch to the mesh, and scale the mapping by it...

enter image description here

.. but the points at which the radius are sampled are not the points onto which the mesh has been collapsed, and the transfer does not interpolate. So you have to over-sample the curve's radius to reduce sampling errors.

The over-sampled result is OK, but suffers from a second problem: no matter what you set the radius interpolation of the curve to in its 'Geometry' panel, it's 'Linear' like all other fields, when imported into GN....

enter image description here

... and you have to figure out the over-sampling yourself, if you want to be economical....

enter image description here

I think we just have to hope that Sample Curve returns Radius, as well as the other attributes, in a future revision of the node. That would avoid a lot of wearying hackery, in this, and other cases.

$\endgroup$
6
  • 1
    $\begingroup$ +1 ................. $\endgroup$
    – Chris
    Commented Jan 28, 2022 at 12:16
  • $\begingroup$ @Chris ............... I promise I'll try to avoid answers involving this group in future... ;) $\endgroup$
    – Robin Betts
    Commented Jan 28, 2022 at 12:25
  • $\begingroup$ i don't understand...!? why? what group? $\endgroup$
    – Chris
    Commented Jan 28, 2022 at 12:27
  • $\begingroup$ @Chris I thought the dots were a reference to the mileage I was getting out of the curve-deform, as previously discussed :) $\endgroup$
    – Robin Betts
    Commented Jan 28, 2022 at 14:02
  • $\begingroup$ Thanks for taking a look. I think it's probably the case that this just can't be done better than by sampling as many points as you can afford to. I'm going to leave the question open in case future GN changes make better solutions possible. $\endgroup$
    – Nathan
    Commented Jan 28, 2022 at 17:07

You must log in to answer this question.

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