Hiding shapes with smart bones!

Have you come up with a good Moho trick? Need help solving an animation problem? Come on in.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
User avatar
heyvern
Posts: 7035
Joined: Fri Sep 02, 2005 4:49 am

Hiding shapes with smart bones!

Post by heyvern »

Okay, we can't do shape ordering yet but I found a cool trick.

I have a fairly simple model set up. Basically a "snout" with a tongue. The tongue should be covered up by the upper and lower "jaws" when closed but I wanted to be able to have the tongue "stick out" sometimes when the mouth is closed.
I really needed a way to order shapes. I didn't want to use a script and was wracking my brain for a solution. I tried all kinds of complicated masking tricks and just wasn't getting anywhere.

What I found "by accident" through all the experimenting was this trick:

Setting shapes to 0 opacity using a step key in a smart bone. Works like a charm and can be used for lots of other purposes.

The trick is to set the smart bone rotation on a frame further down the time line, but set the shape opacity on frame 1 with a step. This causes the shape to "disappear" instantly when the smart bone first starts to rotate.

In the sample the left and right sides of the "blue jaw" shapes become invisible when the turn smart bone is rotated. There is another layer with a filled black shape behind the left and right blue shapes and the jaw.

The tongue is just a stroke shape.
The "tip" of the tongue is on top of everything, but masked so only the tip shows. The mask has a key for stroke exposure so the tongue tip disappears inside the mouth as it scales down.

I will post a simpler sample file with specific shape hiding smart bone set up later.

Image
User avatar
ahzra
Posts: 148
Joined: Mon Oct 31, 2011 10:09 am
Location: cairo,egypt
Contact:

Re: Hiding shapes with smart bones!

Post by ahzra »

very intelligent trick , thanks heyvern for sharing it :)
User avatar
KenW
Posts: 129
Joined: Tue Jul 17, 2007 8:08 pm
Location: Virginia, USA
Contact:

Re: Hiding shapes with smart bones!

Post by KenW »

Great trick Vern. Very Cool! 8)
Danimal
Posts: 1584
Joined: Thu Nov 15, 2007 3:06 pm
Location: The Danimal Kingdom
Contact:

Re: Hiding shapes with smart bones!

Post by Danimal »

Something crazy happens about halfway where the blue outer mouth jumps inside. I'm sure this was just a quick test, but that looks distracting and takes away from an otherwise great effect.
~Danimal
User avatar
heyvern
Posts: 7035
Joined: Fri Sep 02, 2005 4:49 am

Re: Hiding shapes with smart bones!

Post by heyvern »

Danimal wrote:Something crazy happens about halfway where the blue outer mouth jumps inside. I'm sure this was just a quick test, but that looks distracting and takes away from an otherwise great effect.
Yep, just a horrible test file, intended to "see" what's going on.
The "flipping" of the shapes is the same for layer ordering, or any other type of ordering keys or "boolean" type switching of values. No way to avoid it. This trick gives a similar result to layer ordering but is changing the opacity of shapes instead of order of layers.

In actual usage the flipping effect of the shapes would be hidden with other shapes or the shapes would "blend" over the bottom "back" layer. I left it in there to clearly show the hiding of the shapes.
Post Reply