follow path

Wondering how to accomplish a certain animation task? Ask here.

Moderators: Fahim, Distinct Sun, Víctor Paredes, erey, Belgarath, slowtiger

Post Reply
fukuro
Posts: 15
Joined: Mon Mar 16, 2020 10:34 pm

follow path

Post by fukuro » Fri Jun 05, 2020 1:27 am

Page 136 of the user manual has an inscrutable description of how to use "follow path." I'd really appreciate a step-by-step description of how to get "follow path" working.

What I have: 1) a layer with a path (made using the freehand tool); 2) a layer with a complex object (that I want following the path).

Thanks.
User avatar
Greenlaw
Posts: 4748
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: follow path

Post by Greenlaw » Fri Jun 05, 2020 4:58 pm

Hi,

1. Create a path in a layer. This will be the 'track' you want another layer to follow. You mentioned using the Freehand tool. That's fine but I suggest using the Add Point tool to create a cleaner path for smoother results.

2. Create another layer with the item you want to follow the path. This layer can be vector, image, group...it doesn't matter. Keep in mind that the origin of the layer will be used as the pivot point.

3. With the second layer selected, choose the Follow Path tool. Click on the path with the Follow Path tool. The second layer will snap to the clicked location along the path.

That's pretty much it. To animate the item, you need to create keyframes for the positions along the path. You can do this by moving the item to another position using the tool or by entering different values in the Percentage field.

A neat trick you can do with the Follow Path tool: deform another layer along the path. To do this, you Alt-Click on the path using the tool. This is great for bending artwork as it follows the path, like a snake for example.

The Alt-Click method can also be used as an alternative to bones animation. In this case, instead of moving the item along the path, you would animate the path to deform the artwork. You might use this to animate a whip or a tentacle. (I typically use the Sketch Bones to animate this sort of thing but there are situations when using a path produces smoother results.)

Another fun trick: Make the path a closed shape. Now you have a continuous track you can loop items around. I use this to animate items like bees moving continuously around a beehive. (One of the 'choice points' for the three bears segment in Puss-In-Book on Netflix has that specific bit in the background.) Once you set up the loop, you can use Sequencer to offset the timing of the animation.

Hope this helps.
D.R. Greenlaw
Artist/Partner - Little Green Dog | Little Green Dog Channel on Vimeo | Greenlaw's Demo Reel 2019 Edtion
Lead Digital Animator, Dreamworks Animation

Image
User avatar
MrMiracle77
Posts: 32
Joined: Mon Jun 24, 2019 2:30 am

Re: follow path

Post by MrMiracle77 » Sat Jun 06, 2020 4:58 pm

I'd add that Moho uses the layer's "center" to determine which part of it attaches to the path. The center is the blue crosshairs, and moving the center can create interesting effects. For example, if you want to make a rollercoaster car follow the path defined by the tracks, you'd adjust the center so that it falls below the wheels.

The layer settings also has a toggle to make the layer rotate as it follows the path, which I found useful for making rockets arc their way to a target.
User avatar
Greenlaw
Posts: 4748
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: follow path

Post by Greenlaw » Sat Jun 06, 2020 7:36 pm

Thanks for posting the the additional info MrMiracle77. I totally forgot to mention the rotation option. :)

Your post makes me want to clarify something I wrote and add something else:

When I said to keep in mind that the Follow Path tool uses the layer's origin, I should have said it uses the layer's origin at the time you click on the path. This is important because if you move the origin from the layer's actual center, then it uses the offset position. However, if you move the origin after clicking on the path, Follow Path will ignore the new position. If you want to change the origin after using Follow Path, you'll need to remove the layer from Follow Path, then change the origin, and then use Follow Path again.

I don't think the docs mention how to remove a layer from Follow Path so here's how: Go to frame 0, select the layer that's following the path, select the Follow Path tool and click in an empty area off the path. The layer will jump off the path and, more notably, the Follow Path keyframes will disappear.

Note: The layer might not jump back to its 'pre-Follow Path' position so depending on what you're doing, you may want to Reset it. It might not matter...I'm just mentioning this as something to be aware of.
D.R. Greenlaw
Artist/Partner - Little Green Dog | Little Green Dog Channel on Vimeo | Greenlaw's Demo Reel 2019 Edtion
Lead Digital Animator, Dreamworks Animation

Image
User avatar
alanthebox
Posts: 100
Joined: Sat Feb 03, 2018 5:31 pm
Location: california
Contact:

Re: follow path

Post by alanthebox » Thu Sep 03, 2020 10:26 pm

Greenlaw wrote:
Fri Jun 05, 2020 4:58 pm

Another fun trick: Make the path a closed shape. Now you have a continuous track you can loop items around. I use this to animate items like bees moving continuously around a beehive. (One of the 'choice points' for the three bears segment in Puss-In-Book on Netflix has that specific bit in the background.) Once you set up the loop, you can use Sequencer to offset the timing of the animation.
I was just playing around with paths last night and had a couple of questions regarding closed loop paths (specifically when using the percentage field to animate in order to get precise loops). How does Moho determine which point on, say, an oval will be considered the starting point (percentage = 0)? For instance, if you drag out an oval from top left to bottom right and release, it seems to set the top center point as the starting point. Is there any way to set your own start point? It also seems as though it uses point order to determine the direction? And the only way to reverse direction is to horizontally or vertically flip the path layer?

I mostly just wanted to make sure I'm using paths correctly and I'm not missing some obvious method of manipulating starting points and path direction.
Thanks!
User avatar
Greenlaw
Posts: 4748
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: follow path

Post by Greenlaw » Fri Sep 04, 2020 12:29 am

Yeah, not being able to easily define the 'start' point is an annoyance. IMO, this should be as easy as: 1. select the point and 2. select a 'Set Start Point' command. Sadly, that feature doesn't exist.

But here are a a few workarounds I use:

Sequencer Method
When I just need to offset the 'start point' a continuous loop, I animate from the default start point, then switch to Sequencer and slide the layer clip the left until the new starting position is where I want it to be on frame 1. This trick useful when I have duplicates of the animation, like flying bees for example, and I can make the animation for each be start at a different position along the path.

Click and Drag Sideways
With the Follow Path tool selected, I click and drag right or left until the item is on the position where I want it to start. Then I click and drag from left to right, or right to left, depending on the direction I want the following layer to move, starting from the edge of the screen that gives me the longest traveling distance. This enables me to move the following layer past 100% and to the new start point. The trick is in making sure there is enough screen space to drag the mouse continuously.

Create A New Start Point
When I really need to define a new start point on the path, here's what I do:

The start point Follow Path is by default the first point created for the path. So, to change the start point, I need to change the point order.

1. Using the Delete Edge tool, I delete the segment in front of the the point I wish to become the new start point. Now I have two new end points for the path.

2. Close the path by reconnecting the points. Using Add Points tool, I click and drag from the preceding point to the new start point.

3. Press Enter to close the shape.

Now I have a new start point. Admittedly, this is a stupid trick because I'll likely have to re-smooth the two points and make a curvature adjustment, but it's usually easier than creating a whole new path, especially when it's a complicated path.

Bonus Tip: If you ever need to make a layer un-follow a path, go to frame zero and just click in an empty space off the path. The layer will un-follow and move back to its default screen position.

Hope this helps.
D.R. Greenlaw
Artist/Partner - Little Green Dog | Little Green Dog Channel on Vimeo | Greenlaw's Demo Reel 2019 Edtion
Lead Digital Animator, Dreamworks Animation

Image
Post Reply