Hi everyone,
I want to growth a line using the primuv and curveu of a spline.
It seems that the curveu attribute inside the “resamplenode” doesn't give the same result has this code inside wrangler:
f@curveu = @ptnum / float(npoints(0)-1);
If I want to delete point with the primuv function with the resample node, it seems that the primuv doesnt return the same value so some point will appear or disapear at the wrong time.
Is there something that I dont understand with that resample?
I attach a simple HIP version of my problem for clarity.
I know that it will work with a carve node but that is not my goal here.
thanks!
Resample node: Curveu is wrong?
2512 3 0- morneauju66
- Member
- 28 posts
- Joined: 4月 2017
- Offline
- jsmack
- Member
- 8043 posts
- Joined: 9月 2011
- Offline
curveu created by resampling a spline gives the parametric coordinates of the spline. If you want the normalized vertex index like in your wrangle, you can use a second resample that doesn't do any resampling.
I'm not sure what metric is used for the primuv() function, but might be different than the normalized vertex index.
I'm not sure what metric is used for the primuv() function, but might be different than the normalized vertex index.
- Aizatulin
- Member
- 495 posts
- Joined: 7月 2005
- Offline
Hi,
from what I understand is, that resampling is normalizing the speed of the curve (that means, that the speed will be constant at every point). On a resampled curve primuv() evaluates each point with @ptnum / (@numpt - 1) but this will not be necessarily the position for primuv() on the old (not resampled) curve. The curveu attribute represents the u-value of the old curve. You can compare the values using the xyzdist() function for the resampled/not resampled curve.
Check my attachement. There is a speed comparison between the resampled an the non resampled curve. You can see, that the green sphere is starting slow an is becoming faster, where the blue sphere has constant speed all the time.
from what I understand is, that resampling is normalizing the speed of the curve (that means, that the speed will be constant at every point). On a resampled curve primuv() evaluates each point with @ptnum / (@numpt - 1) but this will not be necessarily the position for primuv() on the old (not resampled) curve. The curveu attribute represents the u-value of the old curve. You can compare the values using the xyzdist() function for the resampled/not resampled curve.
Check my attachement. There is a speed comparison between the resampled an the non resampled curve. You can see, that the green sphere is starting slow an is becoming faster, where the blue sphere has constant speed all the time.
Edited by Aizatulin - 2019年6月26日 14:07:10
- morneauju66
- Member
- 28 posts
- Joined: 4月 2017
- Offline
-
- Quick Links