RTHMan Posted August 14, 2023 Share Posted August 14, 2023 How can I create a node for probability masking like the screenshot? Quote Link to comment Share on other sites More sharing options...
hannes603 Posted August 14, 2023 Share Posted August 14, 2023 attrib paint ? Quote Link to comment Share on other sites More sharing options...
Librarian Posted August 14, 2023 Share Posted August 14, 2023 @RTHMan find those Code's in Fee Lib #if 0 #include <mathdeep.vfl> #else function int sample_pdf( float pdf[]; float uniform_rand; ) { float cdf[]= create_cdf(pdf); return sample_cdf(cdf, uniform_rand); } function float random_uniform( float seed; int offset; int core; ) { if ( core == -1 ) { return offset; } else if ( core == 0 ) { return random(seed, offset); } else if ( core == 1 ) { return random_brj(seed, offset); } else if ( core == 2 ) { return random_sobol(seed, offset); } else { return -1; } } #endif int classes = (chi("../autoClasses") ? chi("numclasses") : chi("../classes")) - 1; float pdf[]; resize(pdf, classes); for (int i = classes; i > -1; --i) { pdf[i] = chf("../possibility" + itoa(i+1)); } i@varient = sample_pdf(pdf, select(chi("../randtype"), random_uniform(chf('../seed'), @ptnum, chi("../randtype")-1), @ptnum/(@numpt-0.99999))); //float cdf[]= create_cdf(pdf); //create_pdf_fee(); //i@varient = sample_pdf(pdf, chf('a')); Quote Link to comment Share on other sites More sharing options...
RTHMan Posted August 14, 2023 Author Share Posted August 14, 2023 In VEX? Quote Link to comment Share on other sites More sharing options...
Librarian Posted August 14, 2023 Share Posted August 14, 2023 @RTHMan Yes find FeELib-for-Houdini on github you have example How to use on variant by id Quote Link to comment Share on other sites More sharing options...
RTHMan Posted August 14, 2023 Author Share Posted August 14, 2023 I'm having a hard time finding the code in FeELib-for-Houdini. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.