In this tutorial I'll walk you through the process for this looping donut mini gun animation. This isn't a step by step tutorial, rather a walk through of the project file and the techniques used. This animation is a variation of one by cubstudio I recreated for a student recently, you can view the process for recreating that animation here: • Video
► Download the FREE project file: https://thevideoshop.gumroad.com/l/eygbd
► Download my other free project files: https://gumroad.com/thevideoshop
► Cubstudio: / cubstudio
► James Curran: http://www.slimjimstudios.com/
► Looping wiggle expression for camera position:
freq = 1.2;
amp = 60;
loopTime = thisComp.layer(":: control ::").effect("loop time")("Slider");
t = time % loopTime;
wiggle1 = wiggle(freq, amp, 1, 0.5, t);
wiggle2 = wiggle(freq, amp, 1, 0.5, t - loopTime);
linear(t, 0, loopTime, wiggle1, wiggle2)
► Distance to camera expression for sprinkles:
startFade = thisComp.layer(":: control ::").effect("start scale")("Slider"); // Start fade 500 pixels from camera.
endFade = thisComp.layer(":: control ::").effect("end scale")("Slider"); // End fade 1500 pixels from camera.
try{ // Check whether there's a camera.
C = thisComp.activeCamera.toWorld([0,0,0]);
}catch(err){ // No camera, so assume 50mm.
w = thisComp.width * thisComp.pixelAspect;
z = (w/2)/Math.tan(degreesToRadians(19.799));
C = [0,0,-z];
}
P = toWorld(anchorPoint);
d = length(C,P);
linear(d,startFade,endFade,100,0)
► Random colour expression for sprinkles:
var color1 = thisComp.layer(":: control ::").effect("colour 01")("Color");
var color2 = thisComp.layer(":: control ::").effect("colour 02")("Color");
var color3 = thisComp.layer(":: control ::").effect("colour 03")("Color");
var color4 = thisComp.layer(":: control ::").effect("colour 04")("Color");
var color5 = thisComp.layer(":: control ::").effect("colour 05")("Color");
var color6 = thisComp.layer(":: control ::").effect("colour 06")("Color");
colors=[color1,color2,color3,color4,color5,color6];
slider=effect("Slider Control")("Slider");
engine=Math.floor(time/slider);
seedRandom(engine,true);
colorChoose=Math.floor(random(colors.length));
colors[colorChoose];
► Random position expression for sprinkles:
seedRandom(index,true);
xvar = thisComp.layer(":: control ::").effect("X")("Slider");
yvar = thisComp.layer(":: control ::").effect("Y")("Slider");
zvar = thisComp.layer(":: control ::").effect("Z")("Slider");
x = random(-xvar,xvar);
y = random(-yvar,yvar);
z = random(-zvar,zvar);
[x,y,z];
The Video Shop Long Play: / @thevideoshoplongplay
Chapters:
0:00 - Intro
1:29 - Camera Rig
7:02 - Smoke
=============================================================
► Subscribe for more tutorials like this: / @thevideoshoplondon
=============================================================
► If you have any questions just let me know in the comments.
Please leave a like if you'd like more tutorials like this.
► If you want to take any of the courses I teach you can find details of upcoming classes here: https://www.thevideoshoplondon.com/Te...
► Find me: https://linktr.ee/TheVideoShop
#aftereffectstutorial #animation #motiondesign #aftereffectsexpressions #loopinganimations