FORUMS: list search recent posts

Expression to change lightness in HLS

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Kwaz Fraser
Expression to change lightness in HLS
on Jul 20, 2014 at 3:44:11 am

Hello Everyone

I'm attempting to change a solid's lightness value to 3 specific values randomly. These values are -50, 0, and 50. I'm using HLS to control the lightness but using the expression random(-50,0,50) isn't giving me the correct values. The values also change every frame when I would only like it to change every 4 frames. Can someone help please.


Return to posts index


Dan Ebberts
Re: Expression to change lightness in HLS
on Jul 20, 2014 at 6:09:08 am

This should give you one of those three values randomly, every four frames:

vals = [-50,0,50];
fr = 4; // change every four frames
seed = Math.floor(timeToFrames(time-inPoint)/fr);
seedRandom(seed,true);
vals[Math.floor(random(vals.length))];



Dan



Return to posts index

Kwaz Fraser
Re: Expression to change lightness in HLS
on Jul 20, 2014 at 6:02:56 pm

Thanks Big dog. #salute Dan


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]