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
Polypath reparametrization
1053 2 1- ivanmalek
- Member
- 143 posts
- Joined: 9月 2017
- Offline
- NMVHS
- Member
- 21 posts
- Joined: 5月 2015
- Offline
- tamte
- Member
- 8449 posts
- Joined: 7月 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
you can use primuvconvert() [www.sidefx.com] in VEX to convert your u coordinate among different parametrizations for specific curve prim
Edited by tamte - 2021年2月23日 11:33:49
Tomas Slancik
FX Supervisor
Method Studios, NY
FX Supervisor
Method Studios, NY
-
- Quick Links