|
Modifying bone rotations.
#31845
08/11/04 02:16
08/11/04 02:16
|
Joined: Aug 2004
Posts: 11
colekindred
OP
Newbie
|
OP
Newbie
Joined: Aug 2004
Posts: 11
|
K one more question about A6 before I commite my project too it. This is simular to the IK question I asked before but diffrent LOL. does the engine allow modification of bone rotations in relation to thier keyframed rotations in real time.
For example. Lets say I have a character animated so he runs with keyframes. can I make lets say the spine twist 10 deg to the left in relation to its keyframe.
so if keyframe 1 set the spine to -5 deg, keyframe 2 set the spine to -10 deg, and keyframe 3 set the spine to +5 deg, could I add -10 to the vaules so keyframe 1 would = -15 deg, keyframe 2 = -20, and keyframe 3 = -5 ?
Current 3D work in progress
[url=http://www.rit.edu/~mrh9661/GargoyalNT.jpg]http://www.rit.edu/~mrh9661/GargoyalTailPersp.jpg
|
|
|
Re: Modifying bone rotations.
[Re: colekindred]
#31846
08/11/04 04:47
08/11/04 04:47
|
Joined: Oct 2003
Posts: 1,258 Virginia, USA
qwerty823
Senior Developer
|
Senior Developer
Joined: Oct 2003
Posts: 1,258
Virginia, USA
|
While I'm no "bones" expert, it looks what you are trying to do should work by doing a:
ent_animate(entity,frame,pct,0); // Set the frame to the pct. ent_bonerotate(entity,"spine",vector(10,0,0)); // To twist (pan) the spine 10 deg
Although base on what I think you are talking about, you want to have a seperate animation from upper body (like aiming a gun), and one for lower body (like running), and blend the two.
If you make an upper body one where at 0 percent its aimming left, and 50% its middle, and 100% its right. And a lower body which cycles the run. You should be able do to something like this:
ent_animate(entity,"run",run_pct,ANM_CYCLE); ent_animate(entity,"aim",aim_pct,ANM_ADD);
And that should do the same thing (without having to do the bone math yourself).
Never argue with an idiot. They drag you down to their level then beat you with experience
|
|
|
Re: Modifying bone rotations.
[Re: qwerty823]
#31847
08/11/04 05:43
08/11/04 05:43
|
Joined: Aug 2004
Posts: 11
colekindred
OP
Newbie
|
OP
Newbie
Joined: Aug 2004
Posts: 11
|
Thanks for the reply. I know I can seperate the mesh into two but thats sort of behind in todays market. As long as I can modify the bones rotation while still having the keyframes effect it i'm happy (I don't mind doing the math). That way I can achive a huge amount of animations that will blend seamlessly.
Just to be clear if I add 10deg to a bone does it add it to its current rotation that is set by the keyframes or would the keyframes stop effecting the bone all together?
Current 3D work in progress
[url=http://www.rit.edu/~mrh9661/GargoyalNT.jpg]http://www.rit.edu/~mrh9661/GargoyalTailPersp.jpg
|
|
|
Re: Modifying bone rotations.
[Re: colekindred]
#31848
08/11/04 06:18
08/11/04 06:18
|
Joined: Oct 2003
Posts: 1,258 Virginia, USA
qwerty823
Senior Developer
|
Senior Developer
Joined: Oct 2003
Posts: 1,258
Virginia, USA
|
Quote:
Thanks for the reply. I know I can seperate the mesh into two but thats sort of behind in todays market.
One mesh, but two seperate animations. One animation that moves the upper body bones (leaves the leg bones alone), and another that moves the leg bones. Then you set each one independently.
Quote:
As long as I can modify the bones rotation while still having the keyframes effect it i'm happy (I don't mind doing the math). That way I can achive a huge amount of animations that will blend seamlessly.
Yes, the first way I described it should work that way.
Quote:
Just to be clear if I add 10deg to a bone does it add it to its current rotation that is set by the keyframes or would the keyframes stop effecting the bone all together?
Yes, the manual states that all bone updates are relative to their current positions, and if you need to do absoulte move/scale/rotate, then you need to reset the bones, and apply then.
There are a few bones demos out there to show you how it works. One, if I remember correctly, had a person walking, and you could move the head around with the mouse. Not sure if it used angles or seperate keyframes though.
Never argue with an idiot. They drag you down to their level then beat you with experience
|
|
|
Re: Modifying bone rotations.
[Re: colekindred]
#31850
08/12/04 12:39
08/12/04 12:39
|
Joined: Jan 2003
Posts: 517 Illinois
giorgi3
User
|
User
Joined: Jan 2003
Posts: 517
Illinois
|
Check out chapters 22-23 in the new C-Script Tutorials (also available on the Gamestudio download page). George did a very good job of explaining how to manipulate bones with A6 Scripting language. I think you'll like it.
Giorgi3
10,000 parts flying in a close formation does not constitute an airplane. Some assembly is required.
|
|
|
|