blur959 Posted July 27, 2011 Share Posted July 27, 2011 Hi all, I am trying to rotate a bunch of primitives with a rand expression under the rotate channel. But the result is that all the rotations of the primitives look somewhat similar. Am I doing it the right way? I am looking for a random(different) rotation for each primitive. All help provided is very much appreciated. The node that controls the rotation is colored yellow. ripple_inPops_testing_v009.hipnc Quote Link to comment Share on other sites More sharing options...
3dbeing Posted July 27, 2011 Share Posted July 27, 2011 Hi all, I am trying to rotate a bunch of primitives with a rand expression under the rotate channel. But the result is that all the rotations of the primitives look somewhat similar. Am I doing it the right way? I am looking for a random(different) rotation for each primitive. All help provided is very much appreciated. The node that controls the rotation is colored yellow. The rand function is only going to give you a 0-1 value, in degrees this is quite small. Try: fit01(rand($PR+seed),-180,180) 1 Quote Link to comment Share on other sites More sharing options...
blur959 Posted July 27, 2011 Author Share Posted July 27, 2011 The rand function is only going to give you a 0-1 value, in degrees this is quite small. Try: fit01(rand($PR+seed),-180,180) Thank you, the problem is solved. Quote Link to comment Share on other sites More sharing options...
Adam Ferestad Posted July 31, 2011 Share Posted July 31, 2011 You can also achieve the same thing using rand($PR+seed)*360-180. The fit gives some features, but the math approach can give you some interesting controls if you know how to manipulate it. Quote Link to comment Share on other sites More sharing options...
3dbeing Posted July 31, 2011 Share Posted July 31, 2011 You can also achieve the same thing using rand($PR+seed)*360-180. The fit gives some features, but the math approach can give you some interesting controls if you know how to manipulate it. I'm curious, what is the difference? Quote Link to comment Share on other sites More sharing options...
Adam Ferestad Posted August 1, 2011 Share Posted August 1, 2011 Between those two, nothing. But if you use something like e^(-Rand()^2)*360 you can get a more controlled distribution of the rotations. That particular function will give you lots of low rotations and some very large ones. It is very similar to the standard bell curve. Actually, if you replace Rand()^2 with (Rand()*2-1)^2 you will get the full bell curve for your distribution. The two methods that were looked at earlier will have the exact same effect though. I like to try to do things with math when I can because I can manipulate it easier to control and introduce less randomness to the random function. I know that seems a little counter intuitive, but being able to have a broad control over a random feature can be very powerful. Quote Link to comment Share on other sites More sharing options...
edward Posted August 1, 2011 Share Posted August 1, 2011 But your bell curve will still need to fit to the desired rotation range at the end of the day, meaning fit01() (or fit) is still the easier thing to write and comprehend. Quote Link to comment Share on other sites More sharing options...
Adam Ferestad Posted August 1, 2011 Share Posted August 1, 2011 True, a fit would be useful for making it a little cleaner, but that is only a composite of our points. Being able to do the math to work with the random function would still be nice for various reasons, that was my point. Quote Link to comment Share on other sites More sharing options...
3dbeing Posted August 3, 2011 Share Posted August 3, 2011 (edited) my work mate pointed something interesting out Rand()*2-1 and fit01(rand(),-1,1) yield identical results, so I guess really it's just a matter of prefference. For me the fit function pretty much tells the story at a glance; ie: It's intention is obvious...nice if someone else has to pick up your scene. While complex math formulas can become neccessary, i think it's best to go with the simplest of solutions if given the option... Occam's razor razor and all... o_0 Edited August 3, 2011 by 3dbeing 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.