Animated shape order

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

Moderators: Víctor Paredes, Belgarath, slowtiger

User avatar
Onionskin
Posts: 253
Joined: Wed Mar 04, 2009 2:01 pm

Animated shape order

Post by Onionskin »

Hi to all,

I made this video with animated shape order using switch layers.
Switch layers support bones, and bones affects on every layer in it, so I just duplicate vector layer with model and change only shape order of each.

http://www.youtube.com/watch?v=ntZ9qQyHG6s


Well, like most of you guys here I would be so happy to have "animated shape order script". I know that was already discussions on forum, but cant help my self. :(


My next request is script for switch layer which allows certain layer to be immune from switching. Imagine that in my sample you can attached some layer on bone, (doesn't matter witch one group, bone, switch...) for head or hands, and during switching that specified layers are always visible.


And one more thing, some tool for selecting several shapes and move them up and down together, not one by one like now, it will be great to move them like group, group shape ordering

Image

something like this

Thank you!
User avatar
super8mm
Posts: 340
Joined: Sun Oct 12, 2008 11:22 pm

Post by super8mm »

Switch layers support bones?!

Why didn't anybody tell me?

Holy crap!


However, to be on subject I have no idea what a "animated shape order script" would do. Can someone explain what the script would do?
User avatar
Onionskin
Posts: 253
Joined: Wed Mar 04, 2009 2:01 pm

Post by Onionskin »

super8mm wrote:I have no idea what a "animated shape order script" would do. Can someone explain what the script would do?
Like animated layer order just with shapes in one layer. To raising and lowering shapes during animation
User avatar
super8mm
Posts: 340
Joined: Sun Oct 12, 2008 11:22 pm

Post by super8mm »

I see!

That would be like having "select shape" in the timeline.
User avatar
Onionskin
Posts: 253
Joined: Wed Mar 04, 2009 2:01 pm

Post by Onionskin »

Imagine model in my video only on one layer crossing legs, putting arms behind body, than in the front
User avatar
Víctor Paredes
Site Admin
Posts: 5660
Joined: Wed Jan 26, 2005 12:18 am
Location: Barcelona/Chile
Contact:

Post by Víctor Paredes »

Actually, there is a script to animate shape order based on bones positions. You can see it on Genete's scripts, it's named "ANIMATED SORT SHAPES BASED ON BONES POSITION", search for it on the first post:
viewtopic.php?p=46299

I recommend you to take a look on all Genete's scripts. There are some very cool ideas there.
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
Onionskin
Posts: 253
Joined: Wed Mar 04, 2009 2:01 pm

Post by Onionskin »

Thanks Selgin,

I'm already try that script, but it's to complicate cause of to many bones, for each shape-one bone, and name for every bone also. I looking for something simplest
User avatar
Víctor Paredes
Site Admin
Posts: 5660
Joined: Wed Jan 26, 2005 12:18 am
Location: Barcelona/Chile
Contact:

Post by Víctor Paredes »

Anyway, have you tried animating layer order instead shapes?
I know it's not the best solution on many cases, nevertheless it's a fantastic feature.
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
super8mm
Posts: 340
Joined: Sun Oct 12, 2008 11:22 pm

Re: Animated shape order

Post by super8mm »

Onionskin wrote: My next request is script for switch layer which allows certain layer to be immune from switching. Imagine that in my sample you can attached some layer on bone, (doesn't matter witch one group, bone, switch...) for head or hands, and during switching that specified layers are always visible.
You can implement that with the Mike Green script when used in the fashion I used it in the example from this thread:

viewtopic.php?p=87515#87515

The layers below the switch follow the rig of the switch but do not switch. In the example the eyes follow the rig unswitched.
User avatar
Onionskin
Posts: 253
Joined: Wed Mar 04, 2009 2:01 pm

Post by Onionskin »

Thanks guys!
rogermate
Posts: 296
Joined: Mon Jun 02, 2008 5:53 am
Location: Mars

feature: "arm bend.mp4"

Post by rogermate »

Hi Onionskin,

Watching your link, I looked at your other youtube postings, and am really interested in your feature: "arm bend.mp4"

But there is much I don't understand. First, what are all of those tools?
It seems you have some shapes which have outlines that appear to auto-mask themselves.

Could you elaborate on that magic?
User avatar
Onionskin
Posts: 253
Joined: Wed Mar 04, 2009 2:01 pm

Post by Onionskin »

rogermate

in "arm bend.mp4" I used SynthSin75 technique. for that you don't need to have any special scripted tool. I use lots of fazek tools, but for this is not necessary. important is to fill your shape with paint bucket tool only stroke first, then fill. watch video again, in beginning is simple demonstration of that with two circles. try to do this, then you will figure it out.

regards!
User avatar
heyvern
Posts: 7035
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

If you are interested, I have a script that is based sort of on layer ordering.

One trick to change layer order is to use the z translation of a layer. I used a script to change the z translation of layers based on a bones position. I used this to move arms/legs in front and behind the body for turns.

Using z translation to change layer order was the trick used before we had animated layer order. I still use the z axis because you can't script layer order which is what I need. AUTOMATIC layer order changes. Easy to apply layer order keys. Layer order is "funky" in how it works and you can screw up an entire animation if you change layers around or delete them. I like changing layer order totally independently of where the layer actually is in the layer palette.

------------------

Shape ordering is VERY VERY TRICKY and almost impossible to script. Genete's script is the best solution so far but as was mentioned, is based on bones. You need a bone for every shape which can be a pain for large projects.

-vern
User avatar
Onionskin
Posts: 253
Joined: Wed Mar 04, 2009 2:01 pm

Post by Onionskin »

heyvern,

I am interested for that layer ordering script
rogermate
Posts: 296
Joined: Mon Jun 02, 2008 5:53 am
Location: Mars

Post by rogermate »

Onionskin wrote:rogermate

important is to fill your shape with paint bucket tool only stroke first, then fill. watch video again, in beginning is simple demonstration of that with two circles. try to do this, then you will figure it out.

regards!
OK. Apparently you must create the "shapes" at the same time, and fill them at the same time.

I think I understand it now. What I think is happening, is that the two circles are actually not shapes yet when you first create them, but are just some connected points. I recall someone explaining once that a shape can have more than one connected region and they need not be connected. That is how a donut can be made.

So, when using the fill tool, I'm guessing that it is creating the two "regions" into one shape. Thus, AS is doing the hard work of figuring out which line on the outskirt of a region to use.

I had no idea of the subtlety to shapes. Maybe I need to redo my AS5 companion tutorial book. I'm trying to think now of all the ways I could use this in the future, or should have in the past.

I think the music in your tutorial really gave it the mood of a magic trick.

Thanks for all the sharing that you do.

By the way, I often try to read Synthsin's contributions. Where did he talk about this particular technique?
Post Reply