Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Collision sampleImage() – CS3?

  • Collision sampleImage() – CS3?

    Posted by Rafael on June 21, 2007 at 2:21 am

    I was wondering if with the new After Effects CS3 this would be possible.
    Few years ago I was trying to animate a layer with an alpha channel that would ‘interact’ with another layer such as bouncing each others.
    Let’s say the letter ‘T’ moves and hits the letter ‘A’, which bounces back as the letter ‘T’ keeps moving out of the screen.
    Back then, I was told that it was impossible. But what about today? Will the function “Collision sampleImage()” makes this possible? If so, how tricky that would be?

    Colin Braley replied 18 years, 11 months ago 3 Members · 3 Replies
  • 3 Replies
  • Dan Ebberts

    June 21, 2007 at 2:44 am

    sampleImage() makes it possible, but it would be like many other expression simulations in that on each frame you’d have to evaluate what had happened on all previous frames to know if a collision had occured at some time in the past and then calculate where the layers should be at the current frame based on the collision. I think it could quickly get out of hand if you had a lot of layers. It would be fun to try it though.

    Dan

  • Rafael

    June 21, 2007 at 3:39 pm

    A while back there was a script to either ‘magnet’ or ‘reject’ a layer from others. Could this be the script with ‘collision’? That would be cool!

  • Colin Braley

    June 21, 2007 at 5:53 pm

    Speaking of that magnet script you mentioned…I wrote a tutorial for it check it out here if you want:

    https://www.colinbraley.com/repel_expressions_tutorial.html

    It’s up on my new site which revolves around After Effects expressions/scripting, and some Maya scripting too. I still am working on a lot of things for the site, but check it out if you want.

    As for having layers collide like you said, this would be a VERY slow process, because on each frame you would have to recreate all the frames before it. Also, you would have to use sampleImage on all nearby layers, which would be slow too. I have done something similar in the past( without using sampleImage() ) just using colliding circles. I’ll see if I can dig it up and post it on my site in the next few days.

    ~Colin

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