Force number of points on curve

   8064   8   1
User Avatar
Member
861 posts
Joined: Oct. 2008
Offline
I have a nurbs curve that changes its number of points from frame to frame. Can I force a curve to have a specific number of points (after the animation)?
--
Jobless
User Avatar
Member
665 posts
Joined: July 2005
Offline
Try using Re-Sample… I can't guarantee success, but it's a good place to start!
User Avatar
Member
861 posts
Joined: Oct. 2008
Offline
Cool, thanks. With a simple expression and a sort it works.
--
Jobless
User Avatar
Member
345 posts
Joined:
Offline
Resampling nurbs curves this way converts them to polygons. Refine (unrefine) sop is the different approach, but I still have no clue how to determined exact number of points there.
User Avatar
Member
861 posts
Joined: Oct. 2008
Offline
kuba
Resampling nurbs curves this way converts them to polygons. Refine (unrefine) sop is the different approach, but I still have no clue how to determined exact number of points there.

I don't have H here now but if I remember correctly: append refine SOP and then set first u point to 0, and second to 1 (beginning and end). You should be able to work out how the total point numbers are related to subdivision. I think it was points = npt + (u-2) or something like that. You set p to a value that is 2 higher than the maximum you'll ever get in your curve, solve the equation accordingly, and that way you'll always retain the same number of points.
--
Jobless
User Avatar
Member
345 posts
Joined:
Offline
Thanks for the tip. Unfortunately you can only Refine it (increasing number of points). If I need to rebuild Nurbs curve by decreasing the number - Resample SOP is the only way to go. Unfortunatelly Unrefine can't be set up to control final number of points.
In the end maybe Resample SOP is the best way for that since it evenly distributes points on the curve… and you anyway tweak the final shape afterwords.

Cheers,
Kuba
User Avatar
Member
861 posts
Joined: Oct. 2008
Offline
I'm wondering if this may be a case for Python.

I know we can make NURBS curves from points. I assume we can delete, but refine and such? Perhaps a greater mind than mine (hello Graham!) knows if this could be scripted.
--
Jobless
User Avatar
Member
678 posts
Joined: July 2005
Offline
Try maybe this:

User Avatar
Member
8597 posts
Joined: July 2007
Offline
what about using
Resample SOP followed by Fit SOP (interpolation method) ?
Tomas Slancik
FX Supervisor
Method Studios, NY
  • Quick Links