Group sop question.

   1499   1   1
User Avatar
3 posts
Joined: 12月 2016
I'm trying to follow along with a tutorial but am stuck.
The tutorial is from v13 and I'm using v16.
How do I generate a random ranged whole value in the “Base Group” field?
The effect based on the random value generated between these two numbers a sphere will go to those points.
The second group will have a different set of ranged values.

This is my first week in Houdini.

ranged_value_setup.png (3.3 MB)

Indie v18
Windows 10
16 core 3.5ghz
User Avatar
1743 posts
Joined: 3月 2012
The old Group SOP functionality was split into a few separate SOPs in Houdini 16.0. The new Group Expression SOP lets you type a VEX expression (VEXpression) to evaluate on each point/primitive, and if the integer value is non-zero, the point/prim will be included in the group, else it will be excluded. You can do something like:

rand(@ptnum) < 0.5

to randomly select around half of the points. This is similar to the previous rand($PT) < 0.5in HScript. If you need the exact same random numbers as HScript in VEX, you can use the hscript_randVEX function instead of rand. Hopefully that helps!
Neil Dickson - Writing code for fun and profit since… 2005? Wow, I'm getting old. []
  • Quick Links