How to link separate paths with an expression to animate a continuous line
Project: http://workbench.tv/tutorials/2018-05-18_LinkedPaths
Patreon: http://patreon.com/workbench/
Merch: http://workbench.tv/products/merch/
Paypal: https://www.paypal.me/workbenchtv
Social
***********************************************************
Instagram: http://instagram.com/workbenchtv/
Twitter: https://twitter.com/workbench_tv
Facebook: http://facebook.com/workbenchtv
This week, we’re going to link paths on different layers using a slider so that we can animate them as if they’re a single stroke. This lets us easily pass lines around objects in 3D space without actually having to deal with 3D space and figuring out occlusion.
To start with this effect, you need to have a Controller null that has sliders for Start and End. Then you need a slider for either Elements or Bias depending upon which version of this technique you’re using. If you have multiple strokes, bias won’t work.
For multiple strokes this is the expression for start and end parameters in whatever stroke effect you’re using. Just change the parts that say “start” to “end” for the end parameter.
start = thisComp.layer(“Controller”).effect(“Start”)(“Slider”); //0
block = 100/thisComp.layer(“Controller”).effect(“Elements”)(“Slider”);
thisNum = thisLayer.name.substr(1,2);
rStart = (thisNum-1)*block;
rEnd = thisNum*block;
linear(start,rStart,rEnd,0,100);
For two strokes where you need to control the bias, this will work for start/end parameters. Again, be sure to replace “start” with “end” for the end parameter.
bias = thisComp.layer(“Controller”).effect(“Bias”)(“Slider”);
start = thisComp.layer(“Controller”).effect(“Start”)(“Slider”);
linear(start,0,bias,0,100);