Sorting primitives problem

   957   1   0
User Avatar
Member
1 posts
Joined: Jan. 2017
Offline
Hi all, i'm trying to sort my object primitives accordingly but no matter what I do, the corner faces of my object get sorted after the faces.
What am I doing wrong?

Attachments:
SortingProblem.png (685.9 KB)
SortingProblem.hipnc (157.9 KB)

User Avatar
Member
475 posts
Joined: July 2005
Offline
Hi,

the reason is, that you have merged the corner prims into the box after you created it. If you change the input order of the merge node, you can see that the corner prims will be added first. If you want to change this, you have to change the combo box input of the sort node (primitive sort) to something else (for example by Y). The advantage is, that you can use prim attributes aswell (which has to be defined before) to gain more control of the sorting order. For example you can use a combination of the y value and the angle in the x-z plane (which can be obtained by the shortest distance function xyzdist to a circle).

Attachments:
SortingProblemX.hipnc (167.0 KB)

  • Quick Links