Creative COW SIGN IN :: SPONSORS :: ABOUT US :: CONTACT US
ADOBE AFTER EFFECTS: HomeForumBasicsExpressionsTutorialsPodcastsMotion GraphicsTrainingCinema 4DFAQ

Random for text Color

Cow Forums : Adobe After Effects Expressions

<< PREVIOUS THREAD   •   VIEW ALL THREADS   •   PRINT   •   NEXT THREAD >>
Random for text Color
by Daniel Goldman on Jul 3, 2009 at 1:18:33 pm

I was trying to add a random expression to fill RGB for a text. I tried random([0],[1],[2],[3])thinking it would work but I got an error. What did I do wrong. Random () goes between 0 and 1 which is what I need.Do I need to set up variables first?
Thank you

Respond to this post   •   Return to posts index

Re: Random for text Color
by Dan Ebberts on Jul 3, 2009 at 1:55:10 pm

This should do it:

random([1,1,1,1])

If you want it to hold the random color rather than change every frame you'd do this:

seedRandom(index,true);
random([1,1,1,1])


Dan



Respond to this post   •   Return to posts index

Re: Random for text Color
by Jean Pierre Biasiolo Mérchan on Jul 3, 2009 at 10:12:05 pm

Dan Ebberts I have used your code and have not had a result of random colors that I had to integrate the code

" seedRandom(index,true);
random([1,1,1,1]) " color purple

achievement but not change color random mind as time passes

You can combine this tag with an expression of time?

un saludo desde España Sevilla
greetings from Seville Spain

Respond to this post   •   Return to posts index


Re: Random for text Color
by Dan Ebberts on Jul 3, 2009 at 10:23:38 pm

Hmmmm.... I'd need a better description of how you want the colors to vary with time.

Dan



Respond to this post   •   Return to posts index

Re: Random for text Color
by JeanPierre Biasiolo Merchan on Jul 3, 2009 at 10:37:34 pm

Try to explain better my language is not English: P
and will write me very badly but I will try to do good :P
Example: let's say I create a text with a soft color, but I want to change his mind without stopping random color. I work for what could be done? and give thanks for advance;)

Adobe After Effects Animator

Respond to this post   •   Return to posts index

Re: Random for text Color
by Dan Ebberts on Jul 3, 2009 at 10:42:35 pm

I think we may need someone that knows both Spanish and English to jump in here.


Dan



Respond to this post   •   Return to posts index


Re: Random for text Color
by Darren Hardaway on Jul 6, 2009 at 5:41:20 am

I think hes looking for this dan, your random motion script rewritten for it to work on color:

segDur = .5;// duration of each "segment" of random motion
minVal = [0,0,0,1];
maxVal = [1,1,1,1];

seed = Math.floor(time/segDur);
segStart = seed*segDur;
seedRandom(seed,true);
startVal = random(minVal,maxVal);
seedRandom(seed+1,true);
endVal = random(minVal,maxVal);
ease(time,segStart,segStart + segDur, startVal, endVal);

BTW full kudos to Dan for writing the expression, I just changed two lines so it would affect color. Is this what you were looking for?



Respond to this post   •   Return to posts index

<< PREVIOUS THREAD   •   VIEW ALL THREADS   •   PRINT   •   NEXT THREAD >>


FORUMSTUTORIALSMAGAZINETRAININGVIDEOS - REELSPODCASTSEVENTSSERVICESNEWSLETTERNEWSBLOGS

© CreativeCOW.net All rights are reserved.

[Top]