10
$\begingroup$

I am trying to create realistic book pages. I've created two Bézier curves for the top and bottom pages, and now I'm trying to "interpolate" them and create instances between the two curves. I think this might work by determining the position, size, and rotation of the vertex and averaging in the geometry nodes or by adding some modifier I don't know of.

The two orange curves are the top and bottom of the book. The yellow curve is the one I want to calculate. In addition, I want to control the set of curves in between with a slider. enter image description here

I hope I could explain the problem understandable and there is a solution :D

$\endgroup$
2
  • $\begingroup$ Don't know if it's worth a shout, but does anyone know of a surefire way to import vector paths from Adobe Illustrator as Bézier curves in Blender? Because interpolating (Blending, as it's called) between two paths like this is totally possible in Illustrator so if it can be done there then imported, this could be a solution. Disregard this if a better solution exists (especially one that is done entirely within Blender) $\endgroup$
    – Onyx
    Apr 14, 2022 at 13:57
  • $\begingroup$ @Onyx if you can export them as svg, you will be able to import them into Blender $\endgroup$
    – Gorgious
    Apr 18, 2022 at 17:10

1 Answer 1

16
$\begingroup$

Assuming both curves have the same number of control points, this is how you can interpolate between them :

enter image description here

Transfer the attribute form one curve to the other by control point index, then mix both positions and use the factor for interpolation. Then use a Set Position node to change the CP positions.

If you're using a Bezier Curve, it's a little bit more complicated since you need to also interpolate the control points handles positions.

Relevant docs:

curve handle position node

set handle position node

enter image description here

enter image description here

Here's another solution that will work with curves that don't have the same number of control points. Unfortunately, I couldn't get the resampled curves to keep the handle positions so it needs a higher number of control points.

enter image description here

$\endgroup$
6
  • 1
    $\begingroup$ Oh, green marked nodes! ...I like green marked nodes! ...and I like this beautiful solution too! ;-) +1 $\endgroup$
    – quellenform
    Apr 14, 2022 at 18:14
  • $\begingroup$ @quellenform hehe yeah this ans CTRL H to keep only relevant sockets makes life much easier in bigger node trees :) $\endgroup$
    – Gorgious
    Apr 14, 2022 at 18:18
  • 1
    $\begingroup$ At a little risk of distortion.. no need for the incoming curves to have an equal number of control-points. You could resample them so they do. $\endgroup$
    – Robin Betts
    Apr 17, 2022 at 21:31
  • $\begingroup$ @RobinBetts fair point ! I'll add it to the answer. :) $\endgroup$
    – Gorgious
    Apr 18, 2022 at 16:53
  • $\begingroup$ Nice answer! I just put these together, so I'll share in case anyone wants to check them out. Here's the basic version and the resampled version. $\endgroup$
    – Mentalist
    Jul 11, 2022 at 17:52

You must log in to answer this question.

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