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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×