#1
Posted 24 April 2012 - 10:29 PM
So the setup is I have a user data of a integer for my random seed and then just a boolean that when it is checked it just go to a random position between like (-100 to 100 in the x and y) based on the seed.
Pretty sure this is possible but I'm not sure how to come up with the random position.
I'm guessing it is just a node that I have never used. Anyways hopefully this is pretty simple for someone to answer for me. Thanks!
#2
Posted 25 April 2012 - 06:55 AM
If it's once you should just make a quick python script that will perform the action each time the button is pressed.
And if you want it once per frame do you want it jittery or smooth?
If you want it smooth, you can use the Vibrate Tag or my CS_Vibrate. If you want it completely random, I would just use the random functions in Python in a Python tag. That will be way quicker and easier than Xpresso I think. You can look up the random functions in python by just typing Python and random and you should see the Python docs on random.
#3
Posted 25 April 2012 - 10:52 AM
Do you want it to change per frame? or just once?
If it's once you should just make a quick python script that will perform the action each time the button is pressed.
And if you want it once per frame do you want it jittery or smooth?
If you want it smooth, you can use the Vibrate Tag or my CS_Vibrate. If you want it completely random, I would just use the random functions in Python in a Python tag. That will be way quicker and easier than Xpresso I think. You can look up the random functions in python by just typing Python and random and you should see the Python docs on random.
I was looking to have it just change once. I'll do some searching for a python script and hopefully find something. Thanks!
#4
Posted 29 April 2012 - 08:15 AM
Blog : www.motionzickness.wordpress.com
#5
Posted 29 April 2012 - 08:23 AM
I was looking to have it just change once. I'll do some searching for a python script and hopefully find something. Thanks!
Xpresso is always an expression that is called every cycle. Again if you do a python script, it happens once per button press which is what you want.
Here is the elegant and simple 'random' function in Python:
random.random()¶
Return the next random floating point number in the range [0.0, 1.0)
#6
Posted 10 May 2012 - 06:21 AM
http://zabiegly.de/xpresso/index.html
cheers
Tim
Also tagged with one or more of these keywords: xpresso, c4d, cinema 4d
Motion Graphics →
Jobs →
Full time Mid-Weight Motion Graphics Designer LondonStarted by Potion Pictures, 15 May 2013 |
|
|
||
Motion Graphics →
MoGraph Central →
Monoflop NodeStarted by Mograph Candy, 14 May 2013 |
|
|
||
Motion Graphics →
MoGraph Central →
creating random motion and rotation within a group of cloned objects cinema4dStarted by annalord, 08 May 2013 |
|
|
||
Motion Graphics →
MoGraph Central →
creating random motion and rotation within a group of cloned objectsStarted by annalord, 08 May 2013 |
|
|
||
Motion Graphics →
Showcase →
My JOB, Motion & Graphic DesignerStarted by Poutshi, 06 May 2013 |
|
|
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users










