7
$\begingroup$

I want to create a smooth mesh using four curves. I want to animate the curves so that it changes the mesh. Basically, I have the four curves(black lines) in the picture. Just want to cross link them (red lines) and make the mesh. join four curves into mesh in blender

$\endgroup$
5

3 Answers 3

9
+100
$\begingroup$

Here's a shot at making Loft Curves: a reasonable GN emulation of the AN node in @Chris's answer.

It modifies a curve comprising an arbitrary number of ordered, acyclic splines, of any resolution or type.

The strategy is: first, to create 'cross-ribs' on the incoming splines, by resampling the incoming splines to a desired U resolution, and doing some index-wrangling to switch spline indices and point-per-spline indices:

enter image description here

enter image description here

The cross-ribs simplify smoothing of the geometry in the loft (V) direction, by converting the ribs to Bezier curves, and extending or retracting their curve-handles. Loft Curves assumes the smoothing is already set on the incoming splines:

enter image description here

enter image description here

The Loft Curves GN group employs the above sub-groups as shown. After the ribs are smoothed, they can be resampled to the desired V resolution, and a Mesh Grid can be mapped to the ribs, by index:

enter image description here

A few extra nodes are included to permit the setting of smooth-shading, material, and to flip the face-normals of the lofted mesh, if needed. The group also outputs the UV coordinates of the mesh, for use in texturing.

enter image description here

(Blender 3.3)

Edit: in answer to @alibaba_0000 's query.

When transferring attributes by mapped indices, you must find a mapping from the destination indices to the source indices. You tell the destination where to find the attribute on the source.

The 'Map Indices' cluster, in this case, performs the mapping illustrated by a few examples, below:

enter image description here

.. try a couple by hand.. you'll see. If you can find a neater way.. let me know :)

$\endgroup$
6
  • $\begingroup$ This works! Could you explain what the index mapping is doing? $\endgroup$ Commented Nov 7, 2022 at 9:07
  • $\begingroup$ @alibaba_0000 It takes N splines with M points each, and re-jigs the indices to match M splines with N points each, (Rotating 'grid' indices through 90° without the expense of mapping, rotation, 'closest', for attribute transfer). $\endgroup$
    – Robin Betts
    Commented Nov 7, 2022 at 13:18
  • 1
    $\begingroup$ @RobinBetts ... Thanks :) in hope I will be able to learn from you one day. $\endgroup$
    – vklidu
    Commented Nov 7, 2022 at 17:42
  • 1
    $\begingroup$ @RobinBetts Thanks. This method is really good for constructing meshes (tried a few other things as well). Re-arranging the indices is really janky though. If I understood correctly, the indices get ordered: s00,s01,s02..., s10,s11,s12,..., s20,s21,s23... and the index manipulation changes to: s00,s10,s20...,s01,s11,s12,...,s02,s12,s32... where the splines are sn0,sn1,sn2... $\endgroup$ Commented Nov 7, 2022 at 18:42
  • $\begingroup$ @alibaba_0000 Hehe :) not sure! I need a picture in front of me .. ( which is how I worked it out ) As soon as I get a moment with a machine, I'll send you one... $\endgroup$
    – Robin Betts
    Commented Nov 7, 2022 at 19:28
10
$\begingroup$

Geometry Nodes

Edit - Previous version with Merge by Distance was quite limited ... so here is better one :)

  • start-end connection is bezier now
  • easily change grid density from modifier panel
  • current setup handle extreme curvature
  • start/end surface fits at its position

enter image description here

The example uses ...

  • Two curves (Start / End)
  • Instanced Bezier Segment on Start curve with end point at End curve
  • Points position used as attribute for Grid object

enter image description here

enter image description here

$\endgroup$
5
  • $\begingroup$ i just "stole" your solution here to post it here: blender.stackexchange.com/questions/278553/… - hope you don't mind. $\endgroup$
    – Chris
    Commented Nov 7, 2022 at 15:23
  • $\begingroup$ @Chris No problem ... justQ - Why you didnt reused RobinBetts's one ... seems to be way flexible :) $\endgroup$
    – vklidu
    Commented Nov 7, 2022 at 17:35
  • $\begingroup$ Because i could quickly understand yours. Robin's solution are often from his genius mind - but the downside for me is: i don't understand them quickly.... ;) $\endgroup$
    – Chris
    Commented Nov 7, 2022 at 18:32
  • $\begingroup$ @vklidu The bonus thing is very sweet of you.. thanks. this one did take me a while.. I started off down completely the wrong road.. $\endgroup$
    – Robin Betts
    Commented Nov 7, 2022 at 21:20
  • $\begingroup$ @RobinBetts - I could value it through my own pain :) I felt glorious just for simple indices pairing thing ... so your remapped index list is (in such a flexible way) is in miracle category for me. Thanks $\endgroup$
    – vklidu
    Commented Nov 8, 2022 at 8:08
6
$\begingroup$

with help of the amazing free add-on animation nodes you can basically do it with 4 nodes: (if i don't count the smooth node)

enter image description here

$\endgroup$
9
  • $\begingroup$ Going to try this weekend $\endgroup$ Commented Nov 4, 2022 at 23:02
  • $\begingroup$ @Chris ... Nice and simple :) Thanks ... I just can't make it work. Last blender that works with addon is 2.93 ... even with that a mesh object just disappears ... can you check my file ? Thank you for help $\endgroup$
    – vklidu
    Commented Nov 5, 2022 at 17:09
  • $\begingroup$ @vklidu: You are right. It works "only" on my animation nodes version for Blender 3.4 - i just tested it on older version, there it doesn't work so i would assume this is a bug in older version of AN. $\endgroup$
    – Chris
    Commented Nov 7, 2022 at 10:14
  • $\begingroup$ and if i remember correctly i have compiled my own animation nodes add-on because i am working with python 3.10 - so if you compile it for yourself (i don't think you have a mac, but if you have i can send it to you) and then this worked. $\endgroup$
    – Chris
    Commented Nov 7, 2022 at 10:21
  • $\begingroup$ ok, just copied my animation nodes folder from 3.4 to 3.2.1 and it works with your file: [1]: i.sstatic.net/DAcpE.jpg $\endgroup$
    – Chris
    Commented Nov 7, 2022 at 10:24

You must log in to answer this question.

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