Forum Replies Created

Page 15 of 15
  • Adam Greenberg

    January 26, 2021 at 10:23 pm in reply to: simple if then statement based on character length

    Trent, it was showing an error the way I wrote it. But I have no way of knowing the exact problem. your expression works perfectly. Thanks so much

  • Adam Greenberg

    April 5, 2018 at 4:59 pm in reply to: control multiple positions with expression

    Thanks Scott, I’ll try it out,
    what is the purpose of this though ?
    thisComp.width, thisComp.height/2

    And also, any thoughts on the bezier curve of the 90 velocity ? I’m sure there must be a way.

    If not,
    I thought of a work around which would be to precomp the animation afterwards and time remap it frame by frame to mimic that movement. It may seem tedious but the user would never have to touch that precomp. It would be locked and hidden in the main comp. And it would work regardless of where the positions have been moved to.

    Regards

  • Adam Greenberg

    March 29, 2018 at 6:02 pm in reply to: Position of a solid to middle of text

    I think that must be it, if the text is 400 pixels from the left of the comp within the precomp, then the expression should be;

    gap = 200;
    L = comp("text precomp").layer("text layer");
    rect = L.sourceRectAtTime(time,false);
    x = L.toComp([rect.left+rect.width,0])[0];
    [x/2+gap+width/2,value[1]]

  • Adam Greenberg

    March 29, 2018 at 5:18 pm in reply to: Position of a solid to middle of text

    It appears to be monospaced,
    but yes, I want the left edge of that solid to be centered on the text width so that if the amount of characters are odd, then the solid would technically be in the middle of the middle character.

    But in all honesty, it is not a deal breaker if its not 100% exact. This solid will be a mask, and the text precomp ( and mask ) will be there twice, animated towards each other so that the text seems to collapse in on itself in the middle while disappearing. So the fact that the center is not mathematically exact will not be noticed by anyone.

    But before anyone suggests another way to accomplish this, it should me noted that this is only part of a project with other things going on that i have not mentioned. It was not my project but I`ve been assigned to re-work it into a template. So actually solving this expression I would think could prove useful in other projects in the future.

    *note – perhaps there is something I cant figure due to the fact that the text is not justified to the left of the comp, it is more like 400 pixels from the left, but still left justified in the paragraph properties ( meaning the first character is always in the same place )

  • Adam Greenberg

    June 2, 2016 at 4:47 pm in reply to: edit expression after seperate dimensions

    Wow, yup. Ok thanks. I was expecting a few of the lines above to be edited, but this is even simpler that I thought, I wish I could find more resources on the actual language.

    Thanks a lot Dan

  • excellent, thanks

  • through googling and googling, I have a found a work around, but I would still like to know how write the expression I originally thought of. In the meantime, see below for anyone who may need this in the future.

    sclamp=clamp(transform.scale[0],0,100);
    [sclamp,sclamp]

    basically returns any value between 0 and 100 even if you try to go below 0 or above 100.

  • Adam Greenberg

    April 26, 2016 at 7:16 pm in reply to: Time remap expression and slider

    Hi Dan, I have been studying the expression to understand why its not behaving as expected. But to keep things short, when I increase the slider, the key frame value ( of keyframe 3 and 4 ) goes down. For anyone who is interested in this advanced control I am looking for, here is something very very close I found on the web, but I can not adapt it to my needs.
    Enjoy ( youtube link and expression below )

    For this template I had no choice but to accept the fact that I can not achieve what I want, but I know its possible. Thanks again for your help. As my template is, there is only one step more in my procedure, so no big deal.

    https://www.youtube.com/watch?v=sWw4E_gLXlI

    var fps = 1/ thisComp.frameDuration;

    //sliders values
    var lt = comp(“controls”).layer(“controls”).effect(“logo-total”)(1)*fps;
    var li = comp(“controls”).layer(“controls”).effect(“logo-in”)(1)*fps;
    var lo = comp(“controls”).layer(“controls”).effect(“logo-out”)(1)*fps;

    var m1 = 0;
    var m2 = framesToTime(li);
    var m3 = framesToTime(lt – lo);
    var m4 = framesToTime(lt);

    //keyframes in your original composition
    //change these numbers depending on the key moments of your composition
    var k1 = 0;
    var k2 = framesToTime(50);
    var k3 = framesToTime (87);
    var k4 = framesToTime(112);

    if (time < m2) {
    linear (time, m1, m2, k1, k2);
    } else if (time < m3) {
    linear (time, m2, m3, k2, k2);
    } else {
    linear (time, m3, m4, k3, k4);
    }

    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.

  • Adam Greenberg

    April 4, 2016 at 1:14 pm in reply to: Time remap expression and slider

    Thanks Dan, I think you are on to something, however, it is not giving me the expected result. And I believe that is due to my explanation.

    the 3rd keyframe should always be the 4th keyframe minus a fixed value.
    this fixed value is 57 frames.

    so that the animation between those 2 keyframes never changes.

    For example, right now, if I enter 6 in your slider,

    the 4th keyframe becomes 00;00;04:18
    and the 3rd becomes 00;00;04:01

    What should happen is the 4th should be 00;00;06;00

    and the third should be ( 6:00 – 57 frames ) – so 00;00;04:03

    if i add 8.22 in the slider

    I would like to see the following

    keyframe 4 = 00;00;08;22
    keyframe 3 = 00;00;06;25

    if someone enters 3.15 in the slider

    keyframe 4 should be 00;00;03;15
    keyframe 3 should be 00;00;01;18

    FYI – the original 4th key frame is at 00;00;05:09
    and the 3rd is at 00;00;03;12

    In all instances,
    key frame 1 should be 00;00;00;01
    keyframe 2 should be 00;00;00;25

    This is a 29.97 comp by the way.

    Thank you.

  • Adam Greenberg

    April 1, 2016 at 7:22 pm in reply to: Time remap expression and slider

    Well I do not need to change the duration of this main output composition. The composition is set to lets say 10 seconds for example, but the precomp ( which is 5:10 ) in this comp has time remap enabled.

    For now, manually I have 4 key frames and the person who edits this composition to the desired duration must move the 3rd and 4th keyframe together to the time they desire, for example 7 seconds and 10 frames.

    But I know I can achieve this with an expression. manually moving keyframes leaves room for human error.

    The best way to visualize this, is think if a logo that animates in a certain way in 25 frames, slowly zooms in until it animates out at the end in 57 frames.

    Well in order to make this logo shorter or longer, you would need 4 keyframes in a remap.

    The first 2 remain fixed in time so that you do not change the speed in which it animates it. the 3rd and fourth need to be moved together in order to respect the speed of the animation out.

    Of coarse the speed of the middle is what changes.

    I know i can can create 4 variables so that variable 1 and 2 never change. variable 4 would be the main formula I am looking for which also converts my slider to frames, then variable 3 would be variable 4 minus 57 frames. Then the template would be driven by this main expression linked to the slider.

Page 15 of 15

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