Hey there
Currently, I have this for each loop set up with a switch. This is taking the pieces from a voronoi fracture and breaking a random selection of them again, bu running them though a second voronoi.
This is the expression I am currently using on the switch
rand(detail(“../foreach_begin1_metadata1/”,“iteration”,0)) > 0.6
As I understand it this is going to affect %60 of the pieces.
What I want to do is to have a third input on the switch that is coming from another voronoi fracture. My goal is to end up with three different sizes of fractured pieces.
So I am trying to find an expression that will allow me to control how many pieces go though each input, in a similar way to the one above.
Three way switch expression
2325 3 1-
- MostlyBees
- Member
- 9 posts
- Joined: Sept. 2018
- Offline
-
- Enivob
- Member
- 2451 posts
- Joined: June 2008
- Offline
-
- MostlyBees
- Member
- 9 posts
- Joined: Sept. 2018
- Offline
-
- Enivob
- Member
- 2451 posts
- Joined: June 2008
- Offline
Sure, just add weights to your random switch index result.
Make up any logic you like that produces a final integer output value of 0,1, or 2.
if (i@switch_index==1 && rand(@ptnum+801)>0.5){i@switch_index=2;}
// Always first switch for the first two seconds. if (@Frame<48){i@switch_index = 0;}
Edited by Enivob - Oct. 8, 2020 09:36:45
Using Houdini Indie 19.5.
Ubuntu 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
Ubuntu 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
-
- Quick Links