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.
Group sop question.
4337 1 1- kamaur01
- Member
- 3 posts
- Joined: 12月 2016
- Offline
- neil_math_comp
- Member
- 1743 posts
- Joined: 3月 2012
- Offline
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:
to randomly select around half of the points. This is similar to the previous
rand(@ptnum) < 0.5
to randomly select around half of the points. This is similar to the previous
rand($PT) < 0.5
in HScript. If you need the exact same random numbers as HScript in VEX, you can use the hscript_rand
VEX function instead of rand
. Hopefully that helps!
Writing code for fun and profit since... 2005? Wow, I'm getting old.
https://www.youtube.com/channel/UC_HFmdvpe9U2G3OMNViKMEQ [www.youtube.com]
https://www.youtube.com/channel/UC_HFmdvpe9U2G3OMNViKMEQ [www.youtube.com]
-
- Quick Links