1
$\begingroup$

I have a curve, and I have an object. I want the object to not only rotate according to the tangent of the curve, but according to the tilt information of the curve. I'm not sure how to use that tilt information in geo nodes though.

enter image description here

I'm aware that this can be done with a "follow path" object constraint, I'm just trying to figure out if it can be done in geo nodes.

https://youtu.be/Hk6Xf--Tfcg

$\endgroup$
0

2 Answers 2

2
$\begingroup$

The 'Tangent' of a curve is determined by its geometry. There's only one vector which is tangent to a curve at any point.

That leaves a disc of (an infinite number of) possible 'Normals' to the curve, in the plane to which the Tangent is normal.

Which one of those is selected to be the 'Normal' at Tilt 0° is calculated internally, according to your curve's settings, as answered here.

The 'Tilt' is an angle about the 'Tangent' axis with respect to the pre-calculated Normal at Tilt 0°, to which the 'Normal' is then set:

enter image description here

So to get your cube to follow the tilt, you align one of its axes to the Normal....

enter image description here

... which may or may not have been tilted in your GN tree by Set Curve Tilt. (That angle can be varied along the curve, by feeding it some function of Spline Parameter, for example.)

You can rotate the vector to which your object is aligned around the Tangent 'by hand', as well.. the blue boxes above do much the same thing. One of them changes the Normal, the other changes your object's rotation with respect to the Normal.

$\endgroup$
1
$\begingroup$

Thanks to @quellenform's answer I finally make it work ...
Test with Curve's Tilt at Point 1 = 0° and Point 2 = 90°...

enter image description here enter image description here

Notes:

  • Violet color of Sample Curve node is driver to animate the Cube (just typed #frame*0.01
  • another way to animate object is Time Scene node > Frame and Math node > Divide by something like 100

$\endgroup$
5
  • $\begingroup$ Hi, could you explain why "tangent" is set to "rotation" in the first "align euler to vector" node? I don't get it... : ( $\endgroup$
    – lemon
    Feb 11, 2023 at 19:47
  • $\begingroup$ @lemon I would love to, but sadly I don't know why. I could offer just a solution ... Yesterday I spent four hours of searching even for solution with many tries and failes conversions of Tilt or what ever ... so if anyone can offer explanation I'm ready to delete my post :) I can just guessing the first Tangent is the Tilt. $\endgroup$
    – vklidu
    Feb 11, 2023 at 19:56
  • $\begingroup$ No, don't delete it anyway... we just have to find the "why" (not self evident to me, I'll try to work on it...) $\endgroup$
    – lemon
    Feb 11, 2023 at 19:59
  • 1
    $\begingroup$ I think this is in some way related to this... blender.stackexchange.com/questions/285064/…... should be interesting to understand it deeply. $\endgroup$
    – lemon
    Feb 11, 2023 at 20:17
  • 2
    $\begingroup$ @vklidu small thing, .. it takes 2 Vectors-to-Eulers, as you show, to establish an orientation. But to avoid possible jumps / gimbal lock, I've found it's better to force the second Euler to spin around the axis you have already set. ( So in your case above - 1: Auto, 2: Z ) $\endgroup$
    – Robin Betts
    Feb 11, 2023 at 20:54

You must log in to answer this question.

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