Fixing Point Sort Procedurally

   1672   5   0
User Avatar
Member
132 posts
Joined: Sept. 2018
Offline
I have a bunch of curves that go different directions. However some of the points are out of order. Is there a way to fix the point sort procedurally?

Attachments:
Fixing port sort procedurally.PNG (5.9 KB)

User Avatar
Member
8833 posts
Joined: July 2007
Offline
If your screenshot represents a single curve try Sort SOP/By Vertex Order
Which will order points the same way as vertices within the prim

If the screenshot is 3 curves then what sort of order do you imagine?
Edited by tamte - Jan. 3, 2024 16:04:11
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
132 posts
Joined: Sept. 2018
Offline
Yeah I tried point sorting by vertex order and it works for some curves and not for others for whatever reason. Doesn't work for this particular one in the screen shot. If I were to sort by the X direction obviously that would work but wouldn't for curves that go many other different directions.

From left to right in this case for this curve I want 0,1,2,3 and or 3,2,1,0 to be the point order.
Edited by VGriffith - Jan. 3, 2024 16:21:25
User Avatar
Member
100 posts
Joined: Jan. 2015
Offline
You might have to use a polypath to combine all the primitives together into a single curve primitive before the vertex sorting.
Gameloft
User Avatar
Member
8 posts
Joined: Sept. 2015
Offline
have you try with sort by att and by using uv ?
Edited by emouillet - Jan. 3, 2024 16:58:09

Attachments:
uv_sort.hiplc (222.8 KB)

User Avatar
Member
1 posts
Joined: Feb. 2017
Offline
If anybody is in need of this here's my HDA i always use for that. Would propably do it a bit simpler now but hey it works

Attachments:
sort_curve_points.hda (23.3 KB)

  • Quick Links