Page 1 of 1

Rotation to scaling bones.

Posted: Tue Apr 10, 2007 9:33 pm
by cuebit
Hi all,

With great interest i followed the scripting discussion of rotatetrans and transrotate.

Does a script exist which makes it possible to convert rotation to scaling of bones with the bones to be scaled still attached to another bone?
It would be a great help because i figured out a way to make a knee or arm bend much more natural.

With enough response i can explain the whole thing.

http://www.cuebit.nl/downloads/Puma.swf

greetz.

Maarten[/quote]

Posted: Tue Apr 10, 2007 10:36 pm
by heyvern
There may be one soon. ;)

I am thinking of writing one for doing this using translation of a bone rather than rotation but rotation is easy to add in.

I want the translation of a bone to create "foreshortening" of a limb... like in 3D.

Since those other scripts exist it is a matter of changing one animated channel to another.

So just to be clear, you want a bones rotation to control ANOTHER bones scale?

One problem I can see is if a bone is rotated how much will another bone scale? There wouldn't be any way to control this with a setting.

The best solution might need to be done with an "extra" bone based on the length.

For example:

Rotating bone A rotates bone B which scales bone C. The length of bone A controls how much scaling of bone C. Making bone A shorter or longer will increase or decrease the amount of scale on bone C to adjust it. We can't fiddle with bone B's length since it may be part of the bone rig. Does this make sense?

-vern

Posted: Wed Apr 11, 2007 8:01 am
by cuebit
Hi Vern,

Thanks for your reaction.
So just to be clear, you want a bones rotation to control ANOTHER bones scale?
That's right
One problem I can see is if a bone is rotated how much will another bone scale? There wouldn't be any way to control this with a setting.
How about the solution in Anime studio itself?
If you take a look at the bone constraints dropdownbox then you can set a bone to control the angle, position or scale of another bone in the text input box
Multiplication or deviding the factor is simply to fill in a number greater or less then 1.
I s it possible to work with such an input box?

Rotating bone A rotates bone B which scales bone C. The length of bone A controls how much scaling of bone C. Making bone A shorter or longer will increase or decrease the amount of scale on bone C to adjust it. We can't fiddle with bone B's length since it may be part of the bone rig. Does this make sense?
Yes that all makes sense.
Since you have a better understanding of LUA then me i guess that's the way it has to be done.

The only thing i don't understand is your 'foreshorting' explanation.
What's exactly the point here?

Maarten.



[/quote]

Posted: Wed Apr 11, 2007 10:08 am
by heyvern
I won't be using the constraints box for this so I won't have access to those settings. It would be done with an extension on the name of a bone. This is the easiest way to do it.

I suppose a more talented programmer might be able to add to the bone constraints menu... but... I'm not up to that challenge yet.

The foreshortening I was talking about is when an arm moves towards the camera the forearm looks "shorter" so the bone has to scale down to simulate this. I want to make this process easier to animate by having scale based on the position of another bone.

Just thinking about this right now but still the script would be essential to do it.

-vern

Thanks

Posted: Fri Apr 20, 2007 2:29 pm
by cuebit
Hi Vern,

Sorry for my late reaction,

thank you for thinking over the possibilities and being interested.
I'm Curious about the things you come up next.

Maarten