PDA

View Full Version : how to control random speed??


D4riel
03-08-2011, 02: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-08-2011, 02: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)

D4riel
03-08-2011, 05:23 PM
aaaa okkk o_O but how i make noise or others functions slow??????

Robert Bateman
03-08-2011, 05:45 PM
you don't. You slow time.

noise $timeValue;

ginodauri
03-08-2011, 05:56 PM
you can try something like this:

noise(noiseSpeed)*noiseScale

Example:

locator1.translateX=noise(time)*5

D4riel
03-08-2011, 05: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-09-2011, 09:58 AM
ooo :S so what you recommend for me

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

D4riel
03-09-2011, 01: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-09-2011, 01: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.