Animations - Creating a Curve2IPO wizard

Re: Animations - Creating a Curve2IPO wizard

Postby Grogyan » Sat Aug 16, 2008 7:10 pm

Just tried your addition Lontahv and it is screwing up the animation, cause I am giving the empty a "childof" constraint which is adding on those vectors on top of the location in world space.
Ideally in that case the curve itself would have the ipo curves, but in my very early test found that screws it up even further, ie the curve is flying and the objects are attempting to fly around the path as well

gonna look at the API a bit further to see if there is some other way to do it, but it does look like to me that the Delta Curves are the way to go, and change PyPrp to code into local space Delta curves
Better to have loved and lost than never to have loved at all
User avatar
Grogyan
 
Posts: 1203
Joined: Thu Oct 11, 2007 1:27 am

Re: Animations - Creating a Curve2IPO wizard

Postby Grogyan » Sat Aug 16, 2008 9:13 pm

Just created a wiki page for this wizard, to save me explaining it every time, and long overdue

With the script as is at this stage using global space (standard) IPO's to give people an idea of what is happening, and i'll have to change it when new features are implemented

http://guildofwriters.com/wiki/Making_Rides
Better to have loved and lost than never to have loved at all
User avatar
Grogyan
 
Posts: 1203
Joined: Thu Oct 11, 2007 1:27 am

Re: Animations - Creating a Curve2IPO wizard

Postby Grogyan » Sun Aug 17, 2008 10:30 pm

I asked a colleague of mine at work about how to deal with signed numbers to alleviate unnecessary work when I come to put rotation curves in.

I have this plan, as an example just getting the yaw or Z rotation value

At the first Knot get its location in 2D space ie just X and Y coordinates
At the first Handle get is location in 2D space

eg
Axis Knot value Handle value
X 4 6
y 3 -7

X = abs (Knot X value) + abs (Handle X Value)
Y = abs (Knot Y value) + abs (Handle Y value)

(new value) Tangent-1 = X / Y
new value = ~57 degrees

In blender they use Euler notation with is the angular rotation divided by 10

So in the first BezTriple matrix you would have
Fame number, 5.7, 0

And do the same but opposite for each handle too looking back at the knot


Thats the theory that I have investigated, you can comment on it, i'm soon gonna try and implement this :shock: :?
Better to have loved and lost than never to have loved at all
User avatar
Grogyan
 
Posts: 1203
Joined: Thu Oct 11, 2007 1:27 am

Re: Animations - Creating a Curve2IPO wizard

Postby Grogyan » Fri Aug 22, 2008 3:42 pm

Whoopee, I think I have found a shortcut to make this even simpler to do and its in the Blender Mathutils

Blender.Mathutils.AngleBetweenVecs

but its not working when I implement it, got some more playing around to do.

Another upside, I got a function to workm and taker in data external from the function, and it was so easy.
Better to have loved and lost than never to have loved at all
User avatar
Grogyan
 
Posts: 1203
Joined: Thu Oct 11, 2007 1:27 am

Re: Animations - Creating a Curve2IPO wizard

Postby Grogyan » Fri Aug 29, 2008 6:00 pm

I couldn't get that AngleBetweenVecs () working, kept on saying that the numbers are not of the same size, which they are - stupid API.

So I decided that it was just as easy to calculate the angles myself.

2 things I did wrong here, well one actually
The first is the using their aTan, aSin, aCos functions results in angles in radians, this isn't so bad as I know that most places use radians instead of degrees - easy fix to do, add in a multiplier of (2 x PI)
The other, just playing around with simple angular degrees, of 90 angular degrees for each rotation in the curve, wasn't producing the right effect, I know I read up about Blender's Euler notation, so I did the implementation of Angle / 10, but that didn't work out, then it hit me, only in that module does it use Euler notation, !@#$% API (I can't say the words I really want to say here) - so my next task is to complain, heavily to the Blender foundation to fix that for Blender 2.5 cause even with reading forums pertaining to the API, people have the same angst annoyance with it, and there is only one reason to do that which isn't logical. That reason is to bring the curves for rotation down into the user's FOV in the IPO editor.


So when I have done this script I need to put a warning in for people wishing to change the IP on the fly, that they need to input the numbers divided by 10 less than what are use to, sorry guys, I have no choice in the matter
Better to have loved and lost than never to have loved at all
User avatar
Grogyan
 
Posts: 1203
Joined: Thu Oct 11, 2007 1:27 am

Re: Animations - Creating a Curve2IPO wizard

Postby greypiffle » Fri Aug 29, 2008 10:03 pm

Hey. It's all above my head. So far, I'm just a modeler. Not a scripter. Still, from my ignorance, I think you are doing a very good job here.
TrueSpace and Harry Potter. like Peanut butter and jelly.
greypiffle
 
Posts: 48
Joined: Fri Nov 16, 2007 9:45 pm

Re: Animations - Creating a Curve2IPO wizard

Postby Grogyan » Sun Sep 07, 2008 1:42 am

greypiffle wrote:Hey. It's all above my head. So far, I'm just a modeler. Not a scripter. Still, from my ignorance, I think you are doing a very good job here.

Thanks, it all an uphill battle. Just imagine trying to climb an 80 degree sheer slope, and thats the difficulty i've faced with.

An update, i've been having a couple of personal issues thats preventing me from even thinking about this project, it was, and I hope it will be again a welcome distraction from my very sad, isolated existance
. Show Spoiler
Better to have loved and lost than never to have loved at all
User avatar
Grogyan
 
Posts: 1203
Joined: Thu Oct 11, 2007 1:27 am

Re: Animations - Creating a Curve2IPO wizard

Postby Grogyan » Wed Sep 17, 2008 12:53 am

I'm back onto working out this problem.

The rotation, currently only the Yaw or Z axis rotation, I have the vectors, and using their relationship in a right angle triangle I have some sort or rotation going on, just not what I am after.

Anyone here familiar with calculus?

What I think is making this problem worse is that I am just staying with a 3x3 array called a BezTriple, even though a bezier segment has traditionally has 4 points, but because the first and last handle share the same knot I am following a path that appears more logical, but appearances can be deceiving, I hope this isn't a case of that

I can post the algorithm I am working on if anyone asks
Better to have loved and lost than never to have loved at all
User avatar
Grogyan
 
Posts: 1203
Joined: Thu Oct 11, 2007 1:27 am

Re: Animations - Creating a Curve2IPO wizard

Postby Trylon » Wed Sep 17, 2008 11:45 am

Grogyan wrote:Anyone here familiar with calculus?

Mine's a bit rusty, but well, it never hurts to try :)
Though I didn't exactly get the full problem, so if you could explain it in a bit more detail I might actually have a chance of helping out :D
One day I ran through the cleft for the fiftieth time, and found that uru held no peace for me anymore.
User avatar
Trylon
 
Posts: 1446
Joined: Fri Sep 28, 2007 11:08 pm
Location: Gone from Uru

Re: Animations - Creating a Curve2IPO wizard

Postby Chacal » Wed Sep 17, 2008 6:53 pm

I remember calculus very well. Don't you EVER mention it to me again.
Chacal


"The weak can never forgive. Forgiveness is an attribute of the strong."
-- Mahatma Gandhi
User avatar
Chacal
 
Posts: 2515
Joined: Tue Nov 06, 2007 2:45 pm
Location: Quebec, Canada

PreviousNext

Return to Grogyan's Journal

Who is online

Users browsing this forum: No registered users and 1 guest

cron