Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects No loops but I get timeout while waiting for the engine

  • No loops but I get timeout while waiting for the engine

    Posted by Jerry Witt on June 18, 2012 at 6:59 pm

    I have, what I think is, fairly simple expression code attached to a light in my comp. It is designed to drive the intensity of a light based on the muzzle flashes of a layer.

    multiplier = 800;
    driverLayer = thisComp.layer("HDfootage.mov 2");
    samplePoint = [400,700];
    sampleSize = [780,720];
    lightnessSample = driverLayer.sampleImage(samplePoint,sampleSize);
    driverLightness = rgbToHsl(lightnessSample)[2];
    thisComp.layer("Light 2").Intensity = driverLightness * multiplier;

    When I step through my footage I see the intensity of the light is changing based on the flashes (20% to !40%). However, every time I render this comp I get an error ” timeout while waiting for the engine”

    Why? I have no loops. I cannot see where I am going wrong.

    Jerry Witt replied 13 years, 10 months ago 2 Members · 4 Replies
  • 4 Replies
  • Darby Edelen

    June 18, 2012 at 8:29 pm

    Your sample size for the sampleImage() function is pretty large. That may have something to do with it. Also the first part of the last line of your expression is bad practice, instead I’d recommend just using:

    driverLightness * multiplier;

    Try baking the expression before rendering and see if that helps. Select the light’s intensity and go to Animation > Keyframe Assistant > Convert Expression to Keyframes. It may take a while to calculate the frames with the sample size you’ve chosen, but be patient and you should get a good result. This will also allow you to use Render Multiple Frames Simultaneously, which is usually disabled when using the sampleImage() function.

    If you’re still experiencing an error with the baked expression then the problem lies elsewhere.

    Darby Edelen

  • Jerry Witt

    June 18, 2012 at 9:43 pm

    Thanks for the reply Darby. Those were all great ideas. It made me realize that I was also sampling off the edge of the image. (Maybe that makes a difference?) So I implemented the changes you recommended and came up with this:

    multiplier = 800;
    driverLayer = thisComp.layer("HDsource.mov 2");
    samplePoint = [500,900];
    sampleSize = [400,400];
    lightnessSample = driverLayer.sampleImage(samplePoint,sampleSize);
    driverLightness = rgbToHsl(lightnessSample)[2];
    driverLightness * multiplier;

    When I went to bake the expression it processed for about 20 seconds and threw the same error. I then lowered this:
    sampleSize = [200,200];

    I moved to a few frames and saw that it was giving me something close to the results I wanted. When I jumped to the 5th frame I got the same error: “Timeout while waiting for the engine. Expression disabled”

    There is nothing tricky about this comp. No time remaping, obviously no looping. After Effects has 1.8 gigabytes and I’m ordering more ram, but I doubt it’s a memory issue.

    Is there a way to trace the expression output in real time?

  • Darby Edelen

    June 18, 2012 at 11:26 pm

    Do you get the same error on frames after the 5th frame? Have any layers changed on the 5th frame?

    Darby Edelen

  • Jerry Witt

    June 19, 2012 at 12:09 am

    Hi, I guess I should have been clearer. I was just clicking around at random points in the timeline. I am not adding or subtracting any elements in this section where the light plays.

    I have gone in and manually animated what I wanted. However, I can see the power of expressions and am still interested to solve this if it is possible, even if it is just an academic exercise at this point.

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