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.
Hiding shapes with smart bones!
Moderators: Víctor Paredes, Belgarath, slowtiger
Re: Hiding shapes with smart bones!
very intelligent trick , thanks heyvern for sharing it
Re: Hiding shapes with smart bones!
Great trick Vern. Very Cool!
Re: Hiding shapes with smart bones!
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
Re: Hiding shapes with smart bones!
Yep, just a horrible test file, intended to "see" what's going on.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.
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.