2
$\begingroup$

Hello again dear community,

Here is a very basic setup in which:

  1. I Created a cube (as test geometry).
  2. I separated the faces by splitting the edges and scale them down a bit with "Scale Elements" node.
  3. I've capture the faces normals for each point.
  4. I Created curves from the faces with "Mesh to Curves" node, indexes get shuffled around a this stage which is expected since spline points need be connected in sequential order in a loop).
  5. I captured the new normals and they are different from the original normals.

enter image description here

I need to transfer (or align rotation) of the new curve normals with the faces normals.

I figured I might need to used the "Set Curve Tilt" node but how can I calculate the tilt angle needed for such alignment, I find this confusing since some normals need to be rotated on more than one axis apparently (index 8-11 in the spreadsheet for example)

any idea?

EDIT

To simplify the question what should I plug in the tilt socket that will make the "FixedNormal" column in the spreadsheet Match the "Desired normal" column in the spreadsheet in this setup. I need a way to determine if its 0, -90, 90, 180 or 180 degrees for every spline point.

enter image description here

$\endgroup$
0

1 Answer 1

1
$\begingroup$

In this case, you would only need to capture the normals of the faces with Capture Attribute before converting the mesh with Mesh to Curve.

Then you use the Capture Attribute node again to transfer exactly these values to the points of the curves.

enter image description here

Tip: By the way, use the node Store Named Attribute only if you want to use these values outside your node tree (e.g. in the shader or in another modifier). Otherwise you would only store additional values in the geometry, which would lead to additional ballast. If you absolutely want to use Store Named Attribute, remove the unused or no longer needed values at the end of your node tree with Remove Named Attribute.

$\endgroup$
9
  • 1
    $\begingroup$ re: Tip: ... not to mention introducing a name-dependency, making your modifier less general, which is another reason the devs wanted to avoid it? Better to let the user make the link in the modifier interface, per-use. $\endgroup$
    – Robin Betts
    Aug 1, 2022 at 19:15
  • $\begingroup$ Hello again, quellenform as always thank you for your quick replies :) I think that me using the "store attributes" might have made my question unclear (I've used it only to illustrate the problem with the "numbers" and didn't plan to use it in my setup). Let's say I was to use instances on points right after this setup, instances should face the same direction has the original face. what I need i think is to calculate the difference between the normals before and after the "Mesh to curve" and find the corresponding value of the tilt. $\endgroup$
    – MrW
    Aug 1, 2022 at 19:16
  • $\begingroup$ Please note that I don't need to use instances on points. In need to do something more complicated but i need to fix the normals after the mesh to curve to match the original face normal $\endgroup$
    – MrW
    Aug 1, 2022 at 19:28
  • 1
    $\begingroup$ @MrW Then please be so kind and share your blend file with us and try to explain this a little more precisely, because I can't imagine the "something more complicated" exactly, unfortunately ;-) $\endgroup$
    – quellenform
    Aug 1, 2022 at 19:33
  • $\begingroup$ I'm creating an inset faces setup. It's a a combination of a few setups one of which is working only thanks to your help last time around. With this question i've isolated the setup to illustrate the problem but there not much more than what you've recreated i will upload the file in any case but if you want to see all the setups I can send it to you $\endgroup$
    – MrW
    Aug 1, 2022 at 19:57

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