صفحة 1 من 3 123 أخيرأخير
النتائج المعروضة من 1 الى 20 من مجموع 42

موضوع: After Effects Expressions

ردود: 42 | زيارات: 5702
  1. #1
    عضو متميز
    صور رمزية mazination
    تاريخ التسجيل
    Jul 2005
    المنطقة
    مصر
    العمر
    34
    ردود
    1,154

    After Effects Expressions

    A Minor Collection of
    Useful Expressions


    by Michael Natkin, Fred Lewis, and Brian Maffitt


    Circle Fun

    This generates perfect circular motion centered around the original position of the layer. I recommend that you map the radius and
    cycle inputs to Expresso sliders, and the phase input to an Expresso angle.

    Apply this expression to the position of the layer

    radius = 75; // the radius of the circle
    cycle = 1; // number of seconds to complete a circle; higher value = slower
    if(cycle ==0){cycle = 0.001;} //avoids a “divide by zero” error
    phase = 27; // initial angle in degrees from bottom
    reverse = 1; // 1 for ccw, -1 for cw
    x = Math.sin( reverse * degrees_to_radians(time * 360 / cycle + phase));
    y = Math.cos(degrees_to_radians(time * 360 / cycle + phase));
    add(mul(radius, [x, y]), position)

    ------------------------------------------------

    Track a Child

    This expression is designed to track the position of a layer that has been parented to one or more layers.
    Use the expression below on the position property that you wish to animate, changing the name “Child” to match the neame of the
    layer you wish to track. For instance, if you wat to use write-on to track the position of a layer called “moon”,

    apply this expression
    to the “brush position” property of the write-on filter, and change “child” to “moon”.

    c = this_comp.layer(“child”);
    c.to_comp(c.anchor_point)

    ------------------------------------------------


    Adjustable Position Wiggle

    Use this expression as an interactive, keyframeable Wiggler.

    Apply it to the position of the layer you wish to wiggle.

    wigfreq = 3; //wiggle frequency
    wigamt = 30; //wiggle amount
    wigdetail = 3; //detail of noise
    position.wiggle(wigfreq, wigamt, wigdetail)

    ------------------------------------------------

    Adjustable Rotation Wiggle

    Use this expression as an interactive, keyframeable Wiggler.

    Apply it to the rotation of the layer you wish to wiggle.

    wigfreq = 5; //wiggle frequency
    wigangle = 45; //wiggle amplitude
    wignoise = 3; //octaves of noise
    rotation.wiggle(wigfreq, wigangle, wignoise)

    ------------------------------------------------

    Oscillate Position

    Creates an oscillating motion between two specified 2-dimensional positions over a specified period of time (in seconds).
    Use an adjustment layer with Expresso position controls for “from”, “to”, and an Expresso slider assigned to “period”.

    Change “linear” to “ease” for smoother interpolation.

    from = [50, 90]; //one end of your oscillation
    to = [190, 30]; //the other end of your oscillation
    period = 1.5; //time between oscillation points (multiply by 2 for a round trip)
    t = time % (period * 2);
    if (t > period) t = 2 * period - t;
    linear(t, 0, period, from, to)

    ------------------------------------------------

    Oscillate Rotation (or any single value)

    Creates an oscillating motion between two specified values over a specified period of time (in seconds).
    Use Expresso angles or sliders for “from”, “to”, and an Expresso slider assigned to “period” for fine control. You can apply these to
    any layer.

    Change “linear” to “ease” for smoother interpolation.

    from = -45; //one end of your oscillation
    to = 45; //the other end of your oscillation
    period = 1.5; //time between oscillation points (multiply by 2 for a round trip)
    t = time % (period * 2);
    if (t > period) t = 2 * period - t;
    linear(t, 0, period, from, to)


    ------------------------------------------------

    Bounce

    Creates a bouncing (sine wave) motion between two specified 2-dimensional positions over a specified period of time (in seconds).
    Useful for creating bouncing balls.
    Use Expresso position controls for “from”, “to”, and an Expresso slider assigned to “period” for fine control.

    You can apply these to any layer.

    surface = [320, 480]; //the position of the “bounce” surface
    apogee = [320, 50]; //the “apogee” of the bounce
    period = 1.5; //the length of time from surface to apogee
    t = time % (period * 2);
    if (t > period) t = 2 * period - t;
    linear(Math.sin(t * Math.PI / period), 0, 1, surface, apogee)


    ------------------------------------------------

    Wiggle from Leader

    These two expressions create a “follow the leader” effect. One works from the top down, the other from the bottom up. Only use one.
    A follower will tag along after the leader, deviating from the path according to the wiggle properties that are specified in the
    inputs.Once applied to a single follower, you can duplicate the layer as many times as you like and each subsequent copy will follow
    along, offset in time from the last and wiggling uniquely. In this expression, the wiggle is based on the position of the leader.
    Link Expresso sliders to lag (to interactively control how bunched togeher the layers are), winfreq (to control the frequency of the
    wiggle) and wigamp (to control the amplitude of the wiggle). Apply Expresso effects to the leader only.

    Change the word “Leader” to match the name of the leading layer.

    //USE THIS ONE IF THE LAYERS STACK UP FROM BOTTOM LEADER

    lagtime = .1;
    wigfreq = 3; //wiggle frequency
    wigamt = 30; //wiggle amount
    adj = (this_comp.num_layers - index) * lagtime;
    this_comp.layer("Leader").position.wiggle(wigfreq, wigamt, 2, .5,time - adj)


    //OR...

    //USE THIS ONE IF THE LAYERS STACK DOWN FROM TOP LEADER


    lagtime = .1;
    wigfreq = 3; //wiggle frequency
    wigamt = 30; //wiggle amount
    adj = (index - 1) * lagtime;
    this_comp.layer("Leader").position.wiggle(wigfreq, wigamt, 2, .5,time - adj)


    ------------------------------------------------

    Wiggle from Previous

    This creates a “follow the leader” effect that works from the bottom up. A follower will tag along after the previous layer, deviating
    from the previous path according to the wiggle properties that are specified in the inputs. Once applied to a single follower, you can
    duplicate the layer as many times as you like and each subsequent copy will follow along, offset from the last in time and wiggling
    uniquely. In this expression, the wiggle is based on the position of the previous layer.
    Link Expresso sliders to lag (to interactively control how bunched togeher the layers are), winfreq (to control the frequency of the
    wiggle) and wigamp (to control the amplitude of the wiggle). Apply Expresso effects to the leader only.

    Change the word “Leader” to match the name of the leading layer.

    //USE THIS ONE IF THE LAYERS STACK UP FROM BOTTOM LEADER

    lagtime = .1;
    wigfreq = 3; //wiggle frequency
    wigamt = 30; //wiggle amount
    adj = (this_comp.num_layers - index) * lagtime;
    this_comp.layer(this_layer, 1).position.wiggle(wigfreq, wigamt, 2, .5,time - adj)


    //OR...

    //USE THIS ONE IF THE LAYERS STACK DOWN FROM TOP LEADER


    lagtime = .1;
    wigfreq = 3; //wiggle frequency
    wigamt = 30; //wiggle amount
    adj = (index - 1) * lagtime;
    this_comp.layer(this_layer, -1).position.wiggle(wigfreq, wigamt, 2, .5,time - adj)


    ------------------------------------------------

    2D Look At

    Apply this Expression to the Rotation channel of any layer you wish to control,
    Set LookAt, below, to the name of the layer you wish the layer to look at.
    If the controlled layer is not initially pointing straight up, enter an offset amount in degrees, below, to adjust the direction it is
    looking.

    LookAt = "ball"
    offset = 0
    diffx = position[0] - this_comp.layer(LookAt).position[0];
    diffy = position[1] - this_comp.layer(LookAt).position[1];
    if (diffx == 0) {
    diffx = 1 }
    sign = 1 + (-1 * (diffx / Math.abs(diffx))) * 90;
    radians_to_degrees(Math.atan(diffy/diffx)) + sign + offset


    ------------------------------------------------

    3D Look At

    Apply this expression to the orientation channel of the layer you wish to have look at another layer (the layer being controlled).
    Enter the name of the layer to look at in LookAt below. If the layer being controlled does not correctly look at other layer, adjust the
    layer offset by changing the X, Y and Z rotation values (not the orientation values) for the layer being controled.

    LookAt = "ball"
    look = look_at(position, this_comp.layer(LookAt).position);
    [look[0], look[1], look[2]]


    ------------------------------------------------

    Angle of View Zoomer

    This allows you to control the angle of view of acamera interactively, by scaling a null object on screen.

    To use: Create a null called "angle_zoomer".
    Animate the null's scale to control viewing angle in degrees.


    substitute = this_comp.layer("angle_zoomer").scale[1];
    this_comp.width / (2 * Math.tan(degrees_to_radians(substitute/2)))


    ------------------------------------------------

    Focal Length Zoomer

    This expression will allow you to zoom a camera in After Effects using real-world focal length values.

    To use this expression:
    1. create a camera in after effects
    2. create a null layer called "focal_zoomer" and turn off its visibility switch in the timeline
    3. apply the expression below to the Zoom parameter of the camera
    4. set the value of hFilmPlane in the expression to the size of your film, in milimeters
    5. animate the null's scale to control the focal length of the camera, in milimeters


    hFilmPlane = 35;
    FocalLength = this_comp.layer("focal_zoomer").scale[1];
    this_comp.width * (FocalLength/hFilmPlane)


    ------------------------------------------------

    Camera Autofocus

    Apply this expression to the Focus Distance of your camera, then change the name "Focus Layer" below, to the namer of the layer
    you wish to keep in focus

    focuser = "Focus Layer";
    cam_to_layer = sub(this_comp.layer(focuser).position, position);
    length(cam_to_layer)

    ------------------------------------------------













  2. #2
    عضو متميز
    صور رمزية mazination
    تاريخ التسجيل
    Jul 2005
    المنطقة
    مصر
    العمر
    34
    ردود
    1,154
    Connector

    These Expressioss can be used to make a connector that stretches like a rubber band between two layers, which by default are named
    “End 1” and “End 2”. Obviously you can change these names to anything you like. The connector layer wants to be a horizontal
    rectangle, with the anchor point of the layer moved to the left center edge of the layer.
    The connector has 3 separate expressions applied to it: one for position, one for rotation and one for scale. The Expressions are
    listed separately below.

    // apply this Expression to the Connector layer's Position parameter

    // set follow1 below to the name of the first layer to follow


    follow1 = "End 1"
    this_comp.layer(follow1).position

    ________________

    // apply this Expression to Connector layer's Rotation parameter

    // set follow2 below to the name of second layer to follow


    follow2 = "End 2"
    diff = sub(position,this_comp.layer(follow2).position);
    (Math.atan2(diff[1],diff[0]) * 180/Math.PI) + 180

    ________________

    // apply this Expression to Connector layer's Scale parameter

    // set follow2 below to the name of second layer to follow


    follow2 = "End 2"
    stretch = length(position,this_comp.layer(follow2).position);
    [stretch,scale[1]];


    ------------------------------------------------

    Gears

    This Expression causes one gear to rotate at the proper speed when a second gear next to it is rotated, so that the two gears stay
    meshed with each other. To use this expression, first create and import two gears that mesh together properly. In order for two gears
    to mesh properly, the ratio of the difference in size between the two gears must equal the ratio of the difference in the number of teeth
    between the two gears. Once imported, decide which gear will be the Leader and which will be the Follower.

    Apply the Expression
    below to the Rotation parameter of the Follower gear. Then set the LayerToFollow, in the Expression, to the name of the Leader
    gear. Set the Ratio in the expression to the size of the Leader, relative to the Follower.


    LayerToFollow = "Leader";
    Ratio = 3/4
    mul((this_comp.layer(LayerToFollow).rotation) * Ratio, -1)


    ------------------------------------------------

    Path Text Leveler

    This Expression will automatically keep the text in Path Text level within the comp. Useful for when you simply want to make a
    straight line or paragraph of text in Path Text, without making it follow a path. It allows you to use the extra kerning, spacing and
    other features of Path Text with ordinary straight text.

    To use this Expression:
    1. Set the Shape Type to "Line" under Path Options in the effects window for Path Text
    2. Past the expression (below) into the "Vertex 2" parameter of Path Text in the Timeline
    3. Use only Vertex 1 of the path to position the text.

    radius = 75; // the radius of the circle
    cycle = 1; // number of seconds to complete a circle; higher value = slower
    phase = 27; // initial angle in degrees from bottom
    reverse = 1; // 1 for ccw, -1 for cw
    x = Math.sin( reverse * degrees_to_radians(time * 360 / cycle + phase));
    y = Math.cos(degrees_to_radians(time * 360 / cycle + phase));
    add(mul(radius, [x, y]), position)

    ------------------------------------------------

    Temporary Parenting

    Using the analogy of an eagle picking up a fish and dropping it in a nest, these two expressions can be used to parent one layer to
    another for only a portion of a longer animation.

    1. Apply the first expression below to the position channel for a null. Set "layertofollow" to name of "eagle" layer. Set pickup and
    dropoff time values to times for pickup and dropoff, in seconds.

    2. Apply the second expression to the rotation channel for the null. Set "layertofollow" to name of "eagle" layer. Set pickup and
    dropoff time values to times for pickup and dropoff, in seconds


    pickuptime = 1.53333;
    dropofftime = 5.0;
    layertofollow = "eagle"
    ticker = Math.min(Math.max(pickuptime, time), dropofftime);
    this_comp.layer(layertofollow).position.value_at_time(ticker)

    _____________________

    pickuptime = 1.53333;
    dropofftime = 5.0;
    layertofollow = "eagle"
    ticker = Math.min(Math.max(pickuptime, time), dropofftime);
    this_comp.layer(layertofollow).rotation.value_at_time(ticker)


    ------------------------------------------------

    Track Effect Parameter

    This expression will track any effect point on a layer, regardless of size, position, or scale of the layer, and translate it to positional
    values that are relative to the comp. For example, For example, you could have a small layer with corner pin applied, and use this
    expression to track another layer to the lower right corner of the effect, regardlessa of how the layer is moved. This expression will
    not take into account the scale or rotation of the source layer.

    // Apply this expression to the position parameter of any layer.

    // Set the LayerToFollow to the layer who's effect parameter

    // you want to follow. Set the EffectToFollow to the name of the

    // effect who's parameter you want to follow. Set the ParamToFollow

    // to the name of the parameter within the effect you want to follow

    // The layer this is applied to will follow the effect parameter.


    LayerToFollow = "Corner Pinned Layer";
    EffectToFollow = "Corner Pin";
    ParamToFollow = "Lower Right";
    effectlayer = this_comp.layer(LayerToFollow)
    effectparam = effectlayer.effect(EffectToFollow).param(ParamToFollow);
    layposx = effectlayer.position[0];
    laywid = effectlayer.width;
    layheit = effectlayer.height;
    layposy = effectlayer.position[1];
    effectposx = effectparam[0];
    effectposy = effectparam[1];
    [(layposx + effectposx - (.5 * laywid)), (layposy + effectposy - (.5 * layheit))
    ]
    [/CENTER][/SIZE]

  3. #3
    عضو متميز
    صور رمزية mazination
    تاريخ التسجيل
    Jul 2005
    المنطقة
    مصر
    العمر
    34
    ردود
    1,154
    طبعا مااحد بيفهم هذه الاكواد الأ المحترفين فقط .

    بس عموما هي مفيدة جدا جدا جدا جدا

    ساعات بنشوف اعمال اجنبية ونذهل عندما نري حركة غريبة او تأثير ونقول كيف يعمل
    وساعات بنعمل بجهد كبير حتي نصل الي ماشاهدناه واكيد ليس 100 في ال100

    لكن عند تطبيك مانراه بأيدينا مع الExpression يعطيك النتيجة المرجوة




    عموما معلومة بسيطة جدا....
    الشركات الاجنبية مابشتغلش اي مصمم اي كان نوعه الا, لازم يكون بيعرف برمجة
    ولو لاحظتم شوية هاتلاقوا ان كل البرامج المشهورة يتم استخدام البرمجة فيها

  4. #4
    عضو نشيط
    صور رمزية saud_alali
    تاريخ التسجيل
    Nov 2003
    المنطقة
    دولة الكويت
    العمر
    44
    ردود
    598
    اهلا اخي مازن
    ومشكور على Expression
    والله هذي Expression في الافتر ايفكت عجيبة
    ولكن الاعجب انها ليست منتشرة في النت او يوجد لها كتب
    ولكن كيف يتم تعليمها ؟

  5. #5
    عضو متميز
    صور رمزية mazination
    تاريخ التسجيل
    Jul 2005
    المنطقة
    مصر
    العمر
    34
    ردود
    1,154
    يوجد كل شيئ في Amazone

  6. #6
    عضو متميز
    صور رمزية لوكي لوك
    تاريخ التسجيل
    Jan 2005
    المنطقة
    الجزائر
    العمر
    35
    ردود
    2,930
    هل تجيد انت هذا النوع من البرمجة ؟

    ادا كان كذالك اشرح لنا شوية
    مصيبة الألف ميل تبدأ بخطوة
    صفحتي على فايسبوك

  7. #7
    عضو متميز
    صور رمزية mazm
    تاريخ التسجيل
    Aug 2006
    ردود
    1,096
    http://www.aenhancers.com/
    على ما اظن ان الموقع ده مفيد جداً

    الف شكر اخي mazination على هذه المجهود
    لا حول ولا قوة إلا بالله
    I Do Not Have Arabic Keyboard
    To KNOW and NOT to DO, is really NOT to KNOW
    Learn from Doing, not by Dreaming

  8. #8
    عضو فعال
    صور رمزية kh_kira
    تاريخ التسجيل
    Mar 2006
    المنطقة
    << Egypt >>
    العمر
    31
    ردود
    266
    جامده جدااا ( شكراااااا mazination )
    اللّهُ لاَ إِلَـهَ إِلاَّ هُوَ الْحَيُّ الْقَيُّومُ ۚ
    <<<<<<<<<<<>>>>>>>>>>>
    © KH KIRA
    Graphics

  9. #9
    مشرف سابق
    صور رمزية bashvideo
    تاريخ التسجيل
    Dec 2003
    المنطقة
    دولة الكويت
    العمر
    40
    ردود
    1,425
    شكرا لكم جميعا

  10. #10

  11. #11
    عضو
    صور رمزية mido007
    تاريخ التسجيل
    Dec 2005
    المنطقة
    المغرب / الدار البيضاء
    العمر
    35
    ردود
    55
    مشكور أخي mazination على هده Expressions ..صراحة هي مفيدة جدا إدا أردت الإحتراف في
    AE لكنها معقدة جدا جدا ..فنسأل الله عز و جل أن ييسر فهمنا لها لكي نرقى بأمتنا آمييييين
    هذا موقعي لمن يريد تعلم المنتاج و Motion Graphics
    وفيه أيضا سيرتي الذاتية
    http://mahmoudmougada.blogspot.com

  12. #12
    عضو متميز
    صور رمزية mazination
    تاريخ التسجيل
    Jul 2005
    المنطقة
    مصر
    العمر
    34
    ردود
    1,154
    اشكركم علي تفاعلكم.... واخص الاخ mazm علي موقع الجميل

    عموما انا اساسا متخرج من معهد Computer Sceince بس للأسف طبعا نسيت كل حاجة, بس عموما برضه انا نفسي اتعلم السكريبتات بتاعت الافتر لأنها فيدة جدا ولا غني عنها, وبترفع من مستوي المصمم, الي بعد اخر. وان شاء الله اول كل مااعرف حاجة مفيدة سوف انشرها بأذن الله

  13. #13
    @@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@



    السلام عليكم ورحمة الله وبركاته

    نضعها في المفضلة

    جزاك الله خيرا كثيرا


    @@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@

  14. #14
    عضو فعال
    تاريخ التسجيل
    Jul 2005
    ردود
    221
    مشكور ربي يعطيك العافيه جدا رائع ..

    لما علمتني على reciclye طمعت وبغيت اسألك عن باجي الحركات هههه لكن يعطيك العافيه ماقصرت

  15. #15
    عضو متميز
    صور رمزية mazination
    تاريخ التسجيل
    Jul 2005
    المنطقة
    مصر
    العمر
    34
    ردود
    1,154
    To place a single layer randomly in Z space, place this expression in the position stream of your layer :

    - السكريبت ده علشان يضع قيمة عشوائية في خانة الZ للحركة Posintion
    - طبعا علشان يشتغل الكود لازم نضع الكود في خانة الPosition

    كود:
    dist = wiggle(0,5)+5; //generates a locked random value between 0 and 10.
    [value[0],value[1],dist[2]] //applies value only to the z axis

  16. #16
    عضو متميز
    صور رمزية mazination
    تاريخ التسجيل
    Jul 2005
    المنطقة
    مصر
    العمر
    34
    ردود
    1,154
    This expression creates a flickering effect on a layer - similar to a flickering neon light.

    - السكريبت ده بيعملك شكل زي اللمبة النيون البايظة. الي تقعد تنور وتطفي كثيرا.
    - يضع السكريبت في خانة الOpacity

    كود:
    // HIGHER values for probability make a random opacity LESS likely.
    // A value of 1 will always create a random opacity, a value of 2 will
    // create a random opacity 50% of the time, value of 4 will be 25%, etc.
    
    probability = 6;
    
    // "opacity_normal" is the value set for opacity when the a random
    // opacity is NOT chosen.
    
    opacity_normal = 100;
    
    x = random(probability);
    
    if (x <= 1) {
       opacity = random(100);
    } else {
    opacity = opacity_normal;
    }

  17. #17
    عضو متميز
    صور رمزية mazination
    تاريخ التسجيل
    Jul 2005
    المنطقة
    مصر
    العمر
    34
    ردود
    1,154

    oscillating look

    This expression, to be applied to the rotation stream of a layer, will create a realistic oscillating look.
    It was created by Brian Maffit and Michael Natkin. It can be found on the bonus CD of the Total Training AE 6 DVD.


    السكريبت ده, بيطبق علي خانة الدوران في اللير Rotaion, وده هايعطيك شكل متزبزب , مثلا زي اهتزازات الدوائر الإلكترونية.
    السكريبت ده برمج بواسطة الاستاز,Brian Maffit تبع شركة توتال تريننينج.

    كود:
    from = -45; //one end of your oscillation
    to = 45; //the other end of your oscillation
    period = 1.5; //time between oscillation points (multiply by 2 for a round trip)
    t = time % (period * 2)
    if (t > period) t = 2 * period - t;
    ease(t, 0, period, from, to)
    اتبع التعليمات الاتية:
    1- اعمل لير جديدة, تكون صغيرة
    2- طبق السكريبت في خانة الRotation
    3- اضف افيكت Angle Control
    4- افتح خانة الكود وعلم في اول سطر علي رقم 45-
    5- وانت معلم علي الرقم اربط السكريبت بخانة الAngle في افيكت الAngle Control
    6- حرك واللعب في خانة الAngle


    لو معرفتش تنفذ التعليمات الكتابية اتبع الصور






  18. #18
    عضو متميز
    صور رمزية لوكي لوك
    تاريخ التسجيل
    Jan 2005
    المنطقة
    الجزائر
    العمر
    35
    ردود
    2,930
    جميل جدا واصل ارجوك

    تحياتي
    مصيبة الألف ميل تبدأ بخطوة
    صفحتي على فايسبوك

  19. #19
    السلام عليكم

    رائع اخى Mazination ياريت تثبيت هذا الموضوع وكل من يعرف سكريبت يدلى بدلوه .
    الله يجزيك الثواب . .
    اللهم وفقنا لما تحبه وترضاه .
    اللهم أنى أسألك العفو والعافية .

  20. #20
    مشرف منبر Video Editing
    صور رمزية Steady Cam
    تاريخ التسجيل
    Sep 2002
    المنطقة
    RIYADH
    ردود
    6,357
    بدينا من صفر في الافتر ؟..
    اجل ما عندنا سالفة في هالبرنامج .. !
    -







    Could it be you Or do I lose my way

    I'm here but Colorblind



    -

Bookmarks

قوانين الموضوعات

  • لا يمكنك اضافة موضوع جديد
  • لا يمكنك اضافة ردود
  • لا يمكنك اضافة مرفقات
  • لا يمكنك تعديل مشاركاتك
  •  
  • كود BB مفعّل
  • رموز الحالة مفعّل
  • كود [IMG] مفعّل
  • [VIDEO] code is مفعّل
  • كود HTML معطل