UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

Blending animations

broken avatar :(
Created 11 years ago
by BluntStuffy
0 Members and 1 Guest are viewing this topic.
2,734 views
broken avatar :(
×
broken avatar :(
Location: nlApeldoorn
Date Registered: 17 December 2013
Last active: 2 years ago
Posts
1,186
Respect
1,332Add +1
Forum Rank
Zombie Colossus
Primary Group
Scripter Elite
My Groups
More
My Contact & Social Links
More
Personal Quote
It aint much, if it aint Dutch
Signature
×
BluntStuffy's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
Oil Rig Beta Access
Oil Rig Beta Access
BluntStuffy's Contact & Social LinksBluntStuffyBluntstuffy@BluntZombieStuffyZombie
I've been trying to blend animations and i just can't seem to get it working. I tried before, and got back to it now that i'm making the sentry-gun for the guard-dog. But i cant figure it out, or find any information about it.

What i'm trying now is just have a idle animation for the sentry where it turns from left to right, and i would like to blend the barrel-spin animation over that for when it's firing. In the end i want to blend in different anims depending on what's happening, but for now getting this to finally work would be awesome.

My thought was it has to do with using setanimknob and setanimknoball maybe? But i'm unsure if i would also need to convert/export the anims in a different way, and if the animtree is related to this somehow? etc etc. I've tried quite some combinations that seemed to make sense to me, but either just one of the animations is playing or none at all..  :-\

If somebody could help me out that would be great

broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 27 January 2015
Last active: 10 years ago
Posts
337
Respect
Forum Rank
Perk Hacker
Primary Group
Member
Signature
×
liamsa669's Groups
liamsa669's Contact & Social Links
By blend do u mean play it, and make it look natural? cuz if so, the engine usually does that naturally. Is your turret part of the dog or a separate entity? this would determine what to use. if its a script model, use setanim(); if its part of the ai, use AnimScripted(); If the turret is an actual turret, then im pretty sure its animscripted() aswell. If you want, i can look into it a bit more.
broken avatar :(
×
broken avatar :(
Location: nlApeldoorn
Date Registered: 17 December 2013
Last active: 2 years ago
Posts
1,186
Respect
1,332Add +1
Forum Rank
Zombie Colossus
Primary Group
Scripter Elite
My Groups
More
My Contact & Social Links
More
Personal Quote
It aint much, if it aint Dutch
×
BluntStuffy's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
Oil Rig Beta Access
Oil Rig Beta Access
BluntStuffy's Contact & Social LinksBluntStuffyBluntstuffy@BluntZombieStuffyZombie
I'm prob using a term i shouldn't have used  :D i should explain a bit better maybe.

I would like the idle-anim for the turret to keep playing ( so it keeps looping from left to right ), and then 'add' certain animations on top of that for example have an animation in maya that only spins the barrel and basicly play both of those animations at the same time on the model, so the barrel spins and the sentry turns from left to right at the same time.
broken avatar :(
  • DeletedUser
  • Deleted Member
×
broken avatar :(
DeletedUser
This user is deleted :(
You could try having turret animations set as additive in AssMan, should work.
broken avatar :(
×
broken avatar :(
Location: gbMilton Keynes
Date Registered: 17 January 2014
Last active: 6 years ago
Posts
6,875
Respect
Forum Rank
Immortal
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
Signature
If you want scripts / features made for you, then contact me by PM or email / skype etc
it will cost you tho so if you have no intention of reciprocating don't even waste my time ;)
×
Harry Bo21's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Harry Bo21's Contact & Social LinksHarryBo000[email protected]HarryBo21
cant you rotate it by script, instead of anims?

Then your free to use whatever other anims you need in place?
broken avatar :(
×
broken avatar :(
Location: nlApeldoorn
Date Registered: 17 December 2013
Last active: 2 years ago
Posts
1,186
Respect
1,332Add +1
Forum Rank
Zombie Colossus
Primary Group
Scripter Elite
My Groups
More
My Contact & Social Links
More
Personal Quote
It aint much, if it aint Dutch
×
BluntStuffy's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
Oil Rig Beta Access
Oil Rig Beta Access
BluntStuffy's Contact & Social LinksBluntStuffyBluntstuffy@BluntZombieStuffyZombie
Looks like with just using setanimrestart i'm getting the best results up till now. I can just call both anims at the same time on the model, and use their weights to determine what's playing.

Code Snippet
Plaintext
		self.sentry_gun SetFlaggedAnimRestart( "sentry_base_idle", %dog_sentry_gun_base_idle    , 1   , 0.2, 1 );
self.sentry_gun SetFlaggedAnimRestart( "sentry_barrel_idle", %dog_sentry_gun_barrel_idle, 0.2, 0.2, 1 );
If i do it as in the example above, both anims play.
When i set both their weights to the same nr, it's playing a blend of both anims


Doesn't really seem to matter if i use relative or additive in assman though, but my guess is a propper setup animtree would maybe make a difference there

Double Post Merge: June 21, 2015, 05:09:25 pm
cant you rotate it by script, instead of anims?

Then your free to use whatever other anims you need in place?

I tried that at first, but i dont just want to rotate the whole gun. The base need's to stand still. So i seperated the sentry into a few models so i could rotate the right parts, and linked them together in script. After that i wasn't able to rotate the individual parts anymore  :(
Last Edit: June 21, 2015, 05:09:25 pm by BluntStuffy
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 27 January 2015
Last active: 10 years ago
Posts
337
Respect
Forum Rank
Perk Hacker
Primary Group
Member
×
liamsa669's Groups
liamsa669's Contact & Social Links
I'm prob using a term i shouldn't have used  :D i should explain a bit better maybe.

I would like the idle-anim for the turret to keep playing ( so it keeps looping from left to right ), and then 'add' certain animations on top of that for example have an animation in maya that only spins the barrel and basicly play both of those animations at the same time on the model, so the barrel spins and the sentry turns from left to right at the same time.
Ohh i get it. So u want to do something like the death machine. The death machine's animation isnt one but 2 animations. One on the barrel and one for everything else. SO you have to do it the same way, say you want the dog (the one in your profile pic) to be in an idle state without any spinning on the barrels of the gun, but then a zombie comes by, u still want it to be in idle, but you also want it to spin while shooting. This would mean you would be using 3 animations in all. The animations would have to exported in a unique way. You would have to export the dog and all the turret's parts except the barrel into one animation. Then you would have to export only the barrel into another anim.( of corse in this case since it doesnt need to spin or do anything, you could just use a clear anim, but that wouldnt help the example ) Then export the barrel spinning so that it is rotating in that animation. Make sure that that is the only thing selected, not even tag_origin should be. Then in asset manager you should import the dog's idle anim normally, but the other 2 should be additive. Then when the zombie isnt by, just set the anim to idle then set it to the idle gun anim, and when it does pass by, set the anim to shoot. This is just a theory since ive never had to do anything complex like this with anything I have ever done, so please tell me how it goes. If it doesnt work, tell me and ill actually test my next theory before posting it. Also if you do not understand any of this post, feel free to PM me and ill explain it better
Last Edit: June 21, 2015, 10:41:37 pm by liamsa669
broken avatar :(
×
broken avatar :(
Location: gbMilton Keynes
Date Registered: 17 January 2014
Last active: 6 years ago
Posts
6,875
Respect
Forum Rank
Immortal
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
×
Harry Bo21's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Harry Bo21's Contact & Social LinksHarryBo000[email protected]HarryBo21
Looks like with just using setanimrestart i'm getting the best results up till now. I can just call both anims at the same time on the model, and use their weights to determine what's playing.

Code Snippet
Plaintext
		self.sentry_gun SetFlaggedAnimRestart( "sentry_base_idle", %dog_sentry_gun_base_idle    , 1   , 0.2, 1 );
self.sentry_gun SetFlaggedAnimRestart( "sentry_barrel_idle", %dog_sentry_gun_barrel_idle, 0.2, 0.2, 1 );
If i do it as in the example above, both anims play.
When i set both their weights to the same nr, it's playing a blend of both anims


Doesn't really seem to matter if i use relative or additive in assman though, but my guess is a propper setup animtree would maybe make a difference there

Double Post Merge: June 21, 2015, 05:09:25 pm
I tried that at first, but i dont just want to rotate the whole gun. The base need's to stand still. So i seperated the sentry into a few models so i could rotate the right parts, and linked them together in script. After that i wasn't able to rotate the individual parts anymore  :(

how about two models, but a invisible material on the base on one, the the gun part for the other? or even have two models and delete the irrelevent mesh?

 
Loading ...