Sorting primitives

   1335   3   0
User Avatar
Member
23 posts
Joined: 3月 2014
Offline
I have a multi line text object (coming from an eps) that i'm doing some vdb processing on. My aim is to export it to maya where each of the letters is disconnected. I'm using a connectivity node and have a primitive path attribute that I'm sending down to my alembic rop.

This all works but my attribute string (called "letter") is assigned randomly to each disconnected object, so when I get the geometry into maya I get polysurface1 through 20 but the first letter of my word is number 7 and the last one is number 1. I was thinking of using the sort node to fix this but I'm not sure how to configure it in order to get any sorting to happen on the primitive numbers.

Can anyone point me in the right direction?
User Avatar
Member
144 posts
Joined: 8月 2012
Offline
You could sort by position - first sort by X, then save the primnum to an attribute, then sort by Y, save primnum to another attribute, and combining the two attributes to get a final attribute value that you can Sort by attribute.
User Avatar
Member
23 posts
Joined: 3月 2014
Offline
Jikian
You could sort by position - first sort by X, then save the primnum to an attribute, then sort by Y, save primnum to another attribute, and combining the two attributes to get a final attribute value that you can Sort by attribute.
IS there anything special I need to do to actually make the sort node work with primitive attributes? It seems that any sort I do does not actually change the primitive numbers in the spreadsheet.
User Avatar
Member
252 posts
Joined: 1月 2008
Offline
Sorry if I missunderstand.
The sort node sorts the primitive attribute order. You probably want to sort it by axis.
The spreadsheet is by default sorted by primitive number so you will not see any difference unless you have other attributes on there.

Turn on the viewport primnum display and turn the node on/off.

Attachments:
sort.png (61.6 KB)

  • Quick Links