Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Write-on and RGB/HSL manipulation

  • Write-on and RGB/HSL manipulation

    Posted by Mike Abbott on September 26, 2015 at 12:13 pm

    Greetings all. I think it may be the first time I’ve posted to this forum.

    I’ve got a simple expression that seems to work as I want it to – but I’m scratching my head on a number it seems to be generating… and I’d like to understand why…

    File attached:
    9294_mdawriteontest01.aep.zip

    Summary of file:
    write-on effect with the ‘paint time property’ set to colour.
    Colour is converted from rgb to hsl
    A slider input (0 to 360 divied by 360) is added to the hue value in the hsl array.
    Colour is converted from hsl to rgb.

    The slider value is keyframed 0 to 360 over time to give colour variation at the start of the stroke. The starting colour is pure red (255,0,0).

    You’ll see in the file I have a text debugging layer with the same code in it apart from the final hsl to rgb conversion.

    What’s confusing me is the text debug array shows the first element value going from 0 to 2 – not 0 to 1 as I would expect.

    Why?
    (I have a feeling it will be something totally obvious 😉

    Mike Abbott replied 10 years, 11 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    September 26, 2015 at 10:54 pm

    The confusion may stem from the fact that the Color expression is using the Color’s pre-expression hue value, but your text layer is using the post-expression value and then adding the normalized slider value to that, which in effect, doubles the actual value.

    That’s the way it works–an expression can only access the pre-expression value of its host property, and can only access the post-expression value of any other property.

    Dan

  • Mike Abbott

    September 27, 2015 at 2:57 pm

    Thanks Dan – yes, that makes perfect sense.

    mikeabbott.info
    vantagegraphics.co.uk

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy