Macha Posted November 30, 2011 Share Posted November 30, 2011 (edited) Does anyone know of an easy way to get random numbers (in vopsop preferably) from a probability distribution? Ideally I'd like to draw a curve in an editor, or use a ramp, and sample from it. I've kind of come up with a solution where I create a bunch of points, ramp a color (say red) and then randomly (constant distribution) sample from this with the color representing the probability. It works but there should be a prettier way of doing this. Edited November 30, 2011 by Macha Quote Link to comment Share on other sites More sharing options...
3dbeing Posted November 30, 2011 Share Posted November 30, 2011 I'm not sure that I understand correctly; but to discretely control the values of my random numbers I usually assign standard 0-1 rand, then create an animation curve from frames 0-100, create a new attr that refs both the randAttr and AnimChan - chf(animChan,randAttr*100) this gives a lot more control than a ramp, as you can adjust the bezier handles to really get the distribution you are looking for... -=3db Quote Link to comment Share on other sites More sharing options...
Macha Posted December 1, 2011 Author Share Posted December 1, 2011 (edited) Hmmmmmm, I think what you do is a similar idea but with a subtle difference. I think you don't change the distribution density but clip it away whereas the method I use makes the distribution denser where the area under the curve would be bigger. I wish I could post a file! Edited December 1, 2011 by Macha Quote Link to comment Share on other sites More sharing options...
3dbeing Posted December 2, 2011 Share Posted December 2, 2011 On 12/1/2011 at 10:54 PM, Macha said: Hmmmmmm, I think what you do is a similar idea but with a subtle difference. I think you don't change the distribution density but clip it away whereas the method I use makes the distribution denser where the area under the curve would be bigger. I wish I could post a file! It's not really a clip as much as it is a LUT, but yeah I'm not really sure what you are getting at, cuz on the scatter sop you can scatter bassed on an alternate atribute which determines the probability/density... Alternativiely you can scatter in a volume where desnity=probability.. Quote Link to comment Share on other sites More sharing options...
matt Posted July 3, 2014 Share Posted July 3, 2014 Digging up an old thread here, this may be of interest http://mattebb.com/weblog/weighted-randomness-in-vex/ 1 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.