Jump to content

Recommended Posts

Hello. I don't know Houdini very well yet, so I apologize if the answer seems obvious, but I haven't found any solutions on the forum pages or in any other sources.

A question about sorting. How can I sort the numbers of primitives sequentially? In order, say from the center.

 

prim1.thumb.jpg.ffb9202bb4f542ce47b2b7a3a8658609.jpg

 

If you use a node "Sort", he breaks out of the order.

 

prim4.thumb.jpg.7e97f97f3ce3af17085a43fdea865783.jpg

 

And another question is optional. Maybe there are some simple ways to dilute the order, making it a snake or chaotic?

This is just interesting, but first of all I am interested in the question of the center.

 

prim2.thumb.jpg.f5d44ce7ed85c167273e9afeb5fac980.jpg

 

If you can still catch the logic here. Take the ranges each 5. 5-9 15-19 and flip.

 

prim3.thumb.jpg.83dfed6292db4dee1544f53c2ef4bc45.jpg

 

Howewer here it is already difficult to understand the logic.

 

prim5.thumb.jpg.4eb0dd8a9c9de583c28a523c67646f78.jpg

 

But it would be great if there is a tool that can do this. I would be happy to hear your ideas and suggestions. At least which way to look.

 

Edited by PVok
Link to comment
Share on other sites

Hi,

for these kind of tasks you can use attributes, which can be stored in the geometry. The sort sop has the option "primitive sort" -> "by attribute". The result strongly depends on the attributes you set. In your case you can probably combine two attributes. The prim distance to the center prim (by point and not edge incidence) and the direction from the center. Here is an example using two different methods, to get the distance from the center (probably there are better ways), the other attribute uses the xyzdist() function to a circle. Once you have the attributes you can combine them by just adding them. Since the direction ist between 0 and 1, the distance attribute which is a count (0,1,2,...) will dominate.

prim_sort_spiral.hipnc

  • Thanks 2
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...