4
$\begingroup$

enter image description here

Hello,

I am sure everyone did come to the issue when you need to change the starting point of curve and that tilts your whole curve and you need to fix everything.

The same of course happens when I trim curve inside geometry nodes.

But i do not want random tilting when i am trimming my curve.

One solution is to not trim it at all and just make it seems like you are trimming it by setting radius to 0 on some spots.

But as my curve is quiet difficult i can not let whole curve even with 0 scale be loaded.

So i tried to set normal to only Z but that makes wierd overrotations when the curve is probably facing Z.

So i tried to make the curve normal only Z just on that first point of curve. That does not work as the set curve normal works only for whole curve.

1) So my question is probably can someone come to a idea how could I negate the newly made rotation.*

2) Or if I can make guiding curve which would not have loaded that difficult mesh and somehow copy the tilt from this curve.*

I can not think of another type of a solution but if you find one i would love to try. I think this problem has many people but they are not trying to animate trimmed non circular shape curve with texture

here is file which has all of the distortion that will be aplied on the curve

Here is an example of a curve tilting as it is trimmed:

enter image description here

$\endgroup$
4
  • $\begingroup$ in your tree just use this: [1]: i.stack.imgur.com/dvIy6.png $\endgroup$
    – Chris
    Sep 6 at 16:23
  • $\begingroup$ pls stop writing in bold letters because this might be considered as rude or shouting, thx $\endgroup$
    – Chris
    Sep 6 at 16:23
  • $\begingroup$ oh i never though about bold text as shouting sory i tryed to just make it seen as i wrote bunch of not needed text.... $\endgroup$ Sep 6 at 16:27
  • $\begingroup$ the set curve normal to Z up makes unwanted 360 rotations when the curve is facing up. $\endgroup$ Sep 6 at 16:29

3 Answers 3

6
$\begingroup$

I may be out of my depth here, but isn't it enough to recalculate the tilt from Minimum Twist to Z-up space?

$\endgroup$
12
  • $\begingroup$ hello i could not make your solution work for me. So i uploaded my testing file for this problem into my question. You can try mabie i placed your nodes to bad place $\endgroup$ Sep 6 at 16:16
  • $\begingroup$ @DominikJiruše I don't see a problem i.imgur.com/a1aBdBh.gif $\endgroup$ Sep 6 at 16:29
  • $\begingroup$ I am so sory i left there resample curve after your nodes.... thaaaaanks sooo much thanks thanks thansk It works perfectly it does not even do that wierd rotations which just set Normal Z Up does... I would love to understand it more how does it works because it does not even changes anything and the trim is just behind your nodes nothing behind trim. Thanks a lot again $\endgroup$ Sep 6 at 16:42
  • $\begingroup$ @DominikJiruše first I resample the curve because if it's the default bezier (in my case), there's only two points to save the data on, and no control on the intermediary interpolation. So I evaluate the curve into a poly curve, based on the bezier settings. Then I set the minimum twist, though this could be set in the curve settings… I save the normal, switch to z-up mode and compare normals - nodes below calculate the signed angle. Then I add to the existing tilt this angle. Since z-up works locally, changing the curve doesn't modify the normal. $\endgroup$ Sep 6 at 17:06
  • $\begingroup$ it works really nice there is just one think but I can be without that... Now i can not shrink the curve radius based on the trimmed cruve... because the trim curve needs to be the last last thing just before creating the mesh... imgur.com/a/2rbztIV $\endgroup$ Sep 6 at 17:14
4
$\begingroup$

maybe you wanna try this node tree?

enter image description here

result:

enter image description here

$\endgroup$
4
  • $\begingroup$ Hello, Just deleting created geometry would slow down the computing a lot when that curve would be long. because the mesh would be created and than deleted a lot of computing when a lot of mesh is created. But thanks $\endgroup$ Sep 6 at 16:47
  • $\begingroup$ The deleting approach is less accurate, but I would never bet against it in regards to performance… $\endgroup$ Sep 6 at 17:00
  • $\begingroup$ really ? for me it does not makes sense as all of the mesh needs to be created and than deleted... in case of triming just the curve no extra mesh is created... When i tried the radius to 0 it was really bad for my computing time every time i changed the spot where is the radius set more than 0 $\endgroup$ Sep 6 at 17:16
  • $\begingroup$ @DominikJiruše whoops! I didn't look that it deletes the mesh, I thought it deletes the curve points :D Well you're right then, it's probably slower. $\endgroup$ Sep 6 at 18:20
0
$\begingroup$

before the trim:

  • first capture the normal [before the trim curve],

after the trim:

  • use this setup enter image description here Ignore the vector rotate

    • Use the normal (regular normal node) as the current direction

    • Use the curve tangent as the axis

      There is no need to normalize (since the tangent is already normalized)

    • and use the captured normal as the desired direction.

  • then use the angle as the new tilt [in a set curve tilt node].

$\endgroup$

You must log in to answer this question.

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