4
$\begingroup$

I am using Geometry nodes - from a given 2D input curve.
How can I produce a new curve with a fixed offset (relative to the original curve)?

I'm trying this node setup:

enter image description here

... but result is not constant (left), I'm looking for the result seen in the right screen.

enter image description here

Edit

I tried quellenform's node tree, but it doesn't work for my curve ...

enter image description here

The result is a non constant offset: enter image description here

$\endgroup$
2
  • $\begingroup$ Thanks for the reply - the updated node setup in the question shows the solution you suggested but for some reason I don't get the same result as you... Your curve is constant offset, mine is not constant... Is there something wrong with my node setup? $\endgroup$
    – stackzz
    Commented Jun 11, 2022 at 0:59
  • $\begingroup$ OK I see your updated comment below... "resample curve" fixed it and it's working perfectly... thank you $\endgroup$
    – stackzz
    Commented Jun 11, 2022 at 1:05

1 Answer 1

11
$\begingroup$

This can be solved like this:

enter image description here

Use the node Normal as input. This node returns the normals of the individual points.

These vectors can then be scaled with the (Vector Math) node Scale according to the desired distance.

With the node Set Position you can finally offset the individual points to a new position.


If this does not work well (What can sometimes be the case with Bezier curves), or the curve has idiosyncratic normals, then use the node Resample Curve beforehand, this would smooth the curve.

enter image description here

$\endgroup$
8
  • $\begingroup$ Shouldn't the normal already be normalized ? >< $\endgroup$
    – Gorgious
    Commented Jun 10, 2022 at 10:26
  • 1
    $\begingroup$ @Gorgious ...Shame on me, you are of course absolutely right :D $\endgroup$
    – quellenform
    Commented Jun 10, 2022 at 10:26
  • 1
    $\begingroup$ wow that was the fastest edit I've ever seen ! Cheers :) $\endgroup$
    – Gorgious
    Commented Jun 10, 2022 at 10:28
  • $\begingroup$ This looks like a really good answer. I'm unable to recreate the same result. It looks like you are using blender 3.1.2 - I'm using blender 3.2 but that shouldn't make a difference. I recreated the node diagram using Set Position, Scale, and Normal but the offset is not constant in my result. Did you do anything special to your input curve? I updated the original question node diagram and result to show what I have now. $\endgroup$
    – stackzz
    Commented Jun 10, 2022 at 23:37
  • $\begingroup$ This solution address the correction exactly: "relative to the original curve". But as an alternative solution is there any way to make the second curve offset a fixed value rather than a scale percentage? $\endgroup$
    – stackzz
    Commented Jun 10, 2022 at 23:42

You must log in to answer this question.

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