Using a Slider to control a Trim Path created with "Create Nulls From path"

New Here ,
Aug 05, 2022 Aug 05, 2022

Copy link to clipboard

Copied

Hello 

 

I´m animating a chainsaw and to make it I cut all the spikes, then I created a path that follows the chainsaw. The next step is using "Create Nulls From path and I manually asign a group of spike to a Null, then I copied it and do it again and again. 

 

The problem is that the first null starts at 0% and I gave the other copies a separation of 4% but at the end of animation all keyframes end at 100% and I can´t create a loop. So i tried a angle control because there I can create loops. The problem is that the offset is 100% and don´t traduce to degrees. 

 

There is any form to translate percentages to degrees? or any path that is more available? 

 

A Try with Slider: https://gyazo.com/7fcfeaedf33aad5f3da74a5517aba504

 

A Try with Degrees: https://gyazo.com/2ea2c5be59316ff67efc6b83b31d1b91

 

TOPICS
Expressions , Scripting

Views

44

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Aug 05, 2022 Aug 05, 2022

Copy link to clipboard

Copied

That doesn't make any sense workflow wise. Why even bother woith this convoluted procedure? All you need is to copy & paste the motion path to the teeth, stagger them so they form a contiguous chain, then pre-compose and use time-remapping to control the motion, which for all intents and purposes then can be easily looped, slowed down, sped up or treated however you want. You are making this way too complicated and inefficient with your approach.

 

Mylenium

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Aug 05, 2022 Aug 05, 2022

Copy link to clipboard

Copied

Adding to what Mylenium said, if you have five different teeth, you only need to move far enough down the timeline for tooth one to be in the same position as the first copy of tooth one is at the start of the animation. You now have two identical frames, so a time remapping keyframe at the first position and a time remapping keyframe at the second, then adding loopOut() and deleting any other time remapping keyframes will give you a constantly rotating chain.

 

You can combine valueAtTime() with Property Groups to get a single shape layer with multiple teeth to follow a Trace null created with the Create Nulls from Paths / Trace tool. The expressions are relatively simple, and it only takes a couple of minutes to set one up if you create an animation preset. I've built this kind of thing many times. If I get time later today, I'll post an example.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Aug 06, 2022 Aug 06, 2022

Copy link to clipboard

Copied

LATEST

As promised, here is the project file and the expressions that drive the chain links. One Shape layer with a path for the chain bar at the top, a rounded rectangle below with an expression for Rectangle/Transform Anchor Point, Position, and Rotation that adds the valueAtTime (time +  an appropriate offset value (.05) multiplied by the index of the shape) to offset each copy far enough to look like links and follow the movement of the Trace Path null. 

RickGerard_0-1659769831006.gif

 

Expressions:

// Transform Link/Anchor Point to offset the link from the path
[value[0], content("Link 1").content("Rectangle Path 1").size[1]/2];

//Transform Link/Position to the match the position of the Trace Null + a time offset
ofst =thisProperty.propertyGroup(1).propertyGroup(1).propertyIndex;
ref = thisComp.layer("Trace Path");
posFix = [thisComp.width/2, thisComp.height/2];
ref.position.valueAtTime(time + .05 * ofst) - posFix

//Transform Link/Rotation to match the rotation of the trace null + a time offset
ofst =thisProperty.propertyGroup(1).propertyGroup(1).propertyIndex;
ref = thisComp.layer("Trace Path");
ref.rotation.valueAtTime(time + .05 * ofst);

There you go. A fast rendering chainsaw with one layer and a null that can be pre-composed (including the Trace Null), then Time Remapped to start and stop the blade. 

 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines