0
$\begingroup$

I am dealing with issue where I wanna instance object on mesh surface with aligned not just one, but all axis. So basically I need the instances to posses the tangent of the face surface on which they are being spawned.

My friend forwarded me this partial solution, which he found on internet long time ago (author unknown). Yet the solution works only when points are created with "Mesh to Points" node. With "Distribute Points on Face" it is not working (see not correctly aligned gizmos). And "Distribute Points on Face" is exactly what I want and need to be using.

I am attaching here the blend file and I ll be super glad if someone here will be able and willing to adjust the geometry node graph, so the instances have correct tangent also when distributed with "Distribute Points on Face". I as trying myself but this is beyond my skills.

Thank you

Image shows correctly transferred surface face tangent to points/isntances when "Mesh to Points" is used and incorrectly transferred surface face tangent to points when "Distribute Points on Face" is used.

enter image description here

$\endgroup$
5
  • 1
    $\begingroup$ Does this answer your question? Trying to align multiple instances of an object normal to faces using geometry nodes $\endgroup$ Jun 21, 2023 at 15:40
  • 1
    $\begingroup$ Depends what you mean by 'Tangent' .. (eg in shaders it depends on UV directions) maybe longest edge ? $\endgroup$
    – Robin Betts
    Jun 21, 2023 at 16:33
  • $\begingroup$ dose this help shmueldisrl.gumroad.com/l/efjnv $\endgroup$
    – shmuel
    Jun 23, 2023 at 3:30
  • 1
    $\begingroup$ so I tried the propositions, where I switched the point generation from "on Mesh" to "Distribute on Faces": MarkusvonBroady in your solution the objects were always randomly oriented shmuel I have no idea how to use your GN to what I need @RobinBetts in your solution it almost works. X axis kind of always follow the flow of the tube, yet the x/y axis is often flipped. See here link. Do you know how to improve/fix it so, the axis always follow one direction...you know what I mean. Thx $\endgroup$
    – skywalger
    Jun 23, 2023 at 12:08
  • $\begingroup$ sorry for formating of the comment...need to learn it $\endgroup$
    – skywalger
    Jun 23, 2023 at 12:15

1 Answer 1

2
$\begingroup$

Fix is to place Capture Attribute last inside Face Tangent node group

enter image description here

Edit: That was my old face tangent node group that I shared, here is updated version that will let offset which face edge vector points

enter image description here

$\endgroup$
1
  • $\begingroup$ Thank you very much. This does the job done. $\endgroup$
    – skywalger
    Jun 27, 2023 at 9:14

You must log in to answer this question.

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