Polypath reparametrization

   1078   2   1
User Avatar
Member
143 posts
Joined: Sept. 2017
Offline
Hi,
I came across a curious problem today, which I wasn't able to solve yet, maybe someone here can help me.
I started with a few polypaths, that consisted of multiple line-segments of different lengths.
The desired effect was to use a Carve node to cut off a specific length of line off from both the start and end of each polypath.
To do so, I used a restlength attribute for each of each polypath to compute the U parameter position of the cut (the formula being (1/restlengt)*cutoff_length)
What I noticed was, that this caused the U parameter to travel random looking distances along the line segments, even moving along a polypath slower or faster depending on which line segment it was currently on.
Resampling the curve did help with this, but since I wanted to keep the sharp corners of my polypath, I turned on the “rebuild by edge segment” option and that seemed to have broken the reparametrization of the polypath again.

In short:
Is there a way to reparametrize a curve, so that the U parameter maps to the curve evenly by length without resampling it?

Thanks.
Cheers,
Ivan
Edited by ivanmalek - May 12, 2020 14:16:53
User Avatar
Member
21 posts
Joined: May 2015
Offline
Hi Ivan,

Have you found out a solution? I came across the same problem recently.

Shawn
User Avatar
Member
8551 posts
Joined: July 2007
Offline
you don't have to reparametrize the curve itself, just convert the u coordinate
you can use primuvconvert() [www.sidefx.com] in VEX to convert your u coordinate among different parametrizations for specific curve prim
Edited by tamte - Feb. 23, 2021 11:33:49
Tomas Slancik
FX Supervisor
Method Studios, NY
  • Quick Links