Jump to content
garf

Randomize 'Class'

Recommended Posts

I've got a class prim attribute created by connectivity SOP - how can I randomize sort this value? i.e. like you would with a sort SOP

Share this post


Link to post
Share on other sites

promote class as max to detail and then a wrangle on prims does the trick for me - it's not random but it's shifted which is good enough for what i need

 

int max = detail(0, "maxclass", 0);

i@class+=chi("shift");

if (i@class>max){
    i@class-=max;
    }

Share this post


Link to post
Share on other sites

Another solution: connectivity node just uses prim numbers. So if you put down a Sort before Connectivity, you can randomize it.

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

×