Is there a script that does this?

General Moho topics.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
nina_paley
Posts: 46
Joined: Sun Feb 14, 2016 7:41 pm
Location: Urbana IL
Contact:

Is there a script that does this?

Post by nina_paley »

Image

I made this with a ton of reference layers. The "snakes" are strokes moving along a meandering line, animated with the Stroke Exposure tool (because making a separate "snake" with the "Follow Path" tool looked too jittery). Every reference layer contains one "snake," moved over 48 frames at a time in the Sequencer. Every reference layer copies the path as well, and slows down Moho.

Is there a script that would allow me to determine the length and number of stroke "snakes," and the duration of the loop cycle, and have everything on one layer?
User avatar
Lost Marble
Site Admin
Posts: 2347
Joined: Tue Aug 03, 2004 6:02 pm
Location: Scotts Valley, California, USA
Contact:

Re: Is there a script that does this?

Post by Lost Marble »

I don't know of a script to do exactly what you want, but there may be one that's close. If you're willing to play around with Lua you may be able to get it to do what you want. Try this:

In a layer draw a bunch of strokes with the freehand tool (make sure Auto-strokes is on).
Choose Edit->Select All
Choose Scripts->Draw->Animated Strokes

The idea for this script was to be used to create "animated writing", so it exposes the strokes one-at-a-time in the order they were drawn. But with a little bit of modification it could animate the strokes all at once, and not just animate the "front end" of the stroke, but pull in the back end too, if that makes sense.
User avatar
Víctor Paredes
Site Admin
Posts: 5646
Joined: Wed Jan 26, 2005 12:18 am
Location: Barcelona/Chile
Contact:

Re: Is there a script that does this?

Post by Víctor Paredes »

Hi Nina!
I love the idea and the gif.
I was just writing that I don't know about any script to help you with this, but I just remembered that actually there's one (besides the one Mike just posted :wink:). It's called Delayed References:
http://lostmarble.com/forum/viewtopic.php?f=12&t=30265
I'm recording a video to show you how to use it in your animation.
Image Image Image Image
Moho Product Manager

www.mohoanimation.com
Rigged animation supervisor in My father's dragon - Lead Moho artist in Wolfwalkers - Cartoon Saloon - My personal Youtube Channel
User avatar
Víctor Paredes
Site Admin
Posts: 5646
Joined: Wed Jan 26, 2005 12:18 am
Location: Barcelona/Chile
Contact:

Re: Is there a script that does this?

Post by Víctor Paredes »

Ok, here's the video. It's longer than I expected, sorry about that.
Image Image Image Image
Moho Product Manager

www.mohoanimation.com
Rigged animation supervisor in My father's dragon - Lead Moho artist in Wolfwalkers - Cartoon Saloon - My personal Youtube Channel
User avatar
SimplSam
Posts: 1033
Joined: Thu Mar 13, 2014 5:09 pm
Location: London, UK
Contact:

Re: Is there a script that does this?

Post by SimplSam »

Firstly - Excellent work.

Does Wes's script move some way in this direction?

Image

viewtopic.php?f=12&t=30678
Moho 14.1 » Win 11 Pro 64GB » NVIDIA GTX 1080ti 11GB
Moho 14.1 » Mac mini 2012 8GB » macOS 10.15 Catalina
Tube: SimplSam


Sam
nina_paley
Posts: 46
Joined: Sun Feb 14, 2016 7:41 pm
Location: Urbana IL
Contact:

Re: Is there a script that does this?

Post by nina_paley »

Thanks Victor!

I am having trouble installing the script on my Mac. In fact my Moho Pro Custom Content Folder shows all the script folders, but nothing inside. Which is odd, because all the standard scripts work when I use Moho. I don't know if my Mac is not showing the files or what. I've tried installing the script from within the program and it says "No files were found to install!"

But even without a script installed, thanks to your video I can see that just doubling the number of points on my "snake" reduces the jitter sufficiently. I'm currently using Moho Pro 12, which doesn't have the "split" button, but I can get it from the script menu (even though I have no idea where these scripts are hiding on my Mac because they don't show up in the Finder.) This alone will help.
User avatar
Víctor Paredes
Site Admin
Posts: 5646
Joined: Wed Jan 26, 2005 12:18 am
Location: Barcelona/Chile
Contact:

Re: Is there a script that does this?

Post by Víctor Paredes »

I'm happy the video helped.
The Custom Content Folder only contains the external scripts you could install. All the official scripts are in another place. Simply copy the two files of the script in inside of \scripts\tool and then restart Moho (or press Alt+Cmd+Shift+L to reload all the scripts). A new button should appear in the Tools palette.

I think the Split button was introduced in Moho Pro 12 (maybe before), so it should appear in your computer. Be sure you are using the Select Points tool and the points are selected. The button is only shown when that tool is being used.
Image Image Image Image
Moho Product Manager

www.mohoanimation.com
Rigged animation supervisor in My father's dragon - Lead Moho artist in Wolfwalkers - Cartoon Saloon - My personal Youtube Channel
User avatar
synthsin75
Posts: 9935
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: Is there a script that does this?

Post by synthsin75 »

Great animation, Nina.
SimplSam wrote:Firstly - Excellent work.

Does Wes's script move some way in this direction?

viewtopic.php?f=12&t=30678
Nah, animated hide edge wouldn't be anywhere near as smooth.
nina_paley
Posts: 46
Joined: Sun Feb 14, 2016 7:41 pm
Location: Urbana IL
Contact:

Re: Is there a script that does this?

Post by nina_paley »

Víctor Paredes wrote: Simply copy the two files of the script in inside of \scripts\tool and then restart Moho
Aha! My mistake was copying the whole folder. I copied just the files without the folder and it works now. Thanks again Victor!
Stan
Posts: 199
Joined: Sun Apr 19, 2009 3:22 pm

Re: Is there a script that does this?

Post by Stan »

Thank you Victor for bringing up my script, I'm really amazed that at least one of my scripts will be used by Nina! I have made a little addition to the script - now you can use negative values for the timeline delay, that will move the ref to the left side of the timeline. The original post has been updated: http://lostmarble.com/forum/viewtopic.php?f=12&t=30265
________________________________________________________________________
https://mohoscripting.com/ - Unofficial Moho Lua scripting documentation
https://mohoscripts.com/ - The best place to publish and download scripts for Moho
nina_paley
Posts: 46
Joined: Sun Feb 14, 2016 7:41 pm
Location: Urbana IL
Contact:

Re: Is there a script that does this?

Post by nina_paley »

Stan wrote:I have made a little addition to the script - now you can use negative values for the timeline delay, that will move the ref to the left side of the timeline.
Thanks, Stan! I just updated.
User avatar
jezjones29
Posts: 339
Joined: Tue Jan 31, 2006 9:43 pm
Location: Wales, UK
Contact:

Re: Is there a script that does this?

Post by jezjones29 »

Víctor's answer and Stan's script looks like the best option, but I thought I'd have a go at doing one but with the gap moving around rather than the line 'worm':

Image

Files: https://www.animestudiotutor.com/shared_files?id=358
Post Reply