Incremental contorlled bone.

Moho allows users to write new tools and plugins. Discuss scripting ideas and problems here.

Moderators: Víctor Paredes, Belgarath, slowtiger

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

Incremental contorlled bone.

Post by Genete »

It is possible to have a bone clone that are affected by a master one but only with incremental values?

For example
Frame 5:
master xpos= 1.0
slave xpos= -0.3

Frame 10:
You move master to xpos = 1.4
then slave moves to 0.1 ... [0.1 = -0.3 + (1.4 - 1.0)]

Also I want the slave bone "free". That is, it can have its own alone keyframes.
I want the slave bone to be slave in all its contraints except for angle limits and bone dynamics and if it is possible that the master bone can be in any other layer.

Thank you admire scripters!!!
Genete
User avatar
heyvern
Posts: 7035
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

This is hard to get my head around...

Could you create an AS file that shows the resulting animation as if this script already existed?

I can't figure out how the incremental position for the slave works. Would this be like a hold interpolation key frame? Like steps? Or do you just want to limit the movement of the bone?

-------------------

The other problem would be the keys on the slave. I've found whenever I control a bone with a script there is absolutely no way to move it around on it's own.

If a bone has its position controlled then you can't change it by hand. If the rotation is controlled you can't rotate it. Only properties of the bone that aren't controlled by the script would be keyable by hand.

The script controls the slave bones movement from a layer script that is running on every frame. Until there is a way to turn a script on and off (which I think could be done using a bone of all things) once a bone is controlled it's controlled.

I did have an idea where you could "turn off" a script by changing the location or rotation of a bone like a light switch. Imagine a bone as a toggle. Rotate it this way the script is active, rotate it another way, the script is inactive.

Lately I am moving away from using a script to add key frames. Instead I only change the property of an element by modifying it on that frame with out setting a key frame. I find this to be MUCH easier. And now that I found out the trick of doing things to ONE key frame on frame one or zero I am doing some cool things. I limit the number of keys to just one bone that causes the motion of other bones.

In this way I think you could interactively turn scripts that control things on and off much more easily.

p.s. I miss Rasheed. I hope he's okay. Haven't heard from him in ages. I think he would get a kick out of my recent AS scripting discoveries.

-vern
Patmals
Posts: 551
Joined: Tue Aug 08, 2006 7:19 am
Location: Nagoya-shi, Japan

Post by Patmals »

I know NOTHING about scripting but, can't this be done by numeric input? in the X, Y, Z etc field boxes?

maybe i don't understand what Genete is asking so i apologise if i am totally off-center here.
User avatar
heyvern
Posts: 7035
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

Yes this can be done by hand.

Anything done with a script can be done by hand. The power of the script is that it AUTOMATES it. You don't have to do anything it just happens like magic... like dominoes falling or a Rube Goldberg machine.

By taking out the tedium of the animation process you can focus more on animating the characters acting than clicking on 50 bones to create the correct key frames.

It really does feel like magic sometimes. ;)

-vern
Patmals
Posts: 551
Joined: Tue Aug 08, 2006 7:19 am
Location: Nagoya-shi, Japan

Post by Patmals »

oops, my bad.. :oops:

It would be a nice script though! :)
User avatar
heyvern
Posts: 7035
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

No need to apologize. It was a good question.

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

Post by Genete »

Until tonight I cannot do it in AS but I will show you with a table of frames and values for bones in each frame:

(A "*" means a keyframe)

BEFORE MOVE THE MASTER BONE

Code: Select all

Frame   MasterBoneAngleValue   SlaveBoneAngleValue
01 0    10*
02 0    11
03 0    12
04 0    13
05 0    14
06 0    15
07 0    16
08 0    17
09 0    18
10 0    19
11 0    20
12 0    21
13 0    22
14 0    23
15 0    24*
AFTER MOVE MASTER BONE IN FRAMES 4 and 7.

Code: Select all

Frame   MasterBoneAngleValue   SlaveBoneAngleValue
01 0*    10*
02 0     11
03 0     12
04 0*    13*
05 10    24
06 20    35
07 30*   46*
08 30    47
09 30    48
10 30    49
11 30    50
12 30    51
13 30    52
14 30    53
15 30    54*
A visual example tonight.
Thanks
Genete
Posts: 3483
Joined: Tue Oct 17, 2006 3:27 pm
Location: España / Spain

Post by Genete »

http://genetita.googlepages.com/relativ ... raint.anme

:oops: Like always, I request your help and then I discover how to do it by myself. I'm using this technique continuously and did not realize what I was already doing it....

If I insert a bone in the middle of the master to the slave bone I can have a slave bone that have its "own freedom". it is only valid for rotation and translation, not for scale. Bone dynamics can be used (a good new!!). If the angle constraint is direct, bone dynamic is disabled for the slave (you can check it but it don't work).

I'm looking for this behavior to have a single master bone for a big amount of springy mechanisms but at the same time don't loose the ability of manipulate the individual springy mechanisms for a particular pose. For example the last 3D hand have a separate layer for every finger. If I use your "master control slave at any place in any other layer script" I cannot twist the fingers for a particular pose of the hand because they are solid rigged to the master bone. Now I can manipulate a ton of slave bones at the same time without loosing the possibility of give small movements to the individuals. In the current 3D hand design I have to manipulate as many masters as fingers are in the hand, and every one in a different layer... Now with this idea I and your script I can save time without loosing expression.

We can call it "flexible constraints" for further comments. :wink:
(is it like a rostrum camera but with bones??)

Thanks for try to understand my request and also I hope that the explanation open you a new window to more "freedom" to manipulate bones...

Best
Genete
Post Reply