Forum Replies Created

Page 1 of 6
  • Alex Ezorsky

    March 27, 2023 at 4:47 pm in reply to: Looping an expression with no keyframes

    Ok probably the last post but thanks to Dan’s reply in the adobe forum the new cleanest version is this:

    startlayer = 2;

    endlayer = 8;

    compframerate = 1/thisComp.frameDuration;

    framerate = (compframerate/effect(“Posterize Time”)(“Frame Rate”);

    numLayers = endlayer – startlayer + 1;

    currentLayer = Math.floor(timeToFrames(time)/framerate)%numLayers + startlayer;

    https://community.adobe.com/t5/after-effects-discussions/expression-to-show-next-layer-every-x-frames/m-p/13682992#M226582

  • Alex Ezorsky

    March 27, 2023 at 4:35 pm in reply to: Looping an expression with no keyframes

    Dan you are an absolute genius. In the last hour some deep subconscious part of my brain was able to understand your previous expression enough to edit it to make it work for my purposes. I would still love an untangling of the time%period part but in the meantime I’ll explain my situation and resulting solution:

    I am making a short film where my hair and clothes change every frame of the video. In some scenes there are as few as 8 takes to cycle through and in others closer to 14. To achieve this I’ve put an expression on every layer that says to only be visible when it’s index matches the number on a slider called “layer selector”. Previously I had been animating that “layer selector with keyframes but it became increasingly frustrating when I wanted to adapt to different numbers of layers and still have the layers show equally long. This became even more frustrating when I wanted to experiment with the video frame rate. In any case the following was bashed together with trial and error and as I said probably some unconscious understanding. It works fabulously. Not only do I only have to enter the start and end layer to cycle through but now it shows each layer for exactly the right number of frames given the frame rate I’m choosing through the posterize time effect. In this case it cycles through layers 2-8 changing every 3 frames because my comp is 30fps and my posterize time is at 10fps.

    var startlayer = 2;

    var endlayer = 8;

    var compframerate = 1/thisComp.frameDuration;

    var numberoflayers = endlayer-startlayer;

    var period = (numberoflayers+1)*(compframerate/effect(“Posterize Time”)(“Frame Rate”));

    var t = timeToFrames(time)%period;

    Math.floor((linear(t,0,period,startlayer,endlayer+1)))

  • Alex Ezorsky

    March 27, 2023 at 3:39 pm in reply to: Looping an expression with no keyframes

    I too was looking to loop a period of time via expressions only. This:

    period = 1;

    t = time%period;
    linear(t,0,period,0,100)

    is the closest I’ve gotten so far but to be honest I don’t fully understand how it works enough to modify for my purpose. I would really appreciate any help deconstructing this. The link you posted above to Dan’s “solution” no longer works :/

    Thanks!

  • Thanks for your reply. While technically choking the matte works, it’s not perfect as there is always either a little too much choking (causing the effect to not truly reach the edges of the layer) or too little choking causing the slightest darkening of edges.

    CURRENT SOLUTION: for anyone else struggling with this the only thing that seems to truly work is to use the wavy lines effect as a luma matte for an adjustment layer which I then place above my character and add to it a brightened curves effect. This would of course work the same if I replace the adjustment layer with a duplicate of my character but I prefer adjustment layers when possible. Bright lines and no darkening

    EPILOGUE: I would still love if someone at Adobe could give me like a root level programming explanation for this, I feel like this borders on a bug. Blending modes over semitransparent pixels (I’m guessing the semitransparent pixels at the edges of alpha are the culprit here) should still only do what they do over opaque pixels, i.e. only “add” if using “add” and not also darken. Rant over.

    Still happy to hear thoughts though!!!

  • Aha! I think I’ve found a clue. If I turn off all animation on the source clip (the animation was used to stabilize it) the tracker panel is able to successfully deliver the correct transform data to the null. It seems when you send the tracking information to the null it takes into account (and counter references) the clip’s current transform keyframes. I still find this odd since the tracking data is created on the clip pre-transfrom animation (hinted at by the fact that the tracker uses the layer viewer)

  • This is amazing!

  • Well in case anyone else finds this post in a hunt for yet another mystery nightmare with AE, this one turned out to be A SINGLE MASK EXPANSION KEYFRAME that was I guess just too high for AE. Not a single warning from AE that this could’ve been the cause. Dang this is frustrating. Had to find this out by deleting every single effect, property and keyframe in the entire project as fast as possible before it crashed and then doing CNTRL+Z until it crashed and I knew which property it was.

    As for the other project that was crashing…still a mystery.

    I suppose I’m still open to helpful suggestions but maybe this will be a help to someone in the future!

  • This is amazing Dan it works like a charm allowing me to scale move and even rotate the source and the pin’s stay put on the screen!

    I’d never heard of the .fromComp before. The only tutorial I could find online about fromComp is this which helps but is too short https://www.youtube.com/watch?v=CT5sq2APfzA

    Do you know any better tutorials for this?

    Also I’m trying to figure out why the anchor point being the reference makes it all work. I’ve noticed changing that to the layer’s “position” definitely does not work, which I find odd because wouldn’t AE need to know the layer’s position on the screen in order to compensate?

    Thanks!

    Some contents or functionalities here are not available due to your cookie preferences!

    This happens because the functionality/content marked as “Google Youtube” uses cookies that you choosed to keep disabled. In order to view this content or use this functionality, please enable cookies: click here to open your cookie preferences.

  • Alex Ezorsky

    September 7, 2019 at 6:17 pm in reply to: One animating pattern across a 3d cube.

    YES! I have since discovered 3D projection and am absolutely in love it’s opening up SO many new possibilities including projection based motion tracking which is a mindblower.

    For anyone else new to 3D projection here’s what I’ve learned:

    The basic idea of projection used to make a 2D image 3D
    https://www.youtube.com/watch?v=cnf2sqNlsYQ

    Other apps that do the 2D to 3D version
    https://aescripts.com/buena-depth-cue/
    way complicated version with projection onto OBJ files
    https://aescripts.com/projection-3d/

    How to use it to stabilize
    https://www.rocketstock.com/blog/when-warp-stabilizer-fails-create-a-projector-in-after-effects/

    Using two camera setup to stabilize then using the second camera and preomposing and then sticking that back into the 3D scene so you can do whatever you want to them (i.e morph/warp/mask etc)
    https://aescripts.com/projection/

    Some contents or functionalities here are not available due to your cookie preferences!

    This happens because the functionality/content marked as “Google Youtube” uses cookies that you choosed to keep disabled. In order to view this content or use this functionality, please enable cookies: click here to open your cookie preferences.

  • Alex Ezorsky

    August 31, 2019 at 3:49 am in reply to: Jigsaw puzzle after effects

    Create a composition that will contain the finished image.

    Nest that composition into another composition

    Duplicate that nested composition layer for each puzzle piece and put a puzzle shaped mask on each layer.

    Keyframe them all with the default position and rotation values at the time in the timeline where you want them assembled.

    Go to the beginning and set keyframes for each piece’s starting state.

    OR

    Slap the shatter effect on just one of those nested composition layers set the shape pattern to puzzle and then precompose that layer moving all attributes. Then time reverse or time remap this precomp to assemble instead of shatter.

    Hope that helps!

Page 1 of 6

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