Is there a script that does this?

General Moho topics.

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

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

Is there a script that does this?

Post by nina_paley » Wed Apr 12, 2017 4:47 pm

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: 2192
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 » Wed Apr 12, 2017 5:48 pm

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
Posts: 4888
Joined: Wed Jan 26, 2005 12:18 am
Location: Ireland/Chile
Contact:

Re: Is there a script that does this?

Post by Víctor Paredes » Wed Apr 12, 2017 5:58 pm

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.
Víctor Paredes
Former Moho Product Manager
Rigger and animator in Cartoon Saloon
My Youtube Channel - My webinars
User avatar
Víctor Paredes
Posts: 4888
Joined: Wed Jan 26, 2005 12:18 am
Location: Ireland/Chile
Contact:

Re: Is there a script that does this?

Post by Víctor Paredes » Wed Apr 12, 2017 6:32 pm

Ok, here's the video. It's longer than I expected, sorry about that.
Víctor Paredes
Former Moho Product Manager
Rigger and animator in Cartoon Saloon
My Youtube Channel - My webinars
User avatar
SimplSam
Posts: 138
Joined: Thu Mar 13, 2014 5:09 pm
Location: London, UK
Contact:

Re: Is there a script that does this?

Post by SimplSam » Wed Apr 12, 2017 7:06 pm

Firstly - Excellent work.

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

Image

viewtopic.php?f=12&t=30678
Moho 13.02 » Win 10 Pro 64GB » NVIDIA GTX 1060 6GB

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

Re: Is there a script that does this?

Post by nina_paley » Wed Apr 12, 2017 7:23 pm

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
Posts: 4888
Joined: Wed Jan 26, 2005 12:18 am
Location: Ireland/Chile
Contact:

Re: Is there a script that does this?

Post by Víctor Paredes » Wed Apr 12, 2017 7:55 pm

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.
Víctor Paredes
Former Moho Product Manager
Rigger and animator in Cartoon Saloon
My Youtube Channel - My webinars
User avatar
synthsin75
Posts: 7202
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: Is there a script that does this?

Post by synthsin75 » Wed Apr 12, 2017 9:45 pm

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: 43
Joined: Sun Feb 14, 2016 7:41 pm
Location: Urbana IL
Contact:

Re: Is there a script that does this?

Post by nina_paley » Wed Apr 12, 2017 10:08 pm

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: 126
Joined: Sun Apr 19, 2009 3:22 pm
Contact:

Re: Is there a script that does this?

Post by Stan » Thu Apr 13, 2017 4:47 am

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
________________________________________________________________________
http://mohoscripting.com/ - Unofficial Moho (Anime Studio) Lua Scripting Documentation
http://2danimator.ru/ - Russian Anime Studio Forum
nina_paley
Posts: 43
Joined: Sun Feb 14, 2016 7:41 pm
Location: Urbana IL
Contact:

Re: Is there a script that does this?

Post by nina_paley » Thu Apr 13, 2017 5:11 pm

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.
jezjones29
Posts: 335
Joined: Tue Jan 31, 2006 9:43 pm
Location: Wales, UK
Contact:

Re: Is there a script that does this?

Post by jezjones29 » Fri Apr 14, 2017 9:48 am

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