3
  1. Can you explain to me how to scale the instances (1,2,3) based on the 2-axis distance (segment length) up to the next curve point, based on the instance source point?

  2. Can you explain to me how to rotate the instances to the next point position. The y-axis is the one I need to rotate.

enter image description here

enter image description here

Harry McKenzie
  • 10,995
  • 8
  • 23
  • 51
Christoph Werner
  • 1,965
  • 1
  • 14
  • 31
  • Additional infos: The array models (fence parts) should be the same size like a curve segment. And if possible the elements should end dynamically at the nex point position of the curve. With curve segment I mean the range between two curve points. – Christoph Werner Sep 06 '22 at 13:18
  • so do i understand you right, you want to make a fence? that fence should "start" at z = 0 for every part and height of the curve point? and on each point there should be a fence part? or between two points? – Chris Sep 06 '22 at 13:22
  • The pink borders in my 1st shot describes how the results should look like. The fence height shouldn't change. Just the length should be scaled up to the next point. – Christoph Werner Sep 06 '22 at 13:43

2 Answers2

3

To align the objects you want to instantiate at the points of a curve exactly to the curve segments, you can use the following setup:

enter image description here

Here I first simply calculate the direction vector between two points. This is the direction between the current point to be instantiated and the next point.

If you then remove the values for the Z-axis, you get the direction vector you are looking for.

This serves you as a vector to create a rotation with the node Align Euler to Vector.

The scaling is also achieved via this vector.

Simply determine the length and scale your objects with this value.

For example, if you use an object with length $1$, you can directly apply the length of the vector as scaling.


If the use of a Bezier curve is not suitable for your application, you can use a Poly spline instead. Of course you can also create this directly in Geometry Nodes by using the node Set Spline Type:

enter image description here

And here you can see the whole thing in action:

enter image description here


(Blender 3.1+)

quellenform
  • 35,177
  • 10
  • 50
  • 133
  • ok, that was easy ;) i thought the OP wanted the fences to reach from curve point to curve point - so different length of each segment – Chris Sep 06 '22 at 13:52
  • 1
    ok, so your answer is not perfect ;) +1 -> read his newest comment :D – Chris Sep 06 '22 at 13:53
  • @Chris Ah, OK, indeed, there is something wrong. I started writing with the answer before the addition. That's what happens... ;-) – quellenform Sep 06 '22 at 14:06
  • Thank you. I hope your solution still helps me to find the final solution. My main focus is to learn it myself. But I'm just an artist with basic technical knowledge and there are limits ... ;) – Christoph Werner Sep 06 '22 at 14:10
  • I thinks he wants different length for each curve segment. As I understood him, one fence segment should be from one curve point to the next curve point. – Chris Sep 06 '22 at 14:20
  • @Chris Different lengths are possible here. Just edit the curve according to your wishes and the fences will be adjusted in length. Have you tried it? – quellenform Sep 06 '22 at 14:21
  • i don't like to disagree...but i still thinks he wants the fence from one curve point to his next curve point. So the resample node "destroys" here his plans ;) or you would use set position to "correct" the positions afterwards...but i cannot see that in your node tree...and yes, i tried ;) too many fence segments and not just between the curve points of the original curve – Chris Sep 06 '22 at 14:22
  • @Chris Then you just use a Poly Line instead, and leave out the Node Resample Curve, right? – quellenform Sep 06 '22 at 14:25
  • 1
    yep, THAT'S the solution !!!! nice -> maybe change again the answer ;) – Chris Sep 06 '22 at 14:26
  • You are welcome! – Chris Sep 06 '22 at 14:53
  • 1
    Thank you all for the hints, especially @quellenform . I'll post my documented solution later. I learned a lot! – Christoph Werner Sep 06 '22 at 15:42
2

Here's the final solution, how I need it. Thank you a lot again to everybody. I've learned a lot!

enter image description here

The final file:

Christoph Werner
  • 1,965
  • 1
  • 14
  • 31