Vern's awesome AIM

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

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
chucky
Posts: 4650
Joined: Sun Jan 28, 2007 4:24 am

Vern's awesome AIM

Post by chucky »

Just a note about Vern's great aim bone script.
You can use it for more than feet. Here are are few examples.
The perspective is self explanatory,using the scale method.
It can be taken much further than this version with the scaling of the uprights controlled by another aim bone on top with a target bone for each upright.

The wolf's back teeth are using the same method to create an automated parallax and waggle independent of the face turn.
The ghoulgirl's skirt is kept under control,using it.
I just chucked in the new NikNak just for the hell of it.
Image
ImageImageImage
These are still in development for a short toon.
Vern it would be great if we could ulitise both the scale and non scale aims in the same skeleton, is this possible?
Wouldn't it be great if we could save dynamics pre-sets?
chucky
Posts: 4650
Joined: Sun Jan 28, 2007 4:24 am

Post by chucky »

So ok the full grid didn't quite work.
Image
I'm sure it can, ill update this if i get it to work fully
So far I end up with odd upright lengths and angles.
I could fake it up but I would have to use scale and angle control bones for the uprights and key them. hmmmm. :(
Last edited by chucky on Thu Jul 24, 2008 9:05 am, edited 1 time in total.
User avatar
heyvern
Posts: 7042
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

Wow!

Thanks for showing ME what this script can do. I really had no idea. As I said in my PM to you, I only wanted to use it for foreshortening of limbs for "2.5D" bodies. It worked okay for this but the rotations were linear since translation is in a straight line.

Give me a chance to refresh my memory. To be perfectly honest, I wrote this script ages ago and have completely forgotten how it works. :oops: and will need to review the code. It should pop back pretty quick once I look at it again.. it usually does.

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

Post by heyvern »

I took a quick look at the script.

I remember something. There is weird results when you have "odd" parenting of all the bones. I have to go through and make sure that I am accounting for all the cumulative bone rotations and translations. I think there is still some math I've got wrong in some spots. Probably why your "grid" didn't work as expected.
Vern it would be great if we could ulitise both the scale and non scale aims in the same skeleton, is this possible?
I have the version I'm using which might be different. It does have the option to turn off scaling for each bone individually by including a bone with the .sct extenstion (scale toggle). If you create a bone like that with the same name as the aiming bone and the .sct extension that bone won't scale.

Or do you mean something else? Like an animated scale toggle? That is the last thing I was working on when I stopped. A way to "freeze" the scaling so the rotation takes over. Then "unfreeze" it. I was going to use the rotation angle from 0 of the scale toggle bone to determine the amount of scaling at a particular spot. This would fix my body rig linear translation problem I had.

EDIT:

The odd rotations on the grid is due to the fact that the parent aim bones of the upright bones are rotating. This rotation is added to the rotation caused by the upright bone aim rotations. This is the cumulative rotations and translations I need to account for. It gets very tricky.

-vern
chucky
Posts: 4650
Joined: Sun Jan 28, 2007 4:24 am

Post by chucky »

AAAhh a toggle ?
That's exactly what I meant.
Great to hear, so I just use .sct instead of .trg?
And yes the grid goes a bit bonkers at he mo' :lol:
User avatar
heyvern
Posts: 7042
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

chucky wrote:AAAhh a toggle ?
That's exactly what I meant.
Great to hear, so I just use .sct instead of .trg?
And yes the grid goes a bit bonkers at he mo' :lol:
As long as you have the same script I am using. It could be that I made changes to it and never uploaded. Check the script file. It should be near the top, a reference to a ".sct". If that is in there you have the same one.

You need a .trg AND a .sct bone. The mere existence of the .sct bone causes the scaling not to happen. It doesn't toggle yet. i was planning to incorporate toggling in some way using that bone.

-vern
chucky
Posts: 4650
Joined: Sun Jan 28, 2007 4:24 am

Post by chucky »

Hmmm I don't seem to have that version.
It amazes me to see how few lines of script can get these things to happen, very clever Vern.
User avatar
synthsin75
Posts: 10280
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Post by synthsin75 »

Wow nice work chucky! Both with that script and the characters. I'd love to see how you construct them.
User avatar
heyvern
Posts: 7042
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

chucky wrote:Hmmm I don't seem to have that version.
It amazes me to see how few lines of script can get these things to happen, very clever Vern.
Here's the latest one that I was working with. I was trying to come up with an IK solution. There is probably things in it not being used yet.

http://www.lowrestv.com/anime_studio/sc ... one_ik.lua

It works the same except for the .sct bone extension to turn off scaling. I will eventually make this a toggle somehow with it's rotation value.

Instead of a pair of bones you have an option for a third in the set:

Mybone.aim
Mybone.trg
Mybone.sct (optional to turn off scaling)

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

Post by heyvern »

I just made a small change to the script.

If the rotation of the sct bone is 0 it works as described above. It the sct bone is rotated to anything other than 0 the scale value of the aim bone is ADDED to the rotation value of the sct bone (in radians of course).

This allows for "locking" the scale at a specific value.

This might be useful. I'm going to play around with it eventually.

All I have time for at the moment.

-vern
User avatar
Víctor Paredes
Site Admin
Posts: 5818
Joined: Wed Jan 26, 2005 12:18 am
Location: Barcelona/Chile
Contact:

Post by Víctor Paredes »

wow, chucky, I love this script, but I never thought in something like this.
vern, I´m far of my computer now, but i´ll check the new feature soon. thanks again!
User avatar
heyvern
Posts: 7042
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

Chucky, if you could give me an idea of what would be useful to make this script better that would help. (other than fixing the parenting issue, haven't figured that out yet).

I have a couple of options on how this should work. The last version had the percentage scale "lock" but I could implement that in several different ways.

For example, the scale of the sct bone could change the "max" scale of the aim bone. So you could change how long the aim bone gets before stopping.

Another thing is right now the "regular" scaling of the aim script stops when the bone reaches it's max length (it's "length" on frame 0). This could also be removed so that the bone's scale to reach the target is unlimited. It would keep "stretching" no matter how far the target is.

Another thing that might be useful is to tie the scale of the aim bone to the children bones similar to your "grid" example. For example in a pseudo perspective with the upright bones as children of the lone aim bones... if they scaled in the same proportion as the aim bone it would simulate the same perspective.

Maybe all of these options could be added somehow.

That parenting bone weird rotation drives me nuts. I just can't quite figure it out yet. It's hard enough figuring the math with just a single root bone... add it to a chain of bones and it becomes a freaking nightmare. ;)

-vern
chucky
Posts: 4650
Joined: Sun Jan 28, 2007 4:24 am

Post by chucky »

Vern, your dedication is profound. :D
if they scaled in the same proportion as the aim bone it would simulate the same perspective.
I think this could be useful to animators, we could make simple psuedo 2.5 d objects and sets quite simply I think using this method.
I had a look at the script :roll: :lol: but I found it unfathomable so I have to say it is difficult to make suggestions when I have no idea how possible or difficult they might prove to be. Good 'onya Vern. 8)
Post Reply