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.
-
$\begingroup$ Suggestion. Please consider an armature of 4 sets of 4 bone sequences. Hook modifiers on curves are possibility. You may want to search question with the word [loft] or [lofting] $\endgroup$– atomicbezierslingerCommented Nov 4, 2022 at 17:28
-
$\begingroup$ are your curves subdivided? You could hook each vertex of your mesh to some empties, then parent the empties to the vertices of the curve... $\endgroup$– moonbootsCommented Nov 4, 2022 at 17:31
-
1$\begingroup$ You can also consider a [spline ik constraint] on armatures. $\endgroup$– atomicbezierslingerCommented Nov 4, 2022 at 17:37
-
$\begingroup$ @moonboots would like to have many points > 50 on curve to produce smooth mesh. I will probably need to subdivide it to get the right shape when I create animation. But to get started doesn't have to be subdivided. $\endgroup$– alibaba_0000Commented Nov 4, 2022 at 23:32
-
$\begingroup$ Related blender.stackexchange.com/questions/1503/… blender.stackexchange.com/questions/746/lofting-between-splines blender.stackexchange.com/questions/138901/… blender.stackexchange.com/questions/278462/… blender.stackexchange.com/questions/301152/… $\endgroup$– Duarte Farrajota Ramos ♦Commented Nov 6, 2023 at 9:42
3 Answers
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:
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:
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:
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.
(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:
.. try a couple by hand.. you'll see. If you can find a neater way.. let me know :)
-
$\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$– vkliduCommented 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
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
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
-
$\begingroup$ i just "stole" your solution here to post it here: blender.stackexchange.com/questions/278553/… - hope you don't mind. $\endgroup$– ChrisCommented Nov 7, 2022 at 15:23
-
$\begingroup$ @Chris No problem ... justQ - Why you didnt reused RobinBetts's one ... seems to be way flexible :) $\endgroup$– vkliduCommented 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$– ChrisCommented 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$– vkliduCommented Nov 8, 2022 at 8:08
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)
-
-
-
$\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$– ChrisCommented 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$– ChrisCommented 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$– ChrisCommented Nov 7, 2022 at 10:24