Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
2 registered members (TipmyPip, 1 invisible), 18,789 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Modifying bone rotations. #31845
08/11/04 02:16
08/11/04 02:16
Joined: Aug 2004
Posts: 11
C
colekindred Offline OP
Newbie
colekindred  Offline OP
Newbie
C

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 Offline
Senior Developer
qwerty823  Offline
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
C
colekindred Offline OP
Newbie
colekindred  Offline OP
Newbie
C

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 Offline
Senior Developer
qwerty823  Offline
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: qwerty823] #31849
08/12/04 02:52
08/12/04 02:52
Joined: Aug 2004
Posts: 11
C
colekindred Offline OP
Newbie
colekindred  Offline OP
Newbie
C

Joined: Aug 2004
Posts: 11
thx alot for clearing that up. I'm glade to here it. I'll be starting the project in a few days


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] #31850
08/12/04 12:39
08/12/04 12:39
Joined: Jan 2003
Posts: 517
Illinois
G
giorgi3 Offline
User
giorgi3  Offline
User
G

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.

Moderated by  HeelX, Spirit 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1