Page 1 of 1

Bind points and their layer!!

Posted: Fri Jun 13, 2008 11:12 pm
by synthsin75
This was one of my earliest questions in AS, so I'm thrilled to have finally found a solution. You can indeed have a vector layer and the points within it bound to different bones in the same bone layer!!

You just have to use fa_meshinstance layer script as a go between. Instances can be layer bound to bones! :shock:

So if you have a vector layer with bound points that you also want to layer bind, you can instance that vector layer into the same bone layer group and then layer bind the instance. The original is then point bound while its instance is layer bound.

Since the instance is moved by the bones bound to the original and can still be layer bound, you have the best of both worlds.

:D

Posted: Sat Jun 14, 2008 5:36 pm
by VĂ­ctor Paredes
i don't understand well, can you post an example, please?

thanks.

Posted: Sat Jun 14, 2008 6:18 pm
by heyvern
Hmm...

I think I need to see an example too. In my mind this could be done just with bones.

For instance, flexible binding of bones for the points. A parent bone that has no influence (0 strength) is the parent of the flexibound point bones. This bone then acts like a layer bound effect for the children bones. Rotate that parent bone rotates the flexibound children point bontes as if you were rotating the layer.

Yes... need an example. I can't picture this in my head.

-vern

Posted: Sat Jun 14, 2008 6:21 pm
by synthsin75
http://www.mediafire.com/?wocgj1ly0md

Here you go, Selgin. Layer 1 is point-bound to the rotating bones, and Layer 1.dup is the instance layer-bound to the translating bone. You can do this using a vector layer's parent group layer, but then you can't do both in the same bone layer (since bones don't work on nested layers).

:wink:

Posted: Sat Jun 14, 2008 6:27 pm
by synthsin75
Yeah Vern, you can do much of this with just bones, but I'm sure there could be some use for this that just bones couldn't manage. Can't think of a specific example off hand.... :?

Posted: Sun Jun 15, 2008 9:41 am
by heyvern
Hey Synth!

I have a question for you. You seem to be making great use of that mesh instance script. I haven't used it in a while and... uh... seem to have misplaced it somewhere on my hard drive... and I just don't have time right now to play with it...

I thought maybe you could do a test for me or just tell me... can the mesh instance script work on switch layers? I mean the vectors INSIDE a switch?

This could be wicked cool.

If the explanation below is too crazy confusing no problems... I would just like to know if a mesh instance works inside a switch layer.

Scenerio

Flipping a foot to face left or right, could be done with a switch layer (this would be a "simple" toggle not interpolated), however the "toe" bone would have to be on the switch layer. This is a pain in the arse having to switch to the switch layer all the time just to bend the toe of the foot.

My thought would be to have "reference" feet layers that are always hidden and never render. Their only purpose is for the mesh instance. These would be the point "masters" for the "real" feet inside the switch layers. There would be two for each foot, each facing in the opposite direction matching the layers in the switch layer.

In your master skeleton you would have two toe bones for each foot, one for pointing in either direction. You would have to use point binding for the two reference feet which isn't a problem.

Depending on which way the feet are pointing you would use the appropriate toe bone to bend that toe.

The points of the hidden "reference master" feet layers would move based on the toe bone in the master skeleton and send that motion to the instance, but you could still "flip" the feet using the switch layer.

Now, you have a foot pointing in the opposite direction in the switch. You would rotate the other toe bone to bend the alternate toe, but using the master skeleton instead of a bone in the foot switch layer because the instance is controlled by the "reference" foot.

<gasp> I hope this made sense. I see it working in my head... this would be WAY FREAKING COOL (it could be used for all kinds of things, hands especially would be nice). It all hinges on a mesh instance working inside a switch layer.

If it doesn't I think it could be modified to do it. I look forward to your response. No rush. ;)

-vern

Posted: Sun Jun 15, 2008 10:59 am
by synthsin75
Hey Vern, the short answer is yes, it can. :)

I hadn't tried out instances in a switch layer, but I just tested it out. I originally tried just flipping one of the instanced layers for the turned foot, but since instances rely on layer naming conventions, the switch treats all same named layers as one. :(

But your idea would work. If you made two sets of feet (i.e. rt/rt, rt/lft, lft/rt, lft/lft ) then each of these would have a unique instance name (i.e. rt/rt.dup, rt/lft.dup, etc).

:wink:

Posted: Sun Jun 15, 2008 3:30 pm
by heyvern
Thank YOU!!!!

This is great news. This could be a really cool technique with that script. Being able to control INSIDE a switch with bones on the parent. Very very cool.

The trouble with bones on a switch... for me... is having to constantly scroll down and find the darn switch that has the bones I want to move. Now I can put the bones for my hand switches back into the main skeleton.

-vern

Posted: Wed Jun 25, 2008 11:46 pm
by synthsin75
http://www.mediafire.com/?dlilmpxtghu

Woohoo! I finally figured out what I was needing this meshinstance point/layer binding trick for. So now I can show a real example of what I meant originally.

In this example, the scale bone is rotated around to scale in a different direction but without turning the effected points.

I'm soooo thrilled! This will greatly simplify that 3D eye rig I was working on ages ago.


:: This may also have some uses for water effects, like a shimmer.

Posted: Thu Jun 26, 2008 12:57 am
by heyvern
YEEEEEHAAAAAA!!!!

Check THIS out!

http://www.lowrestv.com/anime_studio/sc ... ontrol.zip

Scale a shape with ONE BONE!!!!

I constrained the layer bone scale to the point bone scale. PERFECT!

I LOVE IT!

You were right. Eventually there would be a bunch of uses for this. Do this with bones it takes... like... 5.

-vern

Posted: Thu Jun 26, 2008 1:38 am
by synthsin75
Wow, nice simple uniform scale. I like it. I'm going to be going crazy with this for a bit.

I just can't get over that I can now scale an iris in any direction without rotating my shape!

I'm sure there are applications of this that I've not yet imagined. (Rotating a layer translation by bone? Mmm, spiral translation?)

Posted: Sat Jun 28, 2008 1:01 am
by synthsin75
http://www.mediafire.com/?xji8wsbmoje

I can now choose when I want a translating bone to have an effect. In this example, rotating the ctrl bone 90 degrees controls whether or not the translating bone has an effect. This could allow you to have the translation work for a constraint but turn it off for that particular instanced layer.

May be a bit esoteric. I'll try to work up a 'real life' example.