0
$\begingroup$

I have a list of splines created using a loop, how can a I turn each one into a 2d spline using animation nodes?

It is important to note I just have the spline there is no no spline object output.

enter image description here

$\endgroup$
1
$\begingroup$

The dimensions is a property of the Curve Data Block not the splines themselves, thus there is no distinction between 2D and 3D for splines.

A 2D curve just ignores the z axis of the spline points and also ignores the tilt and radius of the splines, so you may do that manually if that is your objective.

$\endgroup$
  • $\begingroup$ Ok that makes sense. My question is realated to the one answered here [link] (blender.stackexchange.com/questions/139150/…). Deforming geometry with splines can get complicated when it is done in 3d space as it considers the tilt of the curve for deformations. I would like to use the same technique from the link above but without any tilt, same thing that was answered [here] (blender.stackexchange.com/questions/114469/…) but with no modifiers. $\endgroup$ – Juan Manuel Lynch Jun 3 at 14:34
  • $\begingroup$ @JuanManuelLynch I see, in which case, you can just ignore the tilt directly instead of editing the splines. In my answer, you see that we compute the cross product between the tangent and the normal, you can just ignore the normal and compute it yourself. The normal in this case will be the vector perpendicular to the tangent, which is easy to get in 2D. Let me know if you want more details. $\endgroup$ – Omar Emara Jun 3 at 14:53
  • $\begingroup$ yes please... I've tried myself to find this perpendicular vector but seems my basic math is not up to the task. $\endgroup$ – Juan Manuel Lynch Jun 3 at 21:49
  • $\begingroup$ @JuanManuelLynch Feel free to ask a separate question for that then. Maybe titled "Compute the normal of a 2D spline" or something like that. $\endgroup$ – Omar Emara Jun 4 at 8:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.