View Full Version : how to control random speed??

03 March 2011, 03:18 PM
heyy i 'm leaning about mel jejej and i'm using rand function but when i use this, this is too fastt i would like to slow the random speed o_O now i'm try with simple test

pShere1.translateZ = rand (0,20);

this is veryy happend soo fastt soo how i slow the speed of this random ??

sorry the english :P

Robert Bateman
03 March 2011, 03:35 PM
You can't really. It's a random non-deterministic function. As soon as you want to impose restrictions on it (such as making the change slower), alarms bells should sound that rand() probably isn't suitable.

You might find that using a ramp, noise or turbulence function gives much better results, which have some coherence between the values, and are deterministic (gives predictable results)

03 March 2011, 06:23 PM
aaaa okkk o_O but how i make noise or others functions slow??????

Robert Bateman
03 March 2011, 06:45 PM
you don't. You slow time.

noise $timeValue;

03 March 2011, 06:56 PM
you can try something like this:




03 March 2011, 06:59 PM
ooo :S so what you recommend for me, i want to make the object random position but with smooth transition between each position .......

Robert Bateman
03 March 2011, 10:58 AM
ooo :S so what you recommend for me

Exactly the same thing that has just been suggested in each reply?

03 March 2011, 02:32 PM
aa FULL thXx Robert Bateman and ginodauri veryy usefull you recommend :D jajaja i will continue studing MEL jajaja is soo amazing the things that you can make with MEL and others scripts FULL thanks : ) :applause:

CGTalk Moderation
03 March 2011, 02:32 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.