1
$\begingroup$

With the srinkwrap constraint I can snap/align one object to another object's face (aligning with it's normal) or vertex.

How can I snap/shrinkwrap an object to another object's edge aligning the object with edge's direction? (Y axis I suppose).

I know I can do that during editing (snapping menu), but I need a way to do it "authomatically"/proceduraly in the scene.

$\endgroup$

2 Answers 2

2
$\begingroup$

Somebody is going to come up with a simpler way to do this... It's a shame Blender doesn't have 2-point vertex parenting, as well as 1 and 3-point parenting. I don't think it would break the grammar of the interface too much, with sensible defaults.

I can't think of a way that doesn't involve parenting target Empties to vertices. If I'm right, and you have to do that anyway, then here's a GN group that might help. It constrains the modified object between 2 target objects...

enter image description here

..in this case, 2 Empties, vertex-parented to the ends of an edge.

enter image description here

  • By default, the modifier sets the object halfway between the targets, with its Z-axis oriented along the line between them.
  • The 'Slide' parameter slides the object up and down the line.
  • The 'Rotation' parameter rotates the object with respect to its initial Z-edge-orientation.

enter image description here

(Blender 3.0b)

$\endgroup$
2
$\begingroup$

It is a shame that there's no shrinkwrap/edge. However, shrinkwrap/nearest point works just fine on meshes with zero area faces, so you can basically do the same thing by some simple changes to your shrinkwrap target.

If you give the target a wireframe modifier and set the thickness to 0, your shrinkwraps to nearest points will be shrinkwraps to and edge-- all that's left of the target are its (now invisibly thin) edges.

If the target was important for something else, you can duplicate it and make the duplicate the wireframed target of the shrinkwrap, parenting the duplicate to the original. If the original target deforms, then you can have the duplicate surface deform from the original target (before the wireframe.)

There are other ways to conveniently make zero area faces. If I'm doing something like this, it's usually a fairly simple mesh, and I'll just vertex slide one edge loop into the other in a shapekey, or scale an edge ring to 0 in individual origins.

$\endgroup$
1
  • $\begingroup$ I knew someone would come up with simpler way(s) :) I do think 2-point vertex-parenting would be a convenient little improvement to Blender. $\endgroup$
    – Robin Betts
    Commented Nov 25, 2021 at 8:24

You must log in to answer this question.

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