Tag Archive for: after effects expressions wiggle

Flicker Opacity Expression

//FLICKER OPACITY blinkSpeed =10; n = Math.sin(time*blinkSpeed); if (n<=0) 0 else 100; This After Effects expression is intended to create a flickering effect by adjusting the opacity of a layer over time. Here’s how it works: In summary, this expression creates a flickering effect by modulating the opacity of a layer based on a sine […]

Oscillate Position on X-Axis Expression

//OSCILLATE POSITION BACK AND FOURTH ON X AXIS: amplitude = 10; frequency = 3; temp=amplitude*Math.sin(time*frequency)+amplitude; // add the result to the current x pos temp=temp+transform.position[0]; //plug the new x into slot 0. y is currently left unchanged [temp, transform.position[1]]

Make a Layer Bounce Expression

//MAKE A LAYER BOUNCE: bounceSpeed=7; flight=01; bounceHeight=3.5; t=Math.abs((time*2*bounceSpeed)%2-1); t=linear(t,flight,0,0,1); b=Math.cos(t*Math.PI/2); value – [0,bounceHeight*b]; This After Effects expression is designed to create a bouncing animation effect for a layer. Let’s go through it step by step: In summary, this expression creates a bouncing animation effect for a layer based on the current time. Adjusting the variables […]

Flicker in to 100% Opacity Expression

To create an After Effects expression that flickers an object’s opacity to 100%, you can use the wiggle() function to generate random flickering and then gradually increase the opacity. Here’s an expression that achieves this effect: // Adjust this flicker frequency to your taste var flickerFrequency = 5;// Generate flickering effect var flicker = wiggle(flickerFrequency, […]

Bounce on Marker Event Expression

//BOUNCE ON MARKER EVENT (put in scale): n = 0; if (marker.numKeys > 0){ n = marker.nearestKey(time).index; if (marker.key(n).time > time){ n–; } } if (n == 0){ value; } else { max_dev=20; // max deviation in pixels spd=20; //speed of oscillation decay=6; //how fast it slows down t = time – marker.key(n).time; s = […]

Pendulum Swing Expressions

//PENDELUM SWING: veloc = 10;  //how fast it swings amplitude = 50;  //how high decay = .999; amplitude*Math.sin(veloc*time)/Math.exp(decay*time); ———————————————————————————— //PENDULUM SWING ON MARKER EVENT(put in rotation): n = 0; if (marker.numKeys > 0){ n = marker.nearestKey(time).index; if (marker.key(n).time > time){ n–; } } if (n == 0){ value; } else { veloc = 10;  //how […]

Oscillate Layer in an Elipse Expression

//OSCILLATE LAYER IN AN ELLIPSE: //Custom Adjustments: radiusDistX = 30;  //set to zero for up/down oscillation radiusDistY = 100;  //set to zero for sideways oscillation period = 1; // DON’T ADJUST value + [Math.sin(time*period)*radiusDistX, -Math.cos(time*period)*radiusDistY]

Add $ and Comma at thousandth place Expression

//ADD A “$” AND “,” AT THE THOUSANDS PLACE ONLY: //ADD SLIDER CONTROL TO TEXT var stringSlider=”$”+Math.round(effect(“Value”)(“Slider”).value); if (stringSlider.length > 3){ stringSlider.substr(0, stringSlider.length -3) + “,” + stringSlider.substr(-3); } else { stringSlider } This After Effects expression is designed to add a dollar sign ($) and a comma (,) at the thousands place in a […]

Load External .TXT in AE Text Layer Expression

//CALL EXTERNAL .TXT FILE TO LOAD IN AE TEXT BOX try{ myPath = “~/Desktop/source.txt”; $.evalFile(myPath); eval(thisComp.name)[0]; }catch(err){ “MISSING”; } //SCRIPT TO PLACE IN .TXT FILE var comp1 = [“Text 0”, “Text 1”, “Text 2”]; var comp2 = [“Text 0”, “Text 1”, “Text 2”]; var comp3 = [“Text 0”, “Text 1”, “Text 2”]; var comp4 = […]

Z Position Fade Out Expression

//USE Z POSITION RANGE TO CONTROL OPACITY: fullOnZ = -900; //z value where you want opacity to be 100%; fullOffZ = 2700; //z value where you want opacity to be 0%; num = 100-(100*(transform.position[2]+(fullOnZ*-1))/fullOffZ); //this step allows you to keep existing opacity keyframes //by adding our formula result to the existing opacity num = num […]