Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Doing a simple ‘Divide’ in After Effects

  • Doing a simple ‘Divide’ in After Effects

    Posted by Erik on May 31, 2005 at 12:53 am

    Does anyone know of a way to acheive a simple ‘divide’ operation in AE? I.e. to divide the values in one layer by the values of another, much like the ‘multiply’ transfer mode – but opposite.

    I come from a Shake background where this is encapsulated into one node called ‘iDiv’.

    Thanks

    Erik

    Ben Rollason replied 17 years, 3 months ago 3 Members · 4 Replies
  • 4 Replies
  • Filip Vandueren

    May 31, 2005 at 2:33 am

    I’m not sure if “compound arithmetic” or “aritmetic” could help you.
    Not sure what the final result looks like

  • Erik

    May 31, 2005 at 6:28 pm

    In one sense screen is the opposite of multiply, in that multiply is:

    imageX * imageY

    and screen is:

    1 – (1-imageX) * (1-imageY)
    in other the words the invert of two inverted images – multiplied.

    What I’m looking for is a super simple:

    imageX / imageY

    The grand purpose here, if anyone is interested, is to recreate existing tranfer modes (such as color dodge, etc) with simple math ops so that can be used under eLin. Without that basic building block of a divide function this is hard to do.

    And thanks for pointing me towards calculations and arithmetic – but unfortunately, neither offer divide.

    Erik

  • Filip Vandueren

    May 31, 2005 at 11:41 pm

    Right,

    since x / y = x * (1 / y)

    you can multiply two images, if you ‘invert’ the second.
    Now invert does not mean just “channel -> invert” (255 – brightness)
    but 255 / brightness

    You can do this using a Curve
    I suggest using Color Finesse, it has a better interface for finetuning and a more logical interpolation between curve-points

    Just make a curve with these values:

    input / output:

    1 – 255
    2 – 128
    4 – 64
    8 – 32
    16 – 16
    32 – 8
    64 – 4
    86 – 3
    128 – 2
    255 – 1

    Is that what you mean ?

    I’ve tried it and can’t seem to find a use for this: it returns a Lot of dark values

  • Ben Rollason

    May 26, 2009 at 11:16 am

    Hi There….

    Only about 4 years too late, but if you’re listening, here’s a couple of things that approximate Shake’s mDiv function… you should be able to work backwards from there with a bit of channel juggling, I think.

    The method that ought to work, but doesn’t really seem to is using Channel Combiner…
    set ‘From’ to Straight to Premultiplied, check ‘invert’ and ‘Solid Alpha’.

    This is a little unsatisfactory, in that when you then set the track matte to the alpha of an original copy of the image, it doesn’t look quite like the original copy… i.e. it’s not the opposite math of the premultiply that the track matte is doing…

    This version is simpler and seems to work better. Put a Channels-> Set Channels effect on and set the ‘Set Alpha To Source’ to ‘Full’. This appears to perform a matte divide and when I perform the above check, it looks exactly as it should.

    Hope that helps.

    Ben.

    http://www.benrollason.com

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