Genete! Springy bones 3D rotation with one bone.

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

Moderators: Víctor Paredes, Belgarath, slowtiger

User avatar
capricorn33
Posts: 249
Joined: Sun Oct 02, 2005 9:49 am
Location: Finland
Contact:

Post by capricorn33 »

Oh my god! :shock: This is fantastic!
I don't always follow you when you do the math nerd talk - but oh my god when you walk the walk, guys! This spherical rotation opens up 2.5D for real!
Genete wrote: The big problem will come when you try to make a shape order meanwhile the head is turning.
Perhaps so... But somehow I don't think it would surprise me one little bit if one of you two guys happen to come up with some kind of solution to that problem too, some day. :-)
But even so, this sphere simulation will be already extremely useful as it is... (even if the full 360 turn of a character might be troublesome.)

Keep it up. I'm following this thread with HUGE interest, and I think others are too.

Thanks, Genete and Heyvern. :-D
capricorn ( - just call me "cap")
children's tv pro, character animator
Genete
Posts: 3483
Joined: Tue Oct 17, 2006 3:27 pm
Location: España / Spain

Post by Genete »

Hi cap!
From my side, you and anyone is welcome to contribute in this researching thread. Any help is needed!

........

Heyvern: I have a suggestion to the script. Sometimes is not necessary to have a .Rx or .Ry bones (helper ones) for instance a 3D point what is placed in the ZY plane don't need .Rx helper bone. The script fails if one helper bone is missing.
Can you modify the script to avoid this for example giving a initial value of Rx = 0? Only if the helper bone exists the value will be its corresponding one.
Also the same for alpha and Ry. If a point is exactly placed at the X axis its Ry value and its alpha0 value are useless (both are 0).

I'm researching a very easy way to perform a 3D rig

Here a screen shot:
Image

You can see that there is a bone called "central". This bone is the local coordinate system. You can refer all the rig to this bone if you king the .pt bones to it.
There are two very small bones at the top of the head. They are the .Rx ones. These are the one I don't need and want the script to avoid them.
Also see the right helper bones. They go from the corresponding rotation center to the desired side view positions of the bones. Very easy to rig if you have the side view!!

My opinion is that so much .pt bones make the rig unusable. Sometimes points will not go to the" math" position. You have to tweak them to maintain the proper shape / volume. Only a few of them to perform proper speed of rotation is enough. That few bones will represent group of points that will be tweaked by actions later for example for a front, 3/4 and a side views. Once done you can interpolate always in the middle id needed.

What do you think?

-G
User avatar
heyvern
Posts: 7035
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

Piece of cake! Actually because of this change I removed nearly a third of the code! I was silly and had made it more complex than it needed to be. I combined all the bone data gathering in to one chunk instead of 2.
----

I hope this is what you wanted:

Ry (and alpha0) and Rx are optional. However you still need these two bones; masterY, masterX, and at least 1 .pt bone.

If either the Ry or Rx bones don't exist then those values equal 0 in the calculation.

Ry and alpha0 are the same bone so if you don't have Ry, alpha0 is 0 as well... is this correct?

Here is the new script. I gave it a different name than the last one so you don't overwrite it if it doesn't do what you expect.

The old one was called 3Dgrid4.lua

The new one is called 3Dgrid5.lua

http://www.lowrestv.com/moho_stuff/3Dgrid5.lua

-vern
User avatar
heyvern
Posts: 7035
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

Question for you Genete,

Would adding in scaling to the equation make the rig "better"?

What I mean is that other rig using scaling to simulate 3d works pretty well. I was experimenting with scaling in this rig and came up with a way to use two bones on a "point" for a whole shape that scaled in the x and y directions.

This could "replace" the need for a so many pt bones in the rig.

In my experiment the y bone scaled the circle on the y rotation and the pt bone scaled on the x rotation.

The "extra" y bone for scaling was a child of the pt bone since it doesn't move differently it just scales differently.

The only problem I had was determining the scale values. I couldn't get them to work properly because scale is completely different from translation.

Scale works with 1 as the "base" or 0 point. Going up is greater than 1, going down is lower than 1 but greater than 0.

I kept ending up with the scale going into negative numbers or larger than 1 when there was no rotation.t

Another problem was bone influence. The center of scale was the center of the mesh area so the bone didn't "cover" the shape correctly. To get around this I bound the left and right points of the circle for the pt bone and the top and bottom points to the y scale bone.

I could add scale into the equation if I knew how to base the value on 1 as the 0 point. You know how bad I am at math. ;)

-vern
Genete
Posts: 3483
Joined: Tue Oct 17, 2006 3:27 pm
Location: España / Spain

Post by Genete »

yes! That's what I said!
But Rx and Ry are not optional at the same time! if not there is no 3D rig at all!.

It works nicely! Less bones to have! :D
Thanks vern!
(also pretty simple to set the default value to 0. ...)

Any opinion about workflow from my previous post?

-G
Genete
Posts: 3483
Joined: Tue Oct 17, 2006 3:27 pm
Location: España / Spain

Post by Genete »

Regarding to add more features to the .pt bones it is something very interesting.
You know, the scale turn technique have a problem beacuse scale is linear and turning is not linear.
Let me think about it and I'll give you some pretty math to create a local 3D turn illusion with scale.
Quick thoughts:

1) A new helper bone to perform that? or scripted directly to the .pt bone?.
2) Do we want the .pt bone to have the ability to be modified by hand at any position (translate, rotate and scale)? If we "script" its values we loose that freedom.

Think about it and let's see what can we do.
Best
-G
User avatar
heyvern
Posts: 7035
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

As far as the workflow,

I am having a hard time understanding exactly what you are doing with the script so it looks fine to me! ;)

I have to admit I never quite understood some of your other 3D tutorials. I kind of understood but not enough to implement on my own.

I think the scale function should be linked to the pt bone. I understand that scale is "linear". I am thinking of using it in a way similar to the mouth controls on my original rig. I had a series of bones that translated at exponential amounts from one master bone. Each bone translating a little less or a little more than the one before it to create a "non linear" type of motion.

If there were two bones instead of one controlling scale on a part of the shape you could get around the linear scaling.

I am getting into using lots of bones again... but you had even more than that before. ;)

Regarding work flow again with this rig, personally I would like less freedom and less control.

What I mean is I would like more automation and fewer key frames. I would not want to have to do a lot of extra bone rotation and creating actions. I want this to just work by dragging one bone like in my original character rig.

That may not be possible. You seem to have better knowledge of the limitations of simulating 3D in 2D. My dream may not be attainable.

You talk about tweaking the point bone, and personally, I don't think you should be able to. It should always be controlled by the script/rig.

Besides there is no "easy" way to key frame any of the bones properties that are controlled by the script. Once a bone is under script control for rotation or translation you can't key that bone. You would need to make it a child of another bone that isn't controlled to do that. Like that "other.pt" bone you used in your file to change the center of rotation.

If that "other" bone is not controlled by the script you could move that bone freely and the children follow along still controlled by the script.

I want to keep working with you on this script/rig. I want to make the script do what YOU want it to do for now until I get a better understanding of how it all works.

The code is so simple it is easy for me to add features you request (within reason of course. ;) ). Like I said, if you give me the math I can plug it in. This is kind of fun. The best part is seeing how simple the AS files are compared to your other tests with all those bones.

I would like to see that 3D hand work with a tiny fraction of the bones. ;)

I am also hoping to learn more about 3D math by working with you on this. If I keep looking at this stuff and working with it, some of it might sink into my thick skull. ;)

I am still developing my own rig from the other rig discussion.

-vern
Genete
Posts: 3483
Joined: Tue Oct 17, 2006 3:27 pm
Location: España / Spain

Post by Genete »

I said that points would not be totally controlled by bones for one reason.
Regardless to the big amount of bones (less than with springy) I have realized that if you make a pretty front view, the simply horizontal translation of the points to its corresponding side view positions, will not produce a pretty side view. It is due to the curvature effect of the lines on each point. So or you change the curvature or you tweak the points.
As you can see in my giraffe model I have a lot of extra points to give curvature control by the position of them (those points are not part of the final shape). Those points will not be controlled for bones never. They have not 3D meaning. I prefer to control points instead of curvature (more visual).
Even an intermediate point (not final line) need different curvature depending on its position (side or front). Even more changes if you consider up and down movements. So, all points controlled by bones will produce again a 2.5D rig and not a 3D rig (the curvatures are valid for a -3/4 to 3/4 view only).
Then, if we want to push the model beyond 3/4 we need (in my opinion) hand point tweaking.
Anyway we can rig ALL the points of our models and later if needed teak points where needed (points and not .pt bones). I mean move points with move point tool.

Regarding to how to rig the model it is basically a question of:
1) Have the front and side models available.
2) Insert a "central" bone at the desired 0,0,0 position. In my screen shot it was the selected one. It must be horizontal to make all work properly.
3) All the .pt bones must be linked to it.
4) Each .Rx bone properties (length) can be easily found in the front view. Just make a bone with a length the same between the central x coordinate and the target .pt bone. If the .pt bone is at the left of the "central" bone just make its length negative and the same value. Every thing at frame 0.
5) Each bone .Ry is obtained from the side view. Place its origin at the imaginary position of the central bone in that view. Of course the side view is displaced from the front view (I have it in another layer) to make the front view clear ant not a mess of lines. Once you have placed the bone origin, place its end to the corresponding position of the .pt bone in the side view.

That's all.

See my WIP screenshots.

Image

Image

Also the ability of have "central" bones is a very interesting thing to make the limbs, fingers and so on. You can link them in cascade to perform a two or more sections limb.

Also the central bone allow you rotate the whole model in the Z axis!! Total control!!

I'm glad to give you the math. Also the understanding on 3D rig is an important thing to share. Once this tip is fully researched I should make a new video tutorial. It would be easier to understand.

Continue thinking on scale the .pt points.
-G
User avatar
heyvern
Posts: 7035
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

Ha ha!

I get it now! I get it! Yeeehaaa!

You use the front and side views to get the lengths of the bones for the points! That was the part I couldn't quite understand what it was for. You need that side view to determine where in "space" that point really is. Instead of just "guessing" or "making it up". Using the side view it's right there.

Sorry I am so dense. ;)

This makes more sense to me now. I think I could actually try this myself.

-vern
Genete
Posts: 3483
Joined: Tue Oct 17, 2006 3:27 pm
Location: España / Spain

Post by Genete »

Yeaaah it is more simple than you can imagine!

But wait! things come easier!!!
For example: to also determine the correct positions sizes of all the bones just use onionskin at a particular keyframe. For example to determine correct Rx Ry and alpha0 values just make a keyframe at frame 1 with alpha = 0 and also a keyframe at 2 with alpha = -90 then you can tweak the helper bones to fit the rig it is proper front and side positions. Just mark onionskin in the frame you want to tweak.

Let me play a little more with the giraffe and I'll post the results.

Cheers!

-G
User avatar
heyvern
Posts: 7035
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

This is great.

I can use a variation of this for my face rig to collapse and open the ears for the turn.

I was doing that "by hand" just trial and error with constraints on a set of bone. Now I can make it easier to set up. I actually had a front and side view of the ears drawn, and used those to make it look right. But I wasn't using any scientific method... just tweaking it.

-vern
Genete
Posts: 3483
Joined: Tue Oct 17, 2006 3:27 pm
Location: España / Spain

Post by Genete »

More even!

You can scale the "central" bone and all its children will move with its scale also!!!
:shock:
Genete
Posts: 3483
Joined: Tue Oct 17, 2006 3:27 pm
Location: España / Spain

Post by Genete »

Some progress with the giraffe:

Image
Image
Image

And here a sample swf for the nose hole only.

http://www.darthfurby.com/genete/Other/ ... irafa8.swf

The camera follow the nose because it moves so far away...

You are right vern! It is worse to rig all the points. It is perfect!!!!

:D :D :D :D :D :D :D :D :D :D :D

-G
Genete
Posts: 3483
Joined: Tue Oct 17, 2006 3:27 pm
Location: España / Spain

Post by Genete »

I'm absolutely surprised with the results of the 3D rig. Vern!!!! this is amazing!!!!

http://www.darthfurby.com/genete/Other/ ... afa8-3.swf
http://www.darthfurby.com/genete/Other/ ... rafa8.anme

For those that have not followed the thread. You must download the 3D mesh lua file. HERE and embed the file to the bone layer. There could be newer versions so review the whole thread (*).
It is a WIP file. Just concentrate in the nose.

Enjoy! :wink:
-G

(*)Vern, Can you edit your first post and link the latest stable 3Dmesh script file there?
Genete
Posts: 3483
Joined: Tue Oct 17, 2006 3:27 pm
Location: España / Spain

Post by Genete »

heyvern wrote:(These 2 bones are not part of a set. They control all the sets of bones. No extension required.)
MasterY -- master Y rotation (alpha) *
This is the bone that controls the Y rotation

MasterX -- master X rotation (beta) *
This is the bone that controls the X rotation
Vern, please write "masterX" and not "MasterX" because if not someone can be confused. The name doesn't matter, the important thing is that the script should have the same name.

-G
Post Reply