返回列表 回复 发帖

视频后期合成包装你用什么?

Check out the following scripts. Follow the instructions and copy and paste them into your motion math window and save
or

copy and paste to a simpletext or word processing document and save with an "" extension. Then open Motion Math, and load the file into it.

3D Tilt/Tint
by Brian Maffitt, MAFF/x
with an awful lot of help from
Scott Snibbe, Adobe Systems
This script is designed to change the "back" of a layer to a solid color as it tilts or swivels away from you using the Basic 3D filter.

You need to have the "Tint" filter and the "Basic 3D" filter already applied to the layer (in that order). The Basic 3D filter should already be animated, and the "Map Black to" and "Map White to" colors should be set to the same color values.

Copy and paste the following into your motion math window (and don't forget to save it!).


//3D Tilt/Tint
//by Brian Maffitt, MAFF/x
//with an awful lot of help from
//Scott Snibbe, Adobe Systems

//This script is designed to change the "back" of a layer to a solid color as it
//tilts or swivels away from you using the Basic 3D filter.

//You need to have the "Tint" filter and the "Basic 3D" filter already applied to the layer
//  (in that order).
//The Basic 3D filter should already be animated, and the "Map Black to" and "Map White
// to" colors should be set to the same color values.

//      LAYER                             PROPERTY                     CHANNEL
//      ------                           ----------                    --------
// 1: Your rotating layer          Tint/Amount to tint               doesn't matter
// 2: Your rotating layer        Basic 3D/Tilt (or swivel)           doesn't matter

raw_angle = value(pop_layer(2), pop_property(2)) [pop_channel(2)];

// Convert angle to 0-360 range
angle = fmod(raw_angle, 360);
if (angle < 0) angle = angle + 360;

if ((angle >= 90.0) && (angle <= 270))
   value(pop_layer(1), pop_property(1)) [pop_channel(1)] = 100.0;
else
   value(pop_layer(1), pop_property(1)) [pop_channel(1)] = 0.0;
有钱就怕不够有钱,穷又不够穷

3D Tilt/Transparency

by Brian Maffitt, MAFF/x
with an awful lot of help from
Scott Snibbe, Adobe Systems
This script is designed to change the "back" of a layer to another texture as it tilts or swivels away from you using the Basic 3D filter.

You need to have two layers, a front texture layer and a back texture layer. Both layers should be the same size and position, although the back layer could be slightly larger if you want a "frame" effect.

Copy and paste the following into your motion math window.

Make sure the layers are comps with enough extra room for the 3D filter to work.

Apply the Basic 3D filter to both layers.

Animate the tilt/swivel of the foreground layer to taste, and use motion math or copy keyframes to make the two layers rotate simultaneously.

Copy and paste the following into your motion math window (and don't forget to save it!).


//3D Tilt/Transparency
//by Brian Maffitt, MAFF/x
//with an awful lot of help from
//Scott Snibbe, Adobe Systems

//This script is designed to change the "back" of a layer to another texture as it
//tilts or swivels away from you using the Basic 3D filter.

//You need to have two layers, a front texture layer and a back texture layer.
//Both layers should be the same size and position, although the back layer could be
//   slightly larger if you want a "frame" effect.

//Make sure the layers are comps with enough extra room for the 3D filter to work.

//Apply the Basic 3D filter to both layers.

//Animate the tilt/swivel of the  foreground layer to taste, and use motion math
//   or copy keyframes to make the two layers rotate simultaneously.

//      LAYER                           PROPERTY                   CHANNEL
//      ------                         ----------                  --------
// 1: Foreground layer                  Opacity                 doesn't matter
// 2: Either layer               Basic 3D/Tilt (or swivel)      doesn't matter

raw_angle = value(pop_layer(2), pop_property(2)) [pop_channel(2)];

// Convert angle to 0-360 range
angle = fmod(raw_angle, 360);
if (angle < 0) angle = angle + 360;

if ((angle >= 90.0) && (angle <= 270))
   value(pop_layer(1), pop_property(1)) [pop_channel(1)] = 0.0;
else
   value(pop_layer(1), pop_property(1)) [pop_channel(1)] = 100.0;
有钱就怕不够有钱,穷又不够穷

Apply from Effect Point - Version 1.1

This Program Sets the value of the first set of popups to the value of the second set of popups multiplied by "scale_factor". It assumes that the first value is a position value and the second value is an effect point control.

Copy and paste the following into your motion math window (and don't forget to save it!).


// Apply from Effect Point - Version 1.1
// This Program Sets the value of the first set of popups to the value of the second set of
//  popups multiplied by "scale_factor".
// It assumes that the first value is a position value and the second value is an effect
// point control.

//      LAYER                                       PROPERTY                       CHANNEL
//      ------                                     ----------                      --------
// 1: layer to copy effect position to               Position             channel of position property
// 2: layer which has an effect                effect point control       channel of effect point control

// Since effect point controls are expressed in layer coordinates,
// we must wrap the evaluation of the effect point with "layer_to_comp" so
// that the layer coordinates are transformed to comp coordinates.

scale_factor = 1.0;
value(pop_layer(1), pop_property(1)) [pop_channel(1)] =
  layer_to_comp(pop_layer(2),
    value(pop_layer(2), pop_property(2)) [pop_channel(2)]) * scale_factor;
有钱就怕不够有钱,穷又不够穷

Apply to Effect Point - Version 1.1

This Program Sets the value of the first set of popups to the value of the second set of popups multiplied by "scale_factor", assuming that the first property is an effect point.

Copy and paste the following into your motion math window (and don't forget to save it!).


// Apply to Effect Point - Version 1.1
// This Program Sets the value of the first set of popups
// to the value of the second set of popups multiplied by
// "scale_factor", assuming that the first property is an effect point.

//      LAYER                                 PROPERTY                         CHANNEL
//      ------                                ----------                       --------
// 1: layer which has an effect           effect point control       channel of effect point control
// 2: layer to copy position from              Position              channel of position property

// I assume that the first value is an effect
// point control, and so I wrap the evaluation in comp_to_layer,
// since effect point controls are defined in layer coordinates.

scale_factor = 1.0;        // change this to scale values as they are copied
value(pop_layer(1), pop_property(1)) [pop_channel(1)] =
  comp_to_layer(pop_layer(1),
value(pop_layer(2), pop_property(2)) [pop_channel(2)]) * scale_factor;
有钱就怕不够有钱,穷又不够穷

Blink - Version 1.1

This script varies opacity based on a cosine function. The three variables below control the blinking rate & opacity range. To use, select the layer whose opacity you wish to change in layer popup 1

Copy and paste the following into your motion math window (and don't forget to save it!).


//Blink - Version 1.1
// This script varies opacity based on a cosine function.
// The three variables below control the blinking rate & opacity range.
// To use, select the layer whose opacity you wish to change in layer popup 1

//      LAYER                                         PROPERTY                      CHANNEL
//      ------                                       ----------                     --------
// 1: Layer whose opacity to vary                  doesn't matter                doesn't matter
// 2: doesn't matter                               doesn't matter                doesn't matter

blink_speed = 1;        // blinks per second

low_opacity = 10.0;        // low opacity value

high_opacity = 90.0;        // high opacity value

opacity_range = high_opacity - low_opacity;

pi = 3.141592654;

op_normal = (cos(blink_speed * time() * pi * 2) + 1) / 2;

value(pop_layer(1), opacity) = (op_normal * opacity_range) + low_opacity;
有钱就怕不够有钱,穷又不够穷

Blurry motion capture

by Jim Tierney dionysis1@aol.com This script is beerware. If you use it, you owe me a beer at some future time to be determined in the future. If you make a lot of money using it, you owe me a six-pack.
Script determines motion blur direction and amount based on the movement of a layer

Copy and paste the following into your motion math window (and don't forget to save it!).



//Blurry motion capture
//by Jim Tierney dionysis1@aol.com
//This script is beerware. If you use it, you owe me a beer at some future time to be
//determined in the future. If you make a lot of money using it, you owe me a six-pack.

//Script determines motion blur direction and amount based on the movement of a layer

//      LAYER                                  PROPERTY                          CHANNEL
//      ------                                 ----------                       --------
// 1: The layer that is moving       Must be a position property              doesn't matter
// 2: Layer with motion blur                Motion blur direction                      doesn't matter

//The layer with motion blur, MUST have it applied as the FIRST effect.

//sc determines how much blur you get. The higher the sc value, the higher the blur length
//values. Use with caution, as a high number can significantly increase render times.

sc=1.0;//scale- increase to get more blur...  1.0 is default

vel=(velocity(pop_layer(1),pop_property(1))/(90/sc));//velocity adjusted for blur length
v2=value((pop_layer(1)),pop_property(1));//position current frame
v1=tmap((time()-step_time),value((pop_layer(1)),pop_property(1)));//position last frame
xv1=v1[0];
yv1=v1[1];
xv2=v2[0];
yv2=v2[1];
if (xv1==xv2)
                a=0;
        else
                a=((yv1-yv2) /(xv1-xv2));
at=rad_to_deg(atan(a)); // calculate angle
if (xv1>xv2) //what direction?
        at=at+90;
        else
                {if (xv1yv2)
                            at = 180;
                                                else
                                                        at=0;
      }

value(pop_layer(2),pop_property(2))=at; //assign blur direction
effect_value(pop_layer(2),0,2)=vel; // assign blur length2enter;
value(target, position)
有钱就怕不够有钱,穷又不够穷

Clock

by Chris Pelkie
Vice President/Scientific Visualization Producer
Conceptual Reality Presentations, Inc.
chrisp@tc.cornell.edu
A few weeks ago someone asked about showing seconds on a clock. Here's a motion math solution for a similar problem.

It may be too obscure: pester me and I'll find time to document it more clearly if you can't figure it out. The problem I was solving was to display a clock for a tsunami simulation (not a Psunami simulation, sorry Brian! this was the real thing, well, simulation of a real thing that hit Taiwan) which had simulation time steps on minutes and 10s or 20s intervals but which we laid the frames down on 2's since the researcher didn't have infinite time to simulate and render on 1's. Got that? (At each time: 1:00, 1:10, 1:20, 1:30, 1:40, 1:50, 2:00, ..., we had a frame that I laid on 2s). Anyway, it might point out a couple of oddball math tricks you might not have thought about. I presume it's obvious that you drive two different Numbers objects positioned next to each other (I put a static ":" between them) with the minutes and your choice of the seconds scripts below.


// Generates integer series for minutes clock
// for frames on 2's representing 10s interval pairs, set framesPerSimMin to 12
// then set Sample at to 2.5 samples/sec (30/12)
// for frames on 2's representing 20s interval pairs, set framesPerSimMin to 6
// then set Sample at to 5 samples per sec

framesPerSimMin = 6;

thisMin = floor(frame_num()/framesPerSimMin);

if (thisMin >= 60)
  thisMin = thisMin - 60;

value(pop_layer(1), pop_property(1)) [pop_channel(1)] = thisMin;
********* and here ***************

********** Cut here (Seconds on 10s.mm) *********

// Generates integer series for 10 second jump clock
// used for frames on 2's representing 10s interval pairs
// set sample at 15 samples/sec

theFrame = floor(frame_num()/2);

if ( theFrame >= 6 )
  theFrame = floor(fmod(theFrame,6));

thisSec = theFrame * 10;

value(pop_layer(1), pop_property(1)) [pop_channel(1)] = thisSec;
********* and here ***************

********** Cut here (Seconds on 20s.mm) *********


// Generates integer series for 20 second jump clock
// used for frames on 2's representing 20s interval pairs
// set sample at 15 samples/sec

theFrame = floor(frame_num()/2);

if ( theFrame >= 3 )
  theFrame = floor(fmod(theFrame,3));

thisSec = theFrame * 20;

value(pop_layer(1), pop_property(1)) [pop_channel(1)] = thisSec;
********* and here ***************
有钱就怕不够有钱,穷又不够穷

Eliptical motion

by JJ Gifford
This script applies a circular or elliptical motion to a target layer. It uses a secondary 'construction' layer to determine both the bounds and center of the circular/elliptical motion. The construction layer's position and scale can animate over time, creating some fairly elaborate motion paths.

Copy and paste the following into your motion math window (and don't forget to save it!).



// Eliptical motion

// This script applies a circular or elliptical motion to a
// target layer. It uses a secondary 'construction' layer  
// to determine both the bounds and center of the
// circular/elliptical motion. The construction layer's
// position and scale can animate over time, creating
// some fairly elaborate motion paths.

//      LAYER                         PROPERTY                     CHANNEL
//      ------                        ----------                   --------
// 1: Target layer                 doesn't matter                doesn't matter
// 2: Construction layer           doesn't matter                doesn't matter

target = pop_layer(1);
construct_layer = pop_layer(2);

// # of seconds per full revolution
period = 2;

// The secondary layer's scale * its dimensions = the ellipse's radii.
// Note: motion will be counter-clockwise if both x&y scales are positive or negative;
// motion will be clockwise if one scale is positive and the other negative.

xradius = (layer_size(construct_layer)[X] /2) * (value(construct_layer, scale)[x]/100);
yradius = (layer_size(construct_layer)[Y] /2) * (value(construct_layer, scale)[y]/100);

// Calculate basic elliptical motion
xposition = sin(deg_to_rad(360 * time()/period)) * xradius;
yposition = cos(deg_to_rad(360 * time()/period)) * yradius;

// find construction layer's center
xcenter = value(construct_layer, position) [X];
ycenter = value(construct_layer, position) [Y];

// Assign the elliptical motion to the target layer
value(target, position) [X] = xposition + xcenter;
value(target, position) [Y] = yposition + ycenter;
有钱就怕不够有钱,穷又不够穷

Gravitation

posted by pennerh@best.com for a friend.
This script simulates gravitational attraction, if some velocity is imparted to layer 1, you can put the layer into orbit. Also, try animating the attracting layer.

Copy and paste the following into your motion math window (and don't forget to save it!).


//posted  by pennerh@best.com for a friend.

// This script simulates gravitational attraction, if some velocity is imparted
// to layer 1, you can put the layer into orbit.
// Also, try animating the attracting layer.

//      LAYER                                               PROPERTY                     CHANNEL
//      ------                                              ----------                     --------
// 1: Layer affected by gravity                  doesn't matter               doesn't matter
// 2: Layer attracting layer #1                  doesn't matter               doesn't matter


if (time() == start_time) {
   p1 = value(pop_layer(1), position);
   p2 = value(pop_layer(2), position);

   last_p1 = tmap(time() - step_time, value(pop_layer(1), position));
   last_p2 = tmap(time() - step_time, value(pop_layer(2), position));

   v1 = (p1 - last_p1);
   v2 = (p2 - last_p2);

  // Set the masses of both layers here
        m1 = 1.0;
        m2 = 10000.0;

// gravitational constant
  g = 10.0;
} else {
  // inquire the position of the animated layer
  p2 = value(pop_layer(2), position);

  // calculate the vector between the two layers
  delta = p2 - p1;

   r = length(delta);                                                                 // the radius is the length of the delta vector
   delta = normalize(delta);

         f = delta * (g*(m1*m2)) / (r*r);  // gravitational equation f = g*m1*m2/r^2

  // calculate acceleration
  a = f;

  // add discrete acceleration to velocity
  v1 = (v1 + a);

   // update position of moving layer based on new velocity
   p1 = p1 + v1;

   // actually set the position of the laer
   value(pop_layer(1), position) = p1;
}
有钱就怕不够有钱,穷又不够穷

Invisible/Visible Script

Here's an AE script I've been using a lot this weekend. To use it, drop a bunch of stills/videos into a composition. Then select one of them (which one does not matter), and invoke Motion Math. The pop-ups in the Motion Math dialog don't matter. All that matters is the setting for how many times per second the script is invoked.
At each sample time, the script makes all layers invisible except a randomly chosen one. This helps you create a busy background where layers are continuously changing. The sample time determines how long between new frames.

Remember that the default will have each layer at 100% opacity for only a single frame, with linear interpolation between, so you get continuous dissolves. If you want jumps, simply click on the opacity setting for each layer and Toggle Hold Keyframe.

I haven't experimented yet to see if Motion Math remembers variables sample-sample, which would allows you to make sure that the same layer is not selected twice in a row. This would be helpful if you wanted a change at every beat, for example.

Copy and paste the following into your motion math window (and don't forget to save it!).


//  Invisible/Visible Script
//  Randomly pick one layer to be visible at each sample,
//  and make all others invisible.
//
n = 1 ;
while (n <= num_layers)
    {
    value (n, opacity) = 0 ;
    n = n + 1 ;
    }

r = floor (1 + random (1) * num_layers) ;
value (r, opacity) = 100 ;
有钱就怕不够有钱,穷又不够穷

Jitter

This script varies position based on a random function. The three variables below control the jitter rate & position range. To use, select the layer whose position you wish to change in layer popup 1
Copy and paste the following into your motion math window (and don't forget to save it!).


//Jitter
//
// This script varies position based on a random function.
// The three variables below control the jitter rate & position range.
// To use, select the layer whose position you wish to change in layer popup 1

//      LAYER                                               PROPERTY                     CHANNEL
//      ------                                              ----------                     --------
// 1: Layer to jitter                                                                                              doesn't matter                doesn't matter
// 2: doesn't matter                                  doesn't matter                doesn't matter

jitter_speed = 1;        // jitters per second

min_displace = 2.0;        // lowest displacement value

max_displace = 20.0;        // highest displacement value

displace_range = max_displace - min_displace;

pi = 3.141592654;

op_normal = (cos(jitter_speed * time() * pi * 2) + 1) / 2;

value(pop_layer(1), position) = (op_normal * displace_range) + min_displace;
有钱就怕不够有钱,穷又不够穷

Jim's Layer audio - Version 0.01

Modified Layer Audio by Jim Tierney
This script is Beerware. ;)

This Program scales the value of the first set of popups by the audio level of the layer in popup 2.

Copy and paste the following into your motion math window (and don't forget to save it!).


//Jim's  Layer audio - Version 0.01
//Modified Layer Audio by Jim Tierney
//This script is Beerware. ;)

// This Program scales the value of the first set of popups
// by the audio level of the layer in popup 2

//            LAYER                                      PROPERTY                    CHANNEL
//           -------                                    ----------                   --------
// 1: Layer to copy audio amplitude into                property to vary         channel of property
// 2: Layer with audio                                  doesn't matter            doesn't matter

//Set the Audio Maximum and Minimum Values (you'll need to run the
//original Layer Audio Script to get these. Run it and then just find
//the peaks and troughs of the audio and find the corresponding Scale
//value... turn into decimal.

Amax=0.459;

// You MUST put a zero before a decimal (e.g. 0.1, 0.00045, 0.01)

Amin=0.045;

//Set the Scale Maximum and Minimum Values that you want

Smax=120;
Smin=30;

A=layer_audio_amplitude(pop_layer(2)); //What's the current Audio level?

R=(Amax-Amin)/(Smax-Smin);

bigaudiodynamite=((A[1]-Amin)/R)+Smin;  

value(pop_layer(1), pop_property(1)) [pop_channel(1)] =  bigaudiodynamite;
有钱就怕不够有钱,穷又不够穷

Motion Blur Effect

This script sets values for the Motion Blur effect. It uses the positions of a layer and the duplicate of that layer. The position keyframes of the duplicate are offset forward in time by one frame.
(We're not sure who wrote this script, so if it was YOU, please drop us a line.)

Copy and paste the following into your motion math window (and don't forget to save it!).


//Motion Blur Effect
//
// This script sets values for the Motion Blur effect. It uses the
positions of a layer and
// the duplicate of that layer. The position keyframes of the duplicate
are
offset forward in
// time by one frame.

poserialserials_layer1 = value(pop_layer(1), position); //position of the original
layer
poserialserials_layer2 = value(pop_layer(2), position); //position of duplicate
layer
distance = dist(poserialserials_layer2, poserialserials_layer1); // Distance between layers

X1 = value(pop_layer(1), position) [0];
X2 = value(pop_layer(2), position) [0];
Y1 = value(pop_layer(1), position) [1];
Y2 = value(pop_layer(2), position) [1];

Xdiff = X2 - X1;
Ydiff = Y2 - Y1;

poserialserials_diff = poserialserials_layer1 - poserialserials_layer2;

// this assumes that motion blur is the first effect in the stack

effect_value("Insert Layer Here", 0, 1) = -
rad_to_deg(atan2(Xdiff, Ydiff)); // finds and sets the Motion Blur
angle.
effect_value("Insert Layer Here", 0, 2) = distance;
有钱就怕不够有钱,穷又不够穷

Particle Playground/Position

real world example... if I were standing in my urban, postage-stamp-sized lawn with a garden hose taped to my left shoulder pointing outwards, and I walked in a clockwise circle, the spray would always be going to my left in an arc relative to what my heading was.
This can also simulate the Tinkerbell Fairy Dust off of the wand in a swirling motion effect.

The MM script below should work. It could be better written, but see if it works for you. note: You must set property 1 to "Particle Playground/Position"

Hope this helps,
jens


//--------The Cult Effects Team---------
// Particle Playground must be the first effect applied
//
//Property 1  -  "Particle Playground/Position"

deltapos = tangent(pop_layer(1),pop_property(1));
curangle = rad_to_deg(atan2(deltapos[x],-deltapos[y]));
effect_value(pop_layer(1), 0, 5) = curangle - 90 ;        // +90 to flip side
有钱就怕不够有钱,穷又不够穷

Randomize

Another interesting math script from Dj Inchiki for AE.
Copy and paste the following into your motion math window (and don't forget to save it!).


// Randomize


// This Script applies randomness to the channel of ones choice.

// The Random(V) operator accepts round numbers from 1 to 4

// and can easily be multiplied times the scale_factor for larger

// changes.  


//      LAYER                                    PROPERTY              
      CHANNEL

//      ------                                    ----------           
         --------

// 1: Layer to copy apply effect to  property to vary           channel
of property

// 2: doesn't matter                        doesn't matter            
doesn't matter


scale_factor = 25.0;


value(pop_layer(1), pop_property(1)) [pop_channel(1)]  = random(1)  *
scale_factor;
有钱就怕不够有钱,穷又不够穷

Spiral

Adapted from a post from pennerh@best.com by Mark Logue

This script lets a property of layer 1 spiral out from its current position. Vary "rspeed" (to vary speed of motion from center out.) Vary "taspeed" (angular speed and use a neg. # for counterclockwise spiral.)

Copy and paste the following into your motion math window (and don't forget to save it!).


//Spiral
//Adapted from a post from pennerh@best.com by Mark Logue

//This script lets a property of layer 1 spiral out from its current position.
//vary "rspeed" (to vary speed of motion from center out.)
//vary "taspeed" (angular speed and use a neg. # for counterclockwise spiral.)

//      LAYER                         PROPERTY                       CHANNEL
//      ------                       ----------                     --------
// 1: Layer to Spiral                          property to vary             doesn't matter
// 2: doesn't matter              doesn't matter               doesn't matter

if (time() == start_time) { p0 = value(pop_layer(1), position);

rspeed = 0.5;
thetaspeed = 0.5;

} else {
r = frame_num() * rspeed;
theta = frame_num()*thetaspeed;

px = r * cos(theta);
py = r * sin(theta);

p = p0 + {px, py};

// actually set the position of the layer

value(pop_layer(1), pop_property(1)) = p;}
有钱就怕不够有钱,穷又不够穷

Sequence Still Frames

Version 1.0 by David G. Tecson, Edgeworx. April 14th, 1997

This script takes a set of layers in a comp and incrementally solos each as the comp steps through time. This is the elegant approach as compared to the brute force approach [not posted]. Make sure that your work area markers span a range of frames equal to the number of layers -- i.e., 400 layers equals 13:10. This is particularly handy when bringing in a Photoshop comp, and having to output or interpret it as a pict seqeunce

Copy and paste the following into your motion math window (and don't forget to save it!).


//Sequence Still Frames
// Version 1.0 by David G. Tecson, Edgeworx. April 14th, 1997

// This script takes a set of layers in a comp and incrementally solos each
// as the comp steps through time. This is the elegant approach as compared
// to the brute force approach [not posted]. Make sure that your work area markers
// span a range of frames equal to the number of layers -- i.e., 400 layers equals 13:10.
// This is particularly handy when bringing in a Photoshop comp, and having to
// output or interpret it as a pict seqeunce

// LAYER                                PROPERTY                  CHANNEL
// ------                              ----------                 --------
// 1: doesn't matter            doesn't matter         doesn't matter
// 2: doesn't matter            doesn't matter         doesn't matter


if (time() == start_time) {                    //initialize constants and counters
start_layer = 1;
curr_layer = start_layer;
ON = 100;
OFF = 0;

//initiliaze opacity on all layers (first = ON) (all others = OFF)

value(curr_layer, opacity) = ON;       // Set the start_layer on
curr_layer = curr_layer + 1;            // increment curr_layer prior to while loop
while (curr_layer <= num_layers) {      // loop over every layer
            value(curr_layer, opacity) = OFF;
    curr_layer = curr_layer + 1;
            }
        curr_layer = start_layer;       // reset counter to first layer

} else {

        if (curr_layer <= num_layers)  {
                value(curr_layer, opacity) = OFF;      // Turn off previous layer on this keyframe
                if (curr_layer < num_layers - 1)  {
                        value((curr_layer + 2), opacity) = OFF; // Preset the layer after
                        }
                }
        curr_layer = curr_layer + 1;                       // Advance to current layer
        if (curr_layer <= num_layers)  {
     value(curr_layer, opacity) = ON;             // Turn on current layer
             }
有钱就怕不够有钱,穷又不够穷

Time Remap Especial

Layer audio calculating current values - Version 1.0

This Program Sets the value of the first set of popups to the audio level of the layer in popup 2

Copy and paste the following into your motion math window (and don't forget to save it!).


//MVD Time Remap Especial
//www.mvd.org
//eugen@sil.at
// Layer audio calculating current values - Version 1.0

// This Program Sets the value of the first set of popups
// to the audio level of the layer in popup 2

//      LAYER                                               PROPERTY                     CHANNEL
//      ------                                              ----------                     --------
// 1: Layer to copy audio amplitude into    property to vary             channel of property
// 2: Layer with audio                                doesn't matter               doesn't matter

min = 0.0;
max = 10.0;
value(pop_layer(1), pop_property(1)) [pop_channel(1)] =

min + layer_audio_amplitude(pop_layer(2)) * (max - min)

+ time();
有钱就怕不够有钱,穷又不够穷