Jump to content

Sort Primitives specific control


Recommended Posts

I was meaning using Attribute Promote :

UVProject, vertices and polar mode

UV Transform to center your UVs on the primitve you want as center (prim 0)

Attribute Promote from original class Vertex to New class Primitive, with Promotion method = Average

Then Primitive Wrangle as explained above :

@uv.z = 0;
f@radial = atan2(@uv.x, @uv.y);
f@dist = length(@uv);

@sort = @dist + @radial * 0.01;

Sort node, Primitive, By Attribute, put sort as attribute.

I tried but not convinced by the result so far :-) But check if that's fine for you... I think you'll have to work on a sort attribute made with a wrangle node setup on Detail (run once) and "navigate" your geometry in an intelligent way... (I did something once to determine symetrical topology :

 

Maybe you can do something similar to "sort" your primitives by navigating in spiral around a point : you start at point 0, then finds all primitives to whom this point belong to, you "sort" them by incrementing a sort variable, once all have this attribute value, you find the adjacent primitves starting by the first allocated, and "sort" them, etc. until you "visited" all primitives (so you'll need an array storing all prim number of visitited primitives). I think that's not to hard, but maybe long to write :-)

Link to comment
Share on other sites

Quote

Maybe you can do something similar to "sort" your primitives by navigating in spiral around a point : you start at point 0, then finds all primitives to whom this point belong to, you "sort" them by incrementing a sort variable, once all have this attribute value, you find the adjacent primitves starting by the first allocated, and "sort" them, etc. until you "visited" all primitives (so you'll need an array storing all prim number of visitited primitives). I think that's not to hard, but maybe long to write :-)

I was thinking about something similar but how do I associate which primitives the point belongs too ? Although I was thinking picking a primitive using that as 0 then it spirals out organized as; 1,2,3,4 etc.

Unless I find the nearest primitive of the next primitive and so that sorts the primitive in a organized number method (1,2,3,4 etc).

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...