3
$\begingroup$

I'm just trying to instantiate some varying Bezier segments on the points of a mesh. I've figured out how to get different values for the loft paths I am instantiating.

I'm having problems rotating the loft profile in the direction I want (away from the center).

I generate the loft paths using these nodes. Basically, I instantiate 2 point-Bezier on a Poisson disk and then offset them to randomize them.

enter image description here

Here is a picture showing the loft paths:

enter image description here

This is my simple curve to mesh:

enter image description here

I'm using this loft profile:

enter image description here

And I want the loft profile to point in the same direction as my loft paths, but all I seem to be able to do is make them point in the same direction:

enter image description here


LAST UPDATE: Here is the complete node tree in a screenshot. It allows for a really wide variation of plant like single stalked clumps. enter image description here

$\endgroup$
6
  • $\begingroup$ Have you considered using Mesh to Curve before realizing instances, or even before instancing on points? Your first image is too small to be readable, but that way curve rotations should still be preserved. $\endgroup$ Jan 25, 2023 at 13:26
  • $\begingroup$ This is the only way to randomize the bezier segments I'm using as a loft path per point I've found. I'm about to say screw it and install the 3.5 alpha just so I can get the simulation nodes (loops). If you know how to get random paths for individual splines for me to instance on points I'm all ears. Trust me I've tried all night. $\endgroup$ Jan 25, 2023 at 13:38
  • $\begingroup$ It would be easier for people who wanna help, if you shared your file on blend-exchange.com $\endgroup$
    – Kuboå
    Jan 25, 2023 at 13:56
  • $\begingroup$ I uploaded it and updated my question. $\endgroup$ Jan 25, 2023 at 14:07
  • $\begingroup$ Yeah I downloaded 3.5 alpha simulation nodes branch and this is SO MUCH SIMPLER. I wouldn't mind someone taking a stab at doing this on 3.4 but I think I'm going to be able to do this within the hour. $\endgroup$ Jan 25, 2023 at 16:22

1 Answer 1

2
$\begingroup$

To align the individual curves in the right direction, you would have to work with the Curve Tilt of the curves in this case.

You can solve this as follows:

enter image description here

  1. Capture the position of the instantiated curves with Capture Attribute in the attribute domain Instance. In your case this is relative to a certain other object.
  2. Then simply calculate the angle between these vectors and any other vector. In this case I use $(1,0,0)$. Since these two vectors are in 2D space, this can be done using $arctan2$.
  3. The generated angle can then be used directly in the node Set Curve Tilt, which will rotate the curve profile to the center accordingly and use it with Curve to Mesh.


(Blender 3.4+)

$\endgroup$
1
  • $\begingroup$ I tried to use capture attribute but I couldn't figure out how it worked. I knew there was a solution using that method. Good s**t man and thanks for the edits. $\endgroup$ Jan 25, 2023 at 17:58

You must log in to answer this question.

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