WIP - "FKIK manipulate bones" tool.

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

Moderators: Víctor Paredes, Belgarath, slowtiger

User avatar
GCharb
Posts: 2270
Joined: Mon Oct 10, 2005 2:31 am
Location: Montreal, Quebec, Canada
Contact:

Post by GCharb »

I do get messages sometimes, I just ignore them, but it does not slow because of it!

You could send me the file so I have a look at it, I did quite extensive work with the script.
User avatar
uddhava
Posts: 318
Joined: Tue Nov 04, 2008 7:24 pm
Location: American back in Hungary

Post by uddhava »

GCharb wrote:I do get messages sometimes, I just ignore them, but it does not slow because of it!

You could send me the file so I have a look at it, I did quite extensive work with the script.
Finally found the problem. Seems like I accidentally had two "aim" bones. I guess I selected the wrong bone when I named the shin bone.

I am too tired and a little sick today. Happy I figured it out.

Thanks for your time.

udd
jonbo
Posts: 896
Joined: Thu Apr 08, 2010 2:53 am

Post by jonbo »

Hey Udd, I was just coming to tell you what I found and see you have figured it out. Yup, that other bone was named wrong. Interesting scene though. Go get some rest :)
User avatar
GCharb
Posts: 2270
Joined: Mon Oct 10, 2005 2:31 am
Location: Montreal, Quebec, Canada
Contact:

Post by GCharb »

Yeah, that was my first guess as well, bad naming, good you solved it!
User avatar
capricorn33
Posts: 249
Joined: Sun Oct 02, 2005 9:49 am
Location: Finland
Contact:

Post by capricorn33 »

***UPDATE***

I have updated the FKIK-tool and the embedded script.
There are some small but important bugfixes......

Check out the first post in this thread for more info and links.


cheers.
capricorn ( - just call me "cap")
children's tv pro, character animator
User avatar
funksmaname
Posts: 3174
Joined: Tue May 29, 2007 11:31 am
Location: New Zealand

Post by funksmaname »

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

Post by capricorn33 »

There was a little bug in the newly updated scripts that caused the FKIK tool to crash if you tried to use it on a rig without trg/aim bones and no embedded script loaded. This is fixed now.


MEANING:

The FKIK manipulate tool is now "transparent". Whenever you use it on a rig where there are NO .trg or .aim-bones present it should function exactly like the original LM manipulate bones tool. You shouldn't notice any difference at all.

Only when you have renamed bones to [whatevername].trg and [whatever].aim and loaded the embbeded script the IK magic comes into function...


So please DOWNLOAD THE SCRIPTS and INSTALL THEM AGAIN on top of the files released a couple of days ago.


check the download links in the first post of this thread.


(..and please tell me of you find bugs or other strangeness...)

cheers
cap
capricorn ( - just call me "cap")
children's tv pro, character animator
User avatar
capricorn33
Posts: 249
Joined: Sun Oct 02, 2005 9:49 am
Location: Finland
Contact:

Post by capricorn33 »

My head starts to hurt when I try to deal with vectormaths and trigonometry... can anyone help me? Should be easy for anyone who knows the stuff.

I have a small and quite easy fix to do the FKIK tool to make it completely hybrid (possible to use FK or IK on *all* bones in the skeleton) and also make nesting of .trg bones/groups possible...

I only need to figure out this problem first:

I know the rotation value from my master bone (bone A in the figure), I know the x- y- values of the masterbone's position (origo point in the fig, lets call that point (v(x0, y0)) and I know the initial position of the slave bone (v(x1, y1).
Imagine a vector going from origo to v(x1,y1), rotate that vector with the same rotation value as the masterbone A.

What is the new value (v(x2,y2))of that imagined vector's endpoint, and how do I calculate it in lua?

I'm losing hair over this. :-(
EDIT: which actually is no problem to me, since I am already bald. :-D



Image
capricorn ( - just call me "cap")
children's tv pro, character animator
User avatar
capricorn33
Posts: 249
Joined: Sun Oct 02, 2005 9:49 am
Location: Finland
Contact:

Post by capricorn33 »

I posted this question at the AF forum too, and ponysmasher kindly replied there:
http://www.kelleytown.com/forum/animato ... hichpage=5
He wrote exactly the code I need to solve the problem and get on with my work on the FKIK tool. THANKS, ponysmasher! :-)


I wonder...

Is there possibly any even simpler way to go about it? It's after all very basic AS bones rotation stuff, one bone following the rotation of the parentbone... the difference being that there is no actual parentbone going from origo to v(x1,x2)...

(not that there is anything very long or complicated about ponysmasher's solution, it's short and neat and completely accurate... I just wonder if there possibly is any other way to get to the same result?)
capricorn ( - just call me "cap")
children's tv pro, character animator
User avatar
funksmaname
Posts: 3174
Joined: Tue May 29, 2007 11:31 am
Location: New Zealand

Post by funksmaname »

did you manage to make any progress with the FK/IK functions? Keeping a beady eye on this one :)
User avatar
capricorn33
Posts: 249
Joined: Sun Oct 02, 2005 9:49 am
Location: Finland
Contact:

Post by capricorn33 »

Hey Funks,

I must confess that I'm having some troubles to wrap my head around the really basic stuff when it comes to AS vector- / trigonometry- / bone calculation...
Even if I know, in theory, pretty exactly what I want the script to do (look at the figure in the earlier post)... and even with ponysmasher's friendly help I found that I over and over got stuck trying to get those f****g bones to rotate and move around the way I need them to... :evil:

Could really need some kind of a "scripts beginner's course" in how to control the exact positioning and movement of bones.


I would also like to tidy up the code in the script, as it is pretty messy right now. This means that I would have to reconstruct big parts of it, which of course takes some time.


Both these things along with the fact that I'm once again in a situation where I am overwhelmed by other work has forced me to put this thing on the shelf for a while... hope to be back at it soon, when my work situation allows...
capricorn ( - just call me "cap")
children's tv pro, character animator
User avatar
funksmaname
Posts: 3174
Joined: Tue May 29, 2007 11:31 am
Location: New Zealand

Post by funksmaname »

Thanks for the update... I find often trying to forget about a problem I have will magically solve itself in my subconcious over time - then one day I'll wake up with a 'A-HA!' moment.

Glad you're busy - worse things happen at sea. :)
User avatar
capricorn33
Posts: 249
Joined: Sun Oct 02, 2005 9:49 am
Location: Finland
Contact:

Post by capricorn33 »

Just downloaded 8.1 and read the list of improvements...

"Improvements added to LUA scripting interface:
21754 Embed scripts by scripting interface"


YESSS! can't wait to try it.
:)
capricorn ( - just call me "cap")
children's tv pro, character animator
User avatar
funksmaname
Posts: 3174
Joined: Tue May 29, 2007 11:31 am
Location: New Zealand

Post by funksmaname »

that sounds like chinese to me, but if it makes you happy it can only be a good thing! :)
User avatar
Lukas
Posts: 1336
Joined: Fri Apr 09, 2010 9:00 am
Location: Netherlands
Contact:

Re: WIP - "FKIK manipulate bones" tool.

Post by Lukas »

This looks interesting. The embed script works fine, but what does the tool do? The embedded script provides with nice IK. Can I animate with FK on the same bones using the tool?

The tool says: "FKIK Manipulate bones (alt = single bone rotate) - - NOTE: embedded script needs to be activated for exact interpolation"

I have no idea how to work with it though? alt + dragging a bone doesn't seem to do anything I can't do with the normal bone tools.
Post Reply