After Effects Expressions 403 - Triggers Using Markers

Поділитися
Вставка
  • Опубліковано 27 лис 2024

КОМЕНТАРІ • 162

  • @TheObscureTimewarp
    @TheObscureTimewarp 10 місяців тому +2

    5 years later, you're still helping us! Thank you for sharing your knowledge!!

  • @JkDAnimator
    @JkDAnimator 3 роки тому +3

    Great tutorial, Thank you sooo much!!

    • @Animoplex
      @Animoplex  3 роки тому +1

      You're very welcome!

    • @JkDAnimator
      @JkDAnimator 3 роки тому

      @@Animoplex also im trying to do something similar except marker a moves from current pos to position 1, marker b current pos to position 2 and marker c from current pos to position 3. The problem is i can't figure out the code that will make the next animation start from the last markers position. Do you know any tutorials that could help with this?

  • @gaartch6703
    @gaartch6703 3 роки тому +2

    O M G !!!! this is the coolest things that I have ever seen in my life !!! ty so much dude !

    • @Animoplex
      @Animoplex  3 роки тому

      Is it THE coolest? Or, like, one of the top ten coolest? You're welcome!

  • @WasifKhanGD
    @WasifKhanGD 5 років тому +2

    Very helpful tutorial. I'm grateful for your kind help and solution that's exactly what I was looking for. ❤ from Pakistan.

    • @Animoplex
      @Animoplex  5 років тому +1

      So glad you found it helpful, thanks for the kind words!

  • @adrianahernandez5575
    @adrianahernandez5575 2 роки тому +1

    Thanks a lot. You've explained carefully and 100% understandable. :D

    • @Animoplex
      @Animoplex  2 роки тому

      So glad to hear that! Spent a lot of time on the communication side of this series. Appreciate the kind words!

  • @umlucasalmeida
    @umlucasalmeida 5 років тому +1

    Mindblowing. You made it much simpler! Thank you!

    • @Animoplex
      @Animoplex  5 років тому

      You are very welcome, glad to hear it's making things easier!

  • @KNDlifeacademy
    @KNDlifeacademy 4 роки тому +2

    Love your videos man! Super helpful and right to the point.
    I am enjoying scripting in after effects now and it's been on my list for a while haha 😂

    • @Animoplex
      @Animoplex  4 роки тому

      That's awesome to hear! Have you watched other lessons in the course?

  • @frankenfishdom
    @frankenfishdom 3 роки тому +1

    Thank you so much!! This was so well explained, easy to follow and exactly what I needed!

    • @Animoplex
      @Animoplex  3 роки тому

      You're very welcome! Glad it was helpful.

  • @KeesFluitman
    @KeesFluitman 6 років тому +8

    u deserve way more views dude :) nice job.

    • @Animoplex
      @Animoplex  6 років тому +2

      Thanks Kees. It's all about quality, not quantity. 1 viewer who learns something new is better than 1,000 views. Thanks for the compliments!

    • @KeesFluitman
      @KeesFluitman 6 років тому +1

      im trying to get into this work too. Ill follow some of your tutorials and might just buy it. I hope more will support you.

    • @Animoplex
      @Animoplex  6 років тому

      What areas are you specifically interested in? Any questions, reach out. Best of luck!

    • @KeesFluitman
      @KeesFluitman 6 років тому +1

      currently Im trying out my luck with gathering some experience through small Advertisement videos for friends their companies. I film and edit myself, but make the videos more appealing by using logo animations, lower thirds and other scripted lines and shapes. Im trying to use each project to learn sth new about the expressions. They are really helpful to make logo animations and other effects more dynamic and make the videos look much more professional in general. Maybe it will get me an internship some day or even get me paid when I get better...who knows.

    • @Animoplex
      @Animoplex  6 років тому

      You’re definitely on the right track! It’s good practice to find inspiring videos you enjoy and recreate them to learn how they were made. Often time, expressions can help with the tricky parts.

  • @maetube2486
    @maetube2486 5 років тому +1

    This is so amazing tutorial so helpful to build up my selling templates !! thank you so much dude !!

    • @Animoplex
      @Animoplex  5 років тому

      You're welcome, glad it's useful!

  • @baileyjung648
    @baileyjung648 2 роки тому +1

    This was amazing! Thank you

  • @AnasAlSharif
    @AnasAlSharif 3 роки тому +1

    Thanks bro, you saved my life 😍

    • @Animoplex
      @Animoplex  3 роки тому

      Awesome! Happy to hear this is useful.

  • @shubhodeep48
    @shubhodeep48 3 роки тому +1

    Amazing! This is so cool!

  • @AOmike3D
    @AOmike3D 2 роки тому +1

    This is so useful and flexible. Wondering if anybody has had trouble in AE 2022 with preview halting. Seems like turning off multi frame rendering has helped. Has anybody else experienced this and/or have suggested fixes?

    • @Animoplex
      @Animoplex  2 роки тому +1

      Hmmm, could be hardware issue? Or maybe disk cache is full? Hard to know exactly.

    • @AOmike3D
      @AOmike3D 2 роки тому +1

      @@Animoplex Purging all cache does seem to help. So maybe i can chase down the issue by poking around disk cache settings. Plenty of ram and storage on the machine. but i am using really long clips of video. could see that hogging up resources quickly. Thanks again so much!

    • @Animoplex
      @Animoplex  2 роки тому

      @@AOmike3D You got it! Disk cache and RAM are important for previews. You want lots of space for both and fast speeds if you can. SSD for cache drive, 64+ GB of RAM for best preview performance in AE. Hope you get it solved!

  • @alexnegueruela2785
    @alexnegueruela2785 2 роки тому +1

    Excellent tutorial, thanks. I have the silliest question: how did you get an additional panel for your expression editor?

    • @buu4045
      @buu4045 2 роки тому +1

      Looks like it's made in the post production. Cursor blinking is not matching and sometimes freezing.

    • @Animoplex
      @Animoplex  2 роки тому

      That's correct, it's done in post-production. There are a few plugins that have similar features. Expressionist is good: aescripts.com/expressionist/

  • @tubelator
    @tubelator 8 місяців тому

    Amazing thanks!!! Is there a way you can SET markers on mogrts? That still work in premiere?? Or can you control the position of marker with a Expression slider maybe?

  • @hammypork
    @hammypork 2 роки тому +1

    Hey there, this tut has been particularly helpful thankyou for this!
    Question: is there anyway to drive marker animations from a different layer?
    Example is, if I wanted to hide or nest the precomp that the marker/animation set up is in, and use a null layer or something like that at the top comp level to drive the animations.

    • @Animoplex
      @Animoplex  2 роки тому

      You could potentially do this by changing the source layer. Instead of marker.nearestKey, you could use comp("TopComp").marker.nearestKey

  • @MichaelTuckerLA
    @MichaelTuckerLA 4 роки тому +2

    All of these tutorials are super helpful, thank you!
    I had a question if it's not too much of an inconvenience. Would it be possible to add a custom ease to these effects? For example, the InOutQuad ease:
    function easeandwizz_inoutQuad(t, b, c, d) {
    if ((t/=d/2) < 1) return c/2*t*t + b;
    return -c/2 * ((--t)*(t-2) - 1) + b;
    }

    • @Animoplex
      @Animoplex  4 роки тому +1

      You could, but it may get complicated in the marker expression. A (potential) easy way to do this would be to apply the custom ease via Time Remapping in a second pre-comp layer.

  • @noeleb8538
    @noeleb8538 3 роки тому +1

    Great series of tutorials. You do a good job of explaining everything. I'm using this method along with dynamic text from a file to use as a date graphic in upper corner of videos that i do weekly.. everything works perfectly when playing it in AE, but when I export it, none of the animated text shows up. I verified that my text aren't on guide layers or anything. Do you know of what might be causing this?
    Update... I replaced part of my dynamic text with static text and it worked properly so my issue was with pulling text from external file during encoding.

    • @Animoplex
      @Animoplex  3 роки тому

      Hey Noel, sorry for the delay. Very interesting issue! Thanks so much for the update on this, glad you got it solved. Were you purging memory before rendering? And was the render executed in AE or ME? Curious that the preview looked fine but render didn't work. If you were purging memory between preview and render (without viewing the comp) the purge may have cleared the external data.

  • @Bininandra
    @Bininandra 4 роки тому +1

    This is brilliant and saved me a load of work, thank you! Quick question, is there anyway of looping a marker. I've got a walking person and instead of inserting loads of markers, can i get it to loop a few times? Thanks again!

    • @Animoplex
      @Animoplex  4 роки тому +1

      Glad it helped! Try this:
      gist.github.com/animoplex/cecf1c64aec4f2733ecd0edbebf4786d
      Change line 27 from this:
      t = Math.min(t, tMax);
      to this:
      if (t >= tMax) { t = t % tMax }

    • @Bininandra
      @Bininandra 4 роки тому +1

      @@Animoplex thank you my man, you're a superstar!

    • @Animoplex
      @Animoplex  4 роки тому

      Glad it worked! Didn't really test it, so you may encounter errors in specific situations.

    • @Bininandra
      @Bininandra 4 роки тому +1

      @@Animoplex Hi, I just tried it now (was just replying yesterday to say thank you) and the loop doesnt seem to work :(
      BTW, i not a coder, wasnt sure if I needed to amend the code you gave to say how many times I would like it to loop? Many thanks!

    • @Animoplex
      @Animoplex  4 роки тому +1

      It seems to be working during tests. Adding a specific amount of loops would complicate it quite a bit. If you need this level of granular control over loops, you'll want to use markers or try a different pre-comping method.

  • @w.obrien8044
    @w.obrien8044 2 роки тому +1

    After copy and checking syntax very carefully I am getting a unexpected token arror after the first curly bracket. I tried so many times to get this expression to work but no joy.

    • @Animoplex
      @Animoplex  2 роки тому

      In AE, try changing your Project Settings > Expressions > JavaScript to Legacy ExtendScript and see if that helps.

  • @IsionIndustries
    @IsionIndustries 4 роки тому +1

    Very nice and well described explanation. Just one question though, would this expression work with a time remap comp where I just want to spread out the duration of the two keyframes?

    • @Animoplex
      @Animoplex  4 роки тому

      Can you describe your situation in more detail? Time remapping is designed to extend and contract time duration, not sure you would even need an expression for this. Apologies for the delay on this reply, somehow it slipped through the comment dashboard filters.

  • @Fierying
    @Fierying 5 років тому +1

    Hi Animoplex, been binging through this series just afew days ago and the knowledge I got was phenomenal!
    I did have a problem with the Trigger Marker, where for some reason, when using time remapping on my last marker trigger (which is pretty far from the others), One frame before that marker starts, it flickers, but still evident when rendering.
    Is there a way around this?

    • @Animoplex
      @Animoplex  5 років тому +1

      That's great to hear! Regarding your issue, a similar issue has happened in the past. Fortunately, it was solved by using hold frames before / after the problem area. Apply some hold keyframes around the section in question and see if that solves it. Any questions, reach out!

    • @Fierying
      @Fierying 5 років тому +1

      @@Animoplex ah I see! Will test it out, thank you!

    • @Fierying
      @Fierying 2 роки тому

      I know this has been 2 years but found the reason why this happens and maybe help people with the same issue
      That happens because the layer has Motion Blur, causing the flicker when going from one time to another.
      Turn off motion blur for it and it should be fixed. you probably need to find alternatives to blurring if you still want the motion blur effect.

  • @johngeneral1550
    @johngeneral1550 5 років тому +1

    Do you use a certain script or plugin to get the "Expression" window to pop up like you do at 2:47? Seems super helpful and would love to know where to get. Great tutorial!

    • @Animoplex
      @Animoplex  5 років тому

      The expression window is a post-production effect created for the lessons. Reach out if you have any specific questions about it!

  • @orlandorodriguez1209
    @orlandorodriguez1209 5 років тому +1

    Your tutorials are top notch! Thank you.
    I do have a question. Do you know of a way to control the location of one of the trigger markers with an expression? I'm creating an Essential Graphic template for my team and I would like to give the user the ability to specify when to trigger the "OUT" animation by adjusting a slider. So if the slider is given a value of 8 then the "OUT" marker would be placed on the :08 second mark. Perhaps my approach needs reevaluation.
    Nevertheless, thank you for your tutorials.

    • @Animoplex
      @Animoplex  5 років тому +1

      Take a look at this:
      gist.github.com/animoplex/a0428652adce0ffa6ef931b7a742c235
      I made a slight modification to use Slider Controls instead of inPoint and outPoint:
      fade = effect("Duration")("Slider"); // fade duration in seconds
      inTime = effect("Start Fade")("Slider");
      outTime = effect("Fade End")("Slider");
      fadeIn = (time - inTime) / fade;
      fadeOut = (outTime - time) / fade;
      if (time < inTime + fade) {
      ease(fadeIn, 0, 1) * value; }
      else if (time > outTime - fade) {
      ease(fadeOut, 0, 1) * value; }
      else { value; }
      Add three Slider Controls called "Duration" "Start Fade" and "Fade End" and give this a shot. Start fade begins the fade, duration is how long the fade lasts, and Fade End is the final frame of the fade out.

    • @orlandorodriguez1209
      @orlandorodriguez1209 5 років тому +1

      @@Animoplex thank you for the suggestion. The main reason I loved your trigger by marker approach is because it allowed for more complex nested animations. I'm any case, I'll see if I can figure out how to modify this fade expression to work with other properties like position and scale.
      Thanks again!

    • @Animoplex
      @Animoplex  5 років тому +1

      Markers can’t be moved or edited with expressions. But the auto fade opacity expression can be used with Time Remapping if that’s something you can use. Good luck!

    • @orlandorodriguez1209
      @orlandorodriguez1209 5 років тому +2

      @@Animoplex , wanted to follow-up and your fade approach worked like a charm. I applied it to the time remap as per your suggestion and made a few modifications but in the end it was all your code. Thank you again. Extremely appreciated!

    • @Animoplex
      @Animoplex  5 років тому +2

      Awesome! Glad you were able to modify it and get it to work. Give yourself some credit, it was YOUR code!

  • @fernandothome227
    @fernandothome227 4 роки тому +1

    how the hell this video only gets 300 likes????????? if i could i would give you 1k likes so the youtube algorithm makes you famous!

    • @Animoplex
      @Animoplex  4 роки тому +1

      Thanks for the kind words! If only 1k likes were possible by one person on one video...

  • @molliedavis7991
    @molliedavis7991 4 роки тому +1

    This is awesome, thank you! I was looking for a solution like this using Responsive Design but to no avail. Would you be able to trigger animations within a nested comp using protected regions?

    • @Animoplex
      @Animoplex  4 роки тому

      Great question! Do you mean this?
      helpx.adobe.com/after-effects/using/responsive-design.html
      Unsure if this would work but looks like it would. Have you tried it yet? Any issues?

  • @JunaidUrRehman
    @JunaidUrRehman 4 роки тому +1

    Hay Parker, Great in-depth tutorial and really well constructed. I have a question though, I wanted to do something really simple, I just want to display the marker number to a text layer. Actually increment the the number by 1. I have bunch of markers in a nested comp and I want to display their number in their respected sequence in time. Would really help if there's a way to do it with expression. I am manually keyframing the source text on each marker which is really time consuming. Thanks

    • @Animoplex
      @Animoplex  4 роки тому +3

      This should display the current marker on the text layer:
      val = 0;
      if (marker.numKeys > 0) {
      val = marker.nearestKey(time).index;
      if (marker.key(val).time > time) {
      val--;
      }
      }
      val + 1;

    • @JunaidUrRehman
      @JunaidUrRehman 4 роки тому +1

      @@Animoplex Parker !!! I love you and I wanna hug you .. It worked !! Thanks a ton!

    • @Animoplex
      @Animoplex  4 роки тому +1

      Glad it worked! Sorry for the delay in reply, some questions require a test run in AE before responding.

    • @JunaidUrRehman
      @JunaidUrRehman 4 роки тому

      @@Animoplex Thanks a lot for taking time to answer it really appreciate it. One more thing I want to ask if it's not too much :)
      is it possible to add a prefix to the number, could be a symbol or a number. Something like this " 01:(Marker number) "

    • @Animoplex
      @Animoplex  4 роки тому +1

      Sure. I recommend watching this tutorial:
      ua-cam.com/video/_XeV8NEtwjg/v-deo.html
      Just put the text in quotes and add it to the last line which will convert it to a string, like this: "01: " + (val + 1)

  • @alienhearts
    @alienhearts 6 років тому +1

    What if I wanted to use exactly the technique you described, but instead of playing once the "laser shoot" I wanted to loop it for maybe 15 seconds and after that, looping the fin closing for about 20 seconds and after that… coming back to looping the laser shoot for another 30 seconde and so on…? Like jumping from a loop to another one by still using the markers? Any idea?

    • @Animoplex
      @Animoplex  6 років тому +1

      Great question! It's possible, but you'd need to change how the expression playback works to create a looping function. This would require a check to see if a marker name had "Loop" at the end of the name, because sometimes you may want a loop, and other times you may want to freeze the animation until the next marker.
      An easy way to do what you're asking is to simply repeat the layer markers as many times as you want the loop to occur. Were you having issues with creating multiple markers to manually loop the animation?

    • @alienhearts
      @alienhearts 6 років тому +1

      Hi and many thanks for your time. No I'm not having issues creating multiple markers. I just wondered if a convenient way to loop whatever I want was easily achievable. I'll find a workaround. Thanks again. (Your tutorials are top notch quality btw).

    • @Animoplex
      @Animoplex  6 років тому

      Thanks for the question, appreciate the compliments! Post back if you can’t find a proper workaround.

  • @NaitorStudios
    @NaitorStudios 5 років тому +2

    Is there any way to trigger a continuous animation?
    I mean, the marker makes a layer goes a bit to the left, when the next marker appears, it goes a little more to the left (with the same marker)

    • @Animoplex
      @Animoplex  4 роки тому +2

      This should do what you're looking for. Add a slider to the layer, set it to a negative value, then add this expression to Position property and add some markers!
      src = effect("Slider Control")("Slider");
      n = 0;
      if (marker.numKeys > 0) {
      n = marker.nearestKey(time).index;
      if (marker.key(n).time > time) {
      n--;
      } // get previous marker index
      }
      if (n == 0) {
      value;
      } else {
      m = marker.key(n); // m is target marker
      try {
      value + (m.index * src);
      } catch(err) {
      value;
      }
      }

    • @TuberCentral
      @TuberCentral 4 роки тому

      ​@@Animoplex Okay but can you also include this? comp(name).layer("Markers")

  • @ladvark
    @ladvark 4 роки тому +1

    I am trying the first part of the video in AE CC 2020 but the in point doesn't seem to be working correctly? No matter where the In point marker is, it still fades out from the start of the composition? I've also tried copying and pasting the code in but can't seem to get it to work.

    • @Animoplex
      @Animoplex  4 роки тому

      Interesting. Did you get any expression errors when you tried?

  • @moinfranko
    @moinfranko 3 роки тому +1

    How did you implement the great zoom function for displaying your expressions examples?

    • @Animoplex
      @Animoplex  3 роки тому

      That was a custom graphic added in post. It was added to increase legibility of the code.

  • @keithhopkin
    @keithhopkin 4 роки тому +1

    How do you get the large Expression panel??

    • @Animoplex
      @Animoplex  4 роки тому

      That’s a graphic added in post production. The Expressionist plugin offers some of this functionality, check it out here: aescripts.com/expressionist/

  • @keithclimate
    @keithclimate 3 роки тому +1

    For some reason this doesn't work for me. Halfway between the in and out markers the layer completely disappears and I can't figure out why. Also can you explain how to use this expression to trigger any effect in or out? For instance if I wanted to use the wiggle expression, what would that look like?

    • @Animoplex
      @Animoplex  3 роки тому

      Animating with markers can get tricky, it's hard to diagnose your issue without seeing all aspects of the setup. If you simply wanted to turn wiggle on or off, you could use keyframes and a Slider Control linked to the amplitude value of the wiggle. Keyframing the amplitude with a Slider is like an on/off switch for the expression. You can also blend between two expressions with something like this:
      gist.github.com/animoplex/a40e82c808ee785312b757b40705bcbd

  • @adirakessler235
    @adirakessler235 3 роки тому +2

    Quick question: What’s the difference between using markers vs using keyframes?

    • @Animoplex
      @Animoplex  3 роки тому +1

      Good question! In certain workflows, markers can be easier to organize and animate with. They are good for templates or rigs that you re-use and edit often. But there's some setup involved and it can be tricky to make adjustments if the project is complex. Hope this clears things up!

    • @jackiema6035
      @jackiema6035 3 роки тому

      @@Animoplex yeah,Markers have NAMES (comment) like us , it is convinient for your later use.

  • @NaitorStudios
    @NaitorStudios 4 роки тому +1

    Could you please help me?
    I want to convert the expression to detect a checkbox state instead of using markers...

    • @Animoplex
      @Animoplex  4 роки тому +1

      This is possible, but you'll only be able to trigger 1 or 2 animations since Checkboxes only have on/off states. You can use similar logic as the keyframes version but look for checkboxes instead. No need to evaluate the comment text, just map two Time Remap ranges to the Checkbox output of 0 or 1.

  • @WildlifeRecon
    @WildlifeRecon 6 років тому +3

    To be honest I really want to learn this but I simply do not understand the expression language. I can copy what this guy wants but I don't know how to create the expression that I want. I currenly use an expression that allows me to have an In and Out marker. In being the start of the animation, out being the end of the animation, this works flawlessly. I use a composition where I have an animated text. I want to create a marker that allows me to transition it to the next text a few times. Any idea how I can accomplish this? Basically it needs to have the In animation, Out animation and a marker to skip to the next timeframe where the next animation starts. There is no animation during the text so time skipping is unnoticable. I hope to hear from you! This is the current expression that I use
    T = thisLayer;
    if ((T.marker.numKeys > 1 ) && (numKeys > 3)){
    sIn = key(2).time - key(1).time;
    sOut = key(4).time - key(3).time;
    eIn = T.marker.key(1).time;
    eOut = T.marker.key(2).time;
    if (time < T.marker.key(2).time)
    linear(time,eIn-sIn,eIn,key(1).value,key(2).value)
    else
    linear(time,eOut,eOut+sOut,key(3).value,key(4).value);
    }else
    value;

    • @Animoplex
      @Animoplex  6 років тому

      Thanks for reaching out! What functionality are you looking to add to your existing expression? It seems like it has an in (sIn eIn) and out (sOut and eOut) but the request may not be properly understood. Are you looking to add a third level of transitions beyond the s and e examples? This can be a complex area of expressions but let's try to fix it!

    • @WildlifeRecon
      @WildlifeRecon 6 років тому +1

      Wow, thanks for the quick reply! First of all english is not my first language so this might sound like a bit of a ramble. Let me first explain what I'm working on and how it's working. In the second paragraph I will explain exactly what I need. So I'm currently creating a big template for a client. The template is for an e-learning course. The template is working pretty well but I want to make it extremely user friendly so the editors don't have to go inside the composition and fiddle around too much. In my composition text animates in, then it animates out. The animation is intermediately complex. If I copy and paste the composition after each other it loops perfectly and the new text can be added inside that composition. The problem with that is that it doesn't make the project so clean. The second problem is that the text inside the composition is narration of video's that the client will use my template for. Sometimes it will be 5 seconds for other videos it might be 8 seconds or anything in between. My solution is that the first text will be in the first 10 seconds of the composition. After 10 seconds the text animates out and the new text animates in. After 10 seconds again, and again, and again. A marker needs to influence how long each text stays on the screen. I don't know if this makes the expression anymore complex but if it's doable to have 5 markers to move the time remapping to where the next text animation would stay. The current expression is based on Time Remapping, and that is working fine but the current expression only has the functionality to go to my "In" marker and "Out" marker. How the expression works is as following: In the start of the composition I place a time remapping keyframe at the time where the In animation is finished. Here it will freeze the frame, which is fine since there is no actual animation after the text appears. When It hits the "Out" marker it will immediately go to the time inside the composition when the end animation start.
      So this is what I need. I need to have an "In" marker so after it finished the first text animation it will freeze frame. I need to have a "1" marker. The marker will jump to the time inside the composition where the first text animates out and animates into the next one. This animation is right after each other so it's not a problem. Then I want a "2" marker which does the exact same as the first marker. Move to where the second animation start to animate out, into the third one. Preferably I have 5 or 6 of these, more would be brilliant.
      I hope you understand what I mean. The idea is very simple but it's tough for me to explain. Basically the markers need to be linked with where the timeremapping keyframes are.

    • @WildlifeRecon
      @WildlifeRecon 6 років тому +1

      Ugh why did I write such a big paragaph. I just need 5 markers that will jump to a certain time inside the composition so I can manipulate the time how long a text appears.

    • @WildlifeRecon
      @WildlifeRecon 6 років тому +1

      Before you work on this. I just found this article motionscript.com/design-guide/marker-sync.html the description is exactly what I need. Let's see if I can get it to work in my composition
      Update:
      I found it out myself, this works exactly how I want it!!
      action = comp(name).layer("action");
      n = 0;
      if (marker.numKeys > 0){
      n = marker.nearestKey(time).index;
      if (marker.key(n).time > time){
      n--;
      }
      }
      if (n == 0){
      0
      }else{
      m = marker.key(n);
      myComment = m.comment;
      t = time - m.time;
      try{
      actMarker = action.marker.key(myComment);
      if (action.marker.numKeys > actMarker.index){
      tMax = action.marker.key(actMarker.index + 1).time - actMarker.time;
      }else{
      tMax = action.outPoint - actMarker.time;
      }
      t = Math.min(t, tMax);
      actMarker.time + t;
      }catch (err){
      0
      }
      }

    • @Animoplex
      @Animoplex  6 років тому

      Hey this is awesome! Sorry for the delay, responses usually come within 24 hours but cell service can interrupt this. Thanks for posting your solution, it's always good to see how you solved it. Does it work the way you were intending? The Marker Sync page you linked is the original source for this lesson.

  • @basselahmed5046
    @basselahmed5046 Рік тому +1

    is it possible to make the same for SFX? so if I want to play the SFX anywhere in the timeline I should just add a marker then it plays

    • @Animoplex
      @Animoplex  Рік тому +1

      A bit late here, theoretically, yes. Although this is older code that may need to run in Legacy Expression Mode to work properly. Give it a try!

    • @btraynes
      @btraynes Рік тому

      @@Animoplex would love and appreciate an update with Javascript!

  • @tubelator
    @tubelator 5 місяців тому

    Can someone confirm if it's true that this does NOT work as soon as you add Essential Graphics to the main layer? The expression does not find the 'src' anymore.

  • @mrtablt3069
    @mrtablt3069 5 років тому +1

    Hi! It's a pleasure to watch your tutorials!
    I'm traying to learn expressions and its syntax, and watching this video I thought it might be used in a lip sync: a precomp with 1 frame by mouth, 1 marker by frame, and use the markers in main comp - with the precomp in it - to go to the frame I need in precomp. When I used your expression I realized that (obviously, yep, but...) didn't stop, and I've try to adapt it. My final expression is equal to yours and Ebbert's except for this lines
    "...if (actMarker == m.comment){
    tMax = action.marker.key(n).time;
    }else{
    tMax = 0 ;....."
    The expression do what I wanted to do, but I'm sure this is a botch. Thus my question is ¿anyone knows if there is a more pretty and neat code to do the same stuff?
    Anyway, thank's for your wisdom!

    • @Animoplex
      @Animoplex  5 років тому

      Thanks for reaching out, glad you're finding the tutorials useful! If understood correctly, you're asking if there's a simpler expression to achieve this? At the moment, this is one of the simplest ways without using a 3rd party script or altering your workflow completely. What is your main issue with the current method?

    • @mrtablt3069
      @mrtablt3069 5 років тому +1

      @@Animoplex Oh, no, there's no issue with this method, it's awesome for reuse animations quickly. But as I still don't fully understand the code
      and its order (I need more flying hours), I've assumed I maintain sections of it not useful for this purpose.

    • @Animoplex
      @Animoplex  5 років тому

      Tinker with the code to see how it works. Change and remove sections of the expression to see if it breaks and how each change affects it. You can use text layers to see what the output is. Reverse engineer it until you understand it.

    • @mrtablt3069
      @mrtablt3069 5 років тому +1

      @@Animoplex thank you so much for the advices!!

    • @Animoplex
      @Animoplex  5 років тому

      You're most welcome, post an update on how the research into the code goes!

  • @carlperl412
    @carlperl412 6 років тому +1

    WOW. This channel is amazing!!!!!!!! Where are you been?
    New subs here. Insta-shared! (Y)

    • @Animoplex
      @Animoplex  6 років тому

      I've been here the whole time! :) Thanks for the share, more content on the way. Let me know if you have any questions!

    • @carlperl412
      @carlperl412 6 років тому +1

      Great! But This channel has a BOUNCH of information expression. I need to repeat these english videos and learn *despacito,* because I speak español. Haha! Thanks!

    • @Animoplex
      @Animoplex  6 років тому

      I manually add English captions to all of my videos to help the auto-translation quality on UA-cam. Only a couple of videos are missing them, I will add them very soon. Let me know if you use the auto-translation to Español and if you run into any issues or hard-to-understand areas. I'm always looking to improve and this is a tough area for me to evaluate since I speak English exclusively. Thanks Carl!

    • @carlperl412
      @carlperl412 6 років тому

      Ok, I got it!
      Do you have any video with this www.motionscript.com/design-guide/audio-count.html?
      Let's say each beat causes a new layer to become visible...

  • @vincent074
    @vincent074 2 роки тому +1

    Thanks for the video, very useful. Is there also a way to loop an animation after you've triggered it via markers? lets say an idle animation for a character? edit: and do you guys perhaps have a discord channel? :)

    • @Animoplex
      @Animoplex  Рік тому

      You could theoretically add a loop here to replace the still frame when no markers are detected. No Discord channel at the moment, maybe in the future!

  • @yusufozdogan1832
    @yusufozdogan1832 6 років тому +1

    Nice tutorials, well explained. My only complain is the music on the background. Makes it hard to focus. Thank you very much anyway!

    • @Animoplex
      @Animoplex  6 років тому

      Thanks for the feedback! You're the first person to mention this, but thank you for bringing this up. The track was put in to add some life to the audio, the voice gets really monotonous after the first couple of minutes. Definitely re-evaluate this in the future. Would you prefer silence and only the voice track?

    • @user34rL
      @user34rL 6 років тому +1

      I felt the same. Although it makes the video nicer, it's irritating when you're following the content of the tutorial. Thanks for the video though!! @@Animoplex

    • @Animoplex
      @Animoplex  6 років тому

      Good to know, thanks for the feedback!

  • @mtfbmx
    @mtfbmx 4 роки тому +1

    Great tutorial.. Already saved me tons of headache, thank you sir!
    One question.. Regarding triggering effects, what would be a good way for the effect to start its fade at the in marker rather than end at the in marker?
    Edit for clarification: I mean a separation where the start of In and Out would be definable separately
    Even better would be a definable positive or negative delay in frames. I imagine the code could just reference the delay time in the first instance and use that as a delay.
    Thanks again!

    • @Animoplex
      @Animoplex  4 роки тому

      Take a look at this and see if it's close to what you're looking for. It uses the inPoint and outPoint of the layer itself to trigger fade in and out:
      ua-cam.com/video/BOPfs49VfLE/v-deo.html

  • @europeReport
    @europeReport 6 років тому +1

    ¿Do you know a Expression to show the Comment of a TextMarker that is placed on a Layer Onscreen?

    • @europeReport
      @europeReport 6 років тому

      Ahh, i found it on Creative Cow, Dan (Ebberts) said:
      m = thisComp.layer("Marker Layer").marker;
      txt = "";
      if (m.numKeys > 0){
      n = m.nearestKey(time).index;
      if (time < m.key(n).time) n--;
      if (n > 0) txt = m.key(n).comment;
      }
      txt

    • @Animoplex
      @Animoplex  6 років тому +1

      Hello, you can use one of these formats:
      thisComp.layer("Layer 1").marker.key(1).comment
      thisComp.layer("Layer 1").marker.nearestKey(time).comment
      Just change the reference of key(1) to the correct marker, or adjust the nearestKey(time) to the desired composition time. You can also remove the layer reference (and leave thisComp) to target timeline markers. Hope this helps!

  • @MuhammadNurbasit
    @MuhammadNurbasit 4 роки тому

    how to write expression, so every time hit the marker object scale down from [100,100] to [85,85] with duration for 4 frame?

    • @Animoplex
      @Animoplex  4 роки тому

      One question: What happens between the 85% scale on the 4th frame and the 100% scale at the start of the next marker? There has to be some value change to get back to 100%

  • @Billyjoelt
    @Billyjoelt 5 років тому +1

    I don't understand why everytime I attempt to utilize your expressions they come back as "syntax error" ?

    • @Animoplex
      @Animoplex  5 років тому

      Which expressions cause this error? And which version of After Effects are you in? More information will help diagnose the problem. CC19 has a new expression engine and old syntax and features may not work the same. You can fix this by going to File > Project Settings > Expressions > Legacy. This setting is per project, any new project created in CC19 that requires old expression syntax will have to be swapped to the old engine.

    • @Billyjoelt
      @Billyjoelt 5 років тому +1

      Animoplex so far it has been the sourceRectAtTime expression, and most all of the ones covered in the “Helpful expressions” video. I have both CC 17 and 19, but was/am using 17 for this project. Thanks!

    • @Animoplex
      @Animoplex  5 років тому

      Interesting, all of them should work in CC17 with no problem at all. Two things recommended: 1) Are your quotation marks using straight quotes or curly quotes? If you copy and paste expressions into AE, sometimes the quotations are the wrong type. You can replace them with the correct type in the expression window by deleting and retyping them again. And 2) Make sure your conditional statements include brackets and are separated to multiple lines. This:
      if (a > b) { 100 } else { 0 }
      Should be:
      if (a > b) {
      100
      } else {
      0
      }

  • @semillerimages
    @semillerimages 6 років тому +1

    What if you have multiple nested comps contributing to animation?

    • @semillerimages
      @semillerimages 6 років тому +1

      no really, I have this really complex heart animation that shows the muscle movement and electrical impulses and it has several nest comps... is it possible to adapt the script to deal with that?

    • @Animoplex
      @Animoplex  6 років тому +1

      Good question! If you wanted the same nested comp to be used multiple times with different combos of trigger markers, it should work fine. Now if you want multiple nested comps using this technique, you simply have to replicate the process for each comp. Each comp's layer would have a Time Remapping property and the marker sync expression applied, with separate markers on the layer that match the nested comp's reference markers. Hope this answers your question, reach out if you need further clarification.

    • @saschageier
      @saschageier 6 років тому +1

      yes please, I would love to get further infos on that

    • @Animoplex
      @Animoplex  6 років тому

      Which parts are you looking for more information, multiple nested compositions with marker triggers?

    • @saschageier
      @saschageier 6 років тому +1

      action = comp(main).comp(nested).layer("action");
      something like this. maybe its not possible, but only being able to "reach" into one nested, is a little limited, if the animation is more komplex.
      If Dan Ebberts method isn't the right one to get the job done.. alternative?!

  • @BrodieMatthews
    @BrodieMatthews 6 років тому +1

    be great to just pick whip with dynamic values.thx

    • @Animoplex
      @Animoplex  6 років тому +1

      Thanks for the comment! Can you share your process for how this would work?

    • @BrodieMatthews
      @BrodieMatthews 6 років тому +1

      i couldn't tell you tbh this is my first time hearing of trigger markers, but in some digital audio software the triggers(Midi) initialise an envelope that send a range of variable control messages called an adsr. which seem virtually the same process, some instruments have multiple envelopes and can control multiple parameters. im actually surprised this hasnt been integrated as a function before.
      say you had an image with the opacity ramped from 0 to 100 over 5 frames, down to 50 over another 5 frames and down to 0 over another, that would be your envelope and you could trigger any parameter and change the amount and time, check out ua-cam.com/video/fxBRQIIbJTA/v-deo.html

    • @Animoplex
      @Animoplex  6 років тому +1

      Nice suggestion! You can accomplish something like this in After Effects with a little expression magic. Try three sliders, two for the min and max values and the third slider for the length of time the precomp animation would take to complete.

  • @umlucasalmeida
    @umlucasalmeida 4 роки тому +2

    The mark sync expression is not working on most recent after effects CC. The expression and the markers layer is correct, don't know what's wrong.

    • @bookieaka
      @bookieaka 4 роки тому +2

      I found it have to switch Project setting > Expressions > from JavaScript to Legacy Extended Script, and it work.

    • @Animoplex
      @Animoplex  4 роки тому

      As Ittiphon suggested, try changing Project Settings > Expressions > JavaScript to Legacy ExtendScript and see if the errors are resolved.

  • @clodrichard4046
    @clodrichard4046 6 років тому +1

    Yes! Subscribed !
    Question from complete beginner. I have a video? Long video. And I want to recycle Hives icon animations templates on that video.
    First I made subtitles with identical content. Imported it with pt_importsubtitles.
    I create comp marker to control animated icon and I create marker on control layer created by DUIK's animation blender function
    Then copy paste markers script from pt_importsubtitles layer to control layer of DUIK's animation blender function
    I think that it is more easy way for beginners. But I have one problems with duration.
    For example
    Search icon (with manually extended duration) doesn't want end.
    Bolt icon (with original 8 sec duration) even doesn't want appear on screen (only at the begging (8 sec)).
    Project
    www.upload.ee/files/8810923/DUIK-duration-issue.rar.html
    Can you please help with duration issue in my project ?
    Thank you

    • @Animoplex
      @Animoplex  6 років тому

      Hey Clod, thanks for the subscribe! This comment was flagged due to the included link, sorry for the delay in my response. Are you still having issues with the duration? It sounds like a pretty complex setup!

    • @clodrichard4046
      @clodrichard4046 5 років тому

      @@Animoplex
      I am searching for solution (script, plugin anything with UI and frendly for non-techies) for yeras
      video.stackexchange.com/questions/22349/after-effects-automation-and-annotation-tools-scripts-for-student-work
      video.stackexchange.com/questions/23764/use-markers-in-after-effects-as-triggers-for-a-particular-animation/25196#25196

    • @Animoplex
      @Animoplex  5 років тому

      The solution that is detailed in that answer should work fine for the subtitles. For the lower thirds, you might need to add a linear() method that changes the time remapping of a precomp if it has complex layers. Maybe using code like this (would need to be edited for your specific setup) to control the time remap:
      gist.github.com/animoplex/fa91659baccbb91b810313053a48c2e9

  • @michaelmuller6029
    @michaelmuller6029 6 років тому +1

    I seriously don't understand why you don't get clicks like crazy. are just not that many people into expressions?

    • @michaelmuller6029
      @michaelmuller6029 6 років тому +1

      you could easily sell your content on gumroad

    • @Animoplex
      @Animoplex  6 років тому +1

      The course is free on UA-cam, as a gift to the internet. The project files, documentation, and HD videos are sold on Gumroad, the link is at the top of the description of each video:
      gumroad.com/l/animoplex-expressions

  • @passion_proh-jects
    @passion_proh-jects 7 місяців тому

    Das ist goed ja? Very Ja!