Follow Curve

Moho allows users to write new tools and plugins. Discuss scripting ideas and problems here.

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

Post Reply
hayasidist
Posts: 2182
Joined: Wed Feb 16, 2011 8:12 pm
Location: Kent, England

Follow Curve

Post by hayasidist » Fri Jan 24, 2014 10:31 pm

This tool is similar to the Follow Path function. The main difference is that it uses the control points in the “path to follow” as timing points.
You select a shape (or some points) on the active layer, then pick any path on any layer (the active layer or not), and the selected shape will be translated along the path that was picked. Each segment on the path takes the same number of frames (you can choose what this number is), no matter how far apart the points are.. so with two points a long way apart the shape goes quickly between them; and with two points very close together the shape will go very slowly...


zip file containing: readme, icon, cursor and script is here: https://www.mediafire.com/?b4jddkukv28168j
User avatar
jahnocli
Posts: 3362
Joined: Fri Oct 29, 2004 2:13 pm
Location: UK

Re: Follow Curve

Post by jahnocli » Sat Jan 25, 2014 11:20 am

This looks to be very useful! Thanks for posting...and what is so special about the number 26?
You can't have everything. Where would you put it?
hayasidist
Posts: 2182
Joined: Wed Feb 16, 2011 8:12 pm
Location: Kent, England

Re: Follow Curve

Post by hayasidist » Sat Jan 25, 2014 11:29 am

jahnocli wrote:...what is so special about the number 26?
it's a long story ... and I'm keeping the film rights :wink:
hayasidist
Posts: 2182
Joined: Wed Feb 16, 2011 8:12 pm
Location: Kent, England

Re: Follow Curve - Now Updated for AS11

Post by hayasidist » Fri Mar 04, 2016 4:32 pm

hayasidist
Posts: 2182
Joined: Wed Feb 16, 2011 8:12 pm
Location: Kent, England

Follow Curve - Now updated for Moho 12

Post by hayasidist » Thu Feb 01, 2018 1:41 pm

http://www.mediafire.com/file/k0d5tdydz ... 20V520.zip

there are no changes to the core functionality -- just an update to use the Moho 12 UI. This new version will not work with AS11 or earlier versions - but the previous versions are still there for download.

Bug reports / enhancement requests always welcome.
EHEBrandon
Posts: 125
Joined: Mon May 26, 2014 2:16 am

Re: Follow Curve - Now updated for Moho 12

Post by EHEBrandon » Thu Apr 12, 2018 7:16 am

hayasidist wrote:http://www.mediafire.com/file/k0d5tdydz ... 20V520.zip

there are no changes to the core functionality -- just an update to use the Moho 12 UI. This new version will not work with AS11 or earlier versions - but the previous versions are still there for download.

Bug reports / enhancement requests always welcome.
I just had a crazy idea to expand on this concept a tad bit whether it'd be possible I don't know. Anyways what if you could use a vector line for rigging so it has the appearance of Harmony to where the bone paths look like vector points but instead of changing the bones and the way they look why not just bind the vector objects to vectors if that makes sense lol.
hayasidist
Posts: 2182
Joined: Wed Feb 16, 2011 8:12 pm
Location: Kent, England

Re: Follow Curve - Now updated for Moho 12

Post by hayasidist » Thu Apr 12, 2018 10:06 am

EHEBrandon wrote:
I just had a crazy idea to expand on this concept a tad bit whether it'd be possible I don't know. Anyways what if you could use a vector line for rigging so it has the appearance of Harmony to where the bone paths look like vector points but instead of changing the bones and the way they look why not just bind the vector objects to vectors if that makes sense lol.
yes - see what you mean -- you can just about do that now with the tool as it is. e.g. define point groups and in a number of separate passes generate the keys for those point groups moving with the animated path (you can animate the "path to follow" - the follow function will use the path's position at the frame it generates keys for the following items).

but a core issue is that this tool is a "baked keys" tool -- if you change the controlling path after you've run this tool, the keyed items stay where they were put. It is _feasible_ to make this dynamic, and to preserve some association of target point with controlling point, but that's a major re-engineering exercise.


I had actually been contemplating something functionally similar: draw a path then run a tool that starts from the first drawn point to add bones that span (obviously straight line) the (curved) gaps between points - pivot on the low numbered one, tip on the higher numbered - then move the bones in response to the point motion (similar in concept to this viewtopic.php?f=13&t=31302&p=178053&#p178053 but using a point rather than a target bone in a separate layer)

there's also the possibility for a variant on the add/sketch bones tools that draws a path over the bones ... and then you could move the path to control the bones as above ...

But up to now I've never really found a compelling reason to do either ...
nikokelli
Posts: 2
Joined: Mon Nov 18, 2019 12:28 pm

Re: Follow Curve

Post by nikokelli » Wed Feb 05, 2020 12:46 pm

Is a similar mode possible for the stroke exposure tool? I mean having the exposure based on the strokes points and being immune to any changes of the shape?
hayasidist
Posts: 2182
Joined: Wed Feb 16, 2011 8:12 pm
Location: Kent, England

Re: Follow Curve

Post by hayasidist » Wed Feb 05, 2020 9:38 pm

you mean stroke exposure was by absolute length, not percentage?

i.e. a curve that is 1 unit long that is 50% exposed gets 0.5 unit exposed; and if that curve then became 2 units long it would still only have 0.5 unit exposed?
User avatar
synthsin75
Posts: 7216
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: Follow Curve

Post by synthsin75 » Thu Feb 06, 2020 12:48 am

It already does that, as stroke exposure is by percent of whole curve.
hayasidist
Posts: 2182
Joined: Wed Feb 16, 2011 8:12 pm
Location: Kent, England

Re: Follow Curve

Post by hayasidist » Thu Feb 06, 2020 8:18 am

synthsin75 wrote:
Thu Feb 06, 2020 12:48 am
It already does that, as stroke exposure is by percent of whole curve.

yeah - that's what it seems that the OP _doesn't_ want -- not percent of whole curve but to/from a given place no matter how long the curve is (so, e.g., if the curve doubles in length then 50% needs to change to 25%)?
nikokelli
Posts: 2
Joined: Mon Nov 18, 2019 12:28 pm

Re: Follow Curve

Post by nikokelli » Thu Feb 06, 2020 9:30 am

Yes what I was thinking is the exposure targeting points in the line and stay put when it reaches them. Which means I suppose that you would be able to keyframe only at these points...
I don't know anything about scripting, but now that I am describing it it does not sound very possible...

Or maybe operate on absolute length? That sounds a little bit more possible...?

In any case I am not sure how necessary it is anyway. I mean I was thinking about it in relation with rigging. In shoulder areas for example, I sometimes use stroke exposure to determine how much of the arm's stroke is visible over the body as they overlap. Changing the shape of the shoulder though, as the arm rotates, affects the exposure and creates conflicts that in some cases lead to jittery animation. But I am thinking now that maybe the best way to "pin" that and have more control over it is to use an extra two point line segment instead of using the actual stroke of the arm. Its not applying in every design though.

Anyways thank you guys for your responses, and by the way, thank you for your overall contribution to this forum. You and the other "Gurus" here , have been essential in my effort to explore the full possibilities of moho, for the last year or so. I am really grateful for this forum!
Cheers!
hayasidist
Posts: 2182
Joined: Wed Feb 16, 2011 8:12 pm
Location: Kent, England

Re: Follow Curve

Post by hayasidist » Thu Feb 06, 2020 9:27 pm

what I do in similar situations is add a few extra points in the curves, and use hidden segments rather than an "extra two point line segment "
Post Reply