Simple 4 bone 3D head turn part2
Moderators: Víctor Paredes, Belgarath, slowtiger
Vern! this script is pretty beauty and so simple!!! It is a good new that I can understand what the script do!!! I can apply it to my own models just change the formula and that's all!!!
if I could convert a translation into a scale of some bones and a rotation of others at the same time and with a quick custom function I can apply it to a big bunch of bones without care of crash!!
THANKS A LOT!!!
if I could convert a translation into a scale of some bones and a rotation of others at the same time and with a quick custom function I can apply it to a big bunch of bones without care of crash!!
THANKS A LOT!!!
That is EXACTLY why I started using "targeted scripting".... I can understand what the script do!!!
Instead of having all that looping and extra stuff just to find the name of ONE SINGLE BONE... I put in the ID of the bone and eliminate half the code.
It has been so much easier to script this way. Half the time I was spending writing scripts was just trying to figure out which bones needed to be changed or used by the script. Most of the actual things that the scripts do is pretty simple.
This script is very very simple, but in my other situations this technique comes in handy.
This would be a cool feature for AS. Instead of EXTERNAL scripts, the scripts could be part of each document allowing you to assign bones as "variables" specific to each document...
Hmm... I should suggest that.
-vern
- capricorn33
- Posts: 249
- Joined: Sun Oct 02, 2005 9:49 am
- Location: Finland
- Contact:
- capricorn33
- Posts: 249
- Joined: Sun Oct 02, 2005 9:49 am
- Location: Finland
- Contact:
Sorry, I'm a little slow... I don't quite understand. Do you have any example to show the principle behind that "drop in another face" thing?heyvern wrote: You guys are binding points to specific bones. This works great... but I am trying to come up with a system that won't require binding. So you could drop in a different "face" and it would just work..../
-vern
And somehow demonstrate the advantages of the region binding in this context too?
(Have you used that kind of technique in any of the files you've posted in this thread, maybe? If so, which one?)
I hope I'm not asking stupid questions here... I feel I lack some fundamental understanding of many of the nuts and bolts in AS. (I really should RTFM from the very beginning)

capricorn ( - just call me "cap")
children's tv pro, character animator
children's tv pro, character animator
Can someone verify if this is a bug.
I created a bone layer with the basic scale rotate setup, then two child layers with a circle on each. When I set all bone strengths to "0" the layers dissapear. After a while AS will crash. I have to give one bone a strength before the sub layers will re-appear.
D.K
I created a bone layer with the basic scale rotate setup, then two child layers with a circle on each. When I set all bone strengths to "0" the layers dissapear. After a while AS will crash. I have to give one bone a strength before the sub layers will re-appear.
D.K
If all the bones have strength of 0 AND at last one of the points of the child layer is flexi binded THEN the transformation matrix of that(those) point(s) is a NULL matrix which put those points to a nil value (undefined) and the shape disappear (no shape beyond frame 0).
My AS for linux don't crash but have same behavior. The shape disappears.
Almost one bone must have strength if you want any point to be flexi binded (what is the default status of a point). Any shape that have almost one point flexi binded to a 0 strength skeleton is useless beyond frame 0.
Is not a bug. You're just requesting something impossible. Flexibly transform a set of points with a null transformation value.
On the other hand you can bind a layer to a bone of 0 strength. It will rotate as a solid rigid and translate also in the same way that the bone BUT it will SCALE like the binder bone! What is the most interesting discover you have done in this thread!!!.
Genete
My AS for linux don't crash but have same behavior. The shape disappears.
Almost one bone must have strength if you want any point to be flexi binded (what is the default status of a point). Any shape that have almost one point flexi binded to a 0 strength skeleton is useless beyond frame 0.
Is not a bug. You're just requesting something impossible. Flexibly transform a set of points with a null transformation value.
On the other hand you can bind a layer to a bone of 0 strength. It will rotate as a solid rigid and translate also in the same way that the bone BUT it will SCALE like the binder bone! What is the most interesting discover you have done in this thread!!!.
Genete
I haven't posted any yet since I am working on a different rig. I am sort of doing 2 different things at the same time, redoing my original really complex rig using this "new technology" and also making minor changes to the rig you guys are using, the Silver Surfer character (flexible binding).Do you have any example to show the principle behind that "drop in another face" thing?
My original face rig that I've been working on for ages now, uses translation of bones only for transformation and uses region binding and no point binding. because of this I could just drop in a new face and tweak some bones to make it work.
Region binding influences points with the closest bone. Since I'm not using point binding, if I use flexible bone binding ALL points are influenced by ALL the bones so I get a lot of extraneous motion... that's why I'm not using it.
I work a little differently than you guys are right now.
For instance when Genete added the ears he offset the ears and the ear bones to the sides so the bones wouldn't effect other parts of the mesh. To have bone control for posing of the mouth and eyes I offset those as well. I also offset the nose (instead of a separate bone layer). It looks funky but is easy to do. You can draw the face "normally" and render it for placement. Then offset the features to line up with the bones and use the render as a template to put them back.
I may be going in a different direction than you guys. Some of my characters I plan to use with this rig are very complex and I want to make it as simple as possible to drop in new faces. Point binding is out of the question since it involves both point binding AND bone tweaking. It would be like starting from scratch for each character (I'm lazy).
I want my rig to be simple so I can easily create and rig new characters without a lot of hassle.
So far it's working. But because of my different approach it changes things quite a bit. For instance binding points on the left side of the rig to a bone on the right side is not possible. I have to figure out ways to make that work by still using left and right bones and changing how they behave. Usually through extra bones in the hierarchy.
I also overlap bones to "blend" the influence (as opposed to direct point binding).
To quote Bert Gummer from Tremors 3, I often...
"... Take something simple and make it complicated!"

I promise to share this "new" rig when I get it working the way I like. I want to put in the same "Silver Surfer" guy in it so you can see the difference.
-----------
p.s. I changed that lion file and uploaded a new version:
http://www.lowrestv.com/character_rig/l ... ontrol.zip
I used a translation constraint to move the top head bone slightly so the head rotates around the neck. Previously the head rotated with the nose as the pivot. No additional bones were added. I just changed the parent of the main head bone.
-vern
- capricorn33
- Posts: 249
- Joined: Sun Oct 02, 2005 9:49 am
- Location: Finland
- Contact:
heyvern wrote:I haven't posted any yet since I am working on a different rig. /..../Do you have any example to show the principle behind that "drop in another face" thing?
My original face rig that I've been working on for ages now, uses translation of bones only for transformation and uses region binding and no point binding. because of this I could just drop in a new face and tweak some bones to make it work.
Hey, now I've seen it, I went digging around among the zillions of threads in this forum and I found your project.
- Oh my goood it's amazing, heyvern. What nice fluid movement in that face.
- And oh my gooood so many bones you have there.

Yep, that's what we are all aiming for, I think. And your rig will certainly be one solution to the problem. That will be truly wonderful when you get it all done. Looking forward to it.heyvern wrote: I want my rig to be simple so I can easily create and rig new characters without a lot of hassle.
I myself prefer to try to work with simple techniques, learn them as thoroughly as possible to be able to build fast, from scratch. D.K. mentioned the "hands-on"-feeling and "using the tools that are already there" somewhere earlier in this thread... That is important, I think.
I like it when I understand what's happening "under the hood", so to speak. And that's why I like this scale-rotating technique too. I can use it without a zillion bones or scripts I don't understand...

BUT - I'm really looking forward to see how that "dropping a new face in there" is going to work out. I like the sound of that phrase!

heyvern wrote: p.s. I changed that lion file and uploaded a new version:
http://www.lowrestv.com/character_rig/l ... ontrol.zip
I simply MUST try to go through those lua manuals too, sometime. That onebone-control really rocks!

capricorn ( - just call me "cap")
children's tv pro, character animator
children's tv pro, character animator
Hmm. Wondering if this would be of any use in my characters...Could be interesting. Seems like a lot of people are using this script. Still have to read through this whole thread...
My characters' examples are here.
http://www.youtube.com/watch?v=U8NrsO8RRAA
Any idea if I could incorporate it into these simple heads? Be interesting...
My characters' examples are here.
http://www.youtube.com/watch?v=U8NrsO8RRAA
Any idea if I could incorporate it into these simple heads? Be interesting...
Mikdog,
Those characters are perfect just the way they are. In my opinion trying to add in these types of controls would be... gilding the lily. The "2.5D" aspect might make them feel out of place.
The beauty of the style is the simplicity.
Just my 2 cents anyway.
Having said that... those characters would be a piece of cake to add one of these rigs to. They are very simplistic. Especially if you use point motion or switch layers for the lip sync. My characters have boned mouths which is proving a chore to adapt... better than my first version by far. Way fewer bones.
If you wanted that type of control and felt some element of those characters is missing because of it... then i would say give it a shot. If you just want to add it because it seems cool... well... that's up to you.

-vern
Those characters are perfect just the way they are. In my opinion trying to add in these types of controls would be... gilding the lily. The "2.5D" aspect might make them feel out of place.
The beauty of the style is the simplicity.
Just my 2 cents anyway.
Having said that... those characters would be a piece of cake to add one of these rigs to. They are very simplistic. Especially if you use point motion or switch layers for the lip sync. My characters have boned mouths which is proving a chore to adapt... better than my first version by far. Way fewer bones.
If you wanted that type of control and felt some element of those characters is missing because of it... then i would say give it a shot. If you just want to add it because it seems cool... well... that's up to you.

-vern
I came up with another script addition for my version of this.
It is based on the flip layer script.
The flip layer script flips a layer's z depth based on the position of a bone. I added a feature that... scales a bone the same on either side of the "flip".
For instance the eyes. Let's imagine the two eyes get closer together as the head turns and you are using the scale of a bone to accomplish this. You can't do that with one bone scale because on the other side of the turn the scale reverses and the eyes move in the wrong direction.
My script uses the same layer flipping bones to make the scale of a bone the same on either side of a turn. If the scale is 1.2 on the left, it is 1.2 on the right.
It took me a while to wrap my head around this. I kept thinking I could use two bones, one with a reversed scale constraint... nope. Has to be scripted. In order to do what I need it to the same bone must scale the same on either side.
This creates a result very similar to Genete's spring gizmo but with just one bone instead of 3. Just 1 bone!! Genete!!! ONE FREAKING BONE!
In the begging on this journey I started, what seems now like ages and ages ago, I had wished for a way to "reverse" a constraint at a halfway point. I even tried to script this but the constraints wouldn't update in real time when changed via a script so I gave that up. Then Genete came up with that fantastic spring gizmo which eliminated the need for it.
Now I got something that works perfectly. The really really cool part is... it uses so few bones and in the script each "side" is "unique" and it "knows" left from right... so... you can increase or decrease the scale amount for each side for a better "3D" simulation.
And you could use constraints for any other bone and offset the children of these bones so they "translate" at different values... for elements that "spin" faster or slower.
Now I am thinking this could be applied to ANY movement of a bone... rotation, translation.
You could have a bone that moves in opposite directions on either side. Once you hit that middle point the direction reverses creating a mirror image of the motion.
This is new as of today... so I need to percolate it through my head to see what the potential is.
I also want to write a "general" script so you guys could play with it. I need to come up with bone naming rules for the different values based on the flip bones. I should be able to add all the flipping to one script; layer, rotation, scale, translation.
My thought is... name a bone with an extension like:
bonename.tx (flip x translation)
bonename.ty (flip y translation)
boneame.r (flip rotation)
bonename.s (flip scale)
Flipping the y translation... I just thought of that... it would require an optional set of flipping bones that go up and down.
I am thinking I could also add in all the other scripting gizmos like transRotate, RotateTrans, TransScale, etc etc... have the whole thing in one package... have to come up with a complex bone naming structure to do that...
bonename.r.trMstr
(master bone flips)
bonename.trSlv
(slave bone rotates based on master translation. Flip happens automatically based on the master.)
If you are interested in this and have any ideas for naming the bones or a better idea to identify bones for all these features in one script let me know.
I am flipping out right now... forgive the pun.
-vern
It is based on the flip layer script.
The flip layer script flips a layer's z depth based on the position of a bone. I added a feature that... scales a bone the same on either side of the "flip".
For instance the eyes. Let's imagine the two eyes get closer together as the head turns and you are using the scale of a bone to accomplish this. You can't do that with one bone scale because on the other side of the turn the scale reverses and the eyes move in the wrong direction.
My script uses the same layer flipping bones to make the scale of a bone the same on either side of a turn. If the scale is 1.2 on the left, it is 1.2 on the right.
It took me a while to wrap my head around this. I kept thinking I could use two bones, one with a reversed scale constraint... nope. Has to be scripted. In order to do what I need it to the same bone must scale the same on either side.
This creates a result very similar to Genete's spring gizmo but with just one bone instead of 3. Just 1 bone!! Genete!!! ONE FREAKING BONE!
In the begging on this journey I started, what seems now like ages and ages ago, I had wished for a way to "reverse" a constraint at a halfway point. I even tried to script this but the constraints wouldn't update in real time when changed via a script so I gave that up. Then Genete came up with that fantastic spring gizmo which eliminated the need for it.
Now I got something that works perfectly. The really really cool part is... it uses so few bones and in the script each "side" is "unique" and it "knows" left from right... so... you can increase or decrease the scale amount for each side for a better "3D" simulation.
And you could use constraints for any other bone and offset the children of these bones so they "translate" at different values... for elements that "spin" faster or slower.
Now I am thinking this could be applied to ANY movement of a bone... rotation, translation.
You could have a bone that moves in opposite directions on either side. Once you hit that middle point the direction reverses creating a mirror image of the motion.
This is new as of today... so I need to percolate it through my head to see what the potential is.
I also want to write a "general" script so you guys could play with it. I need to come up with bone naming rules for the different values based on the flip bones. I should be able to add all the flipping to one script; layer, rotation, scale, translation.
My thought is... name a bone with an extension like:
bonename.tx (flip x translation)
bonename.ty (flip y translation)
boneame.r (flip rotation)
bonename.s (flip scale)
Flipping the y translation... I just thought of that... it would require an optional set of flipping bones that go up and down.
I am thinking I could also add in all the other scripting gizmos like transRotate, RotateTrans, TransScale, etc etc... have the whole thing in one package... have to come up with a complex bone naming structure to do that...
bonename.r.trMstr
(master bone flips)
bonename.trSlv
(slave bone rotates based on master translation. Flip happens automatically based on the master.)
If you are interested in this and have any ideas for naming the bones or a better idea to identify bones for all these features in one script let me know.
I am flipping out right now... forgive the pun.

-vern