Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Ehanced Animation - Multiple Source Objects

Author
Message
Mage
Valued Member
19
Years of Service
User Offline
Joined: 3rd Feb 2007
Location:
Posted: 6th Jul 2012 09:10
I just started using the Enhanced Animation plugin.

Doing this requires rewriting the way my programs handle object animation. With regular DBP commands, loading objects with hundreds of frames is slow. So I broke all the animations into groups across 5 or 6 directx object files. Then in-game I would attach them to characters depending on what animation group is needed. This ended up being faster but it was still slow.

With Enhanced Animation, each specific animation has it's own animation file. This means I have to take animations from several different "source" object files to create all these new animation files.

I have spent several weeks casually spending an hour here and there wondering why some animations are horribly garbled. I have tried different export settings. I have tried different exporting programs. I have tried manually copy and pasting animation guts between object files (not that fun). Same bones, same names, same everything. Then I found what I was looking for.

I discovered that all of these source object files need to have the same identical starting frame. Enhanced Animation Plugin seems to use this frame as some sort of orientation.

I don't mean every actual animation. Just each object file that you got the animations from.

I'm glad I finally found this. Hope it helps.

Super Nova
21
Years of Service
User Offline
Joined: 14th Jun 2005
Location: Earth
Posted: 8th Jul 2012 10:24
Hello, I also had a similar problem with animations being distorted after loading various animations. I contacted the creator of Enhanced Animations at the time and he discovered that the problem was that there was no key at the end of the animations so it was interpolating to the next animation prematurely. He devised a simple piece of code that fixed the problem for me.



Just thought I would add this in case it is of any assistance to anyone as well.

"What I have shown you is reality. What you remember, that is the illusion."
Mage
Valued Member
19
Years of Service
User Offline
Joined: 3rd Feb 2007
Location:
Posted: 9th Jul 2012 20:56
Thanks, I'm still in the process of creating a method for converting all the old animations into the Enhanced Animation format. If I have any problems I'll fit that in.

That's a good bit of information to know.

Daniel wright 2311
User Banned
Posted: 10th Jul 2012 23:45
I bought Enhanced Animations years ago,to me,it just does not seam like a good idea to use it,there is no real reason for Enhanced Animations if you know how to animate and then you use a timer for all of your animations for that one file,timers for animations work better and faster then Enhanced Animations.

my signature keeps being erased by a mod So this is my new signature.
Chris Ritchie
20
Years of Service
User Offline
Joined: 7th Jan 2006
Location: Norn Iron
Posted: 10th Jul 2012 23:53
To my knowledge Enhanced animation is the only way to blend between two animations in dbpro, so I think that's a good reason for all to buy it imo.


Lead programmer ULIDIA
Daniel wright 2311
User Banned
Posted: 11th Jul 2012 00:55 Edited at: 11th Jul 2012 00:55
Quote: "To my knowledge Enhanced animation is the only way to blend between two animations in dbpro, so I think that's a good reason for all to buy it imo."


No its not,to blend between any animation,use a timer with one model,its simple to do,here is a small example

if upkey=1 then walk=1

if walk=1 then inc walktime

if walktime>0 then loop object 2,0,29

if upkey=0 and object looping(2)=1 and walk=1
inc endwalktime
endif

if endwalktime=30
idel=1
walk=0
endwalktime=0
walktime=0
endif

This will play your last animation for 30 milisecoinds then it will transmit to your idel aniamtion,just a small example.

my signature keeps being erased by a mod So this is my new signature.
Super Nova
21
Years of Service
User Offline
Joined: 14th Jun 2005
Location: Earth
Posted: 11th Jul 2012 06:14
For me, Enhanced Animations has made my life a lot easier in managing animations and animating on a limb basis. I can have the legs on my character walking while having the upper body blend from a walking animation to an aiming animation without additional animation data.

Also, I know that it loads the animations much faster using Enhanced Animations since you extract the animation data and only load that instead of the entire model every time. Any game that is going to have a lot of animations I think would benefit it.

"What I have shown you is reality. What you remember, that is the illusion."
Olby
22
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 11th Jul 2012 13:25 Edited at: 11th Jul 2012 13:25
Quote: "No its not,to blend between any animation,use a timer with one model,its simple to do,here is a small example"


You're wrong. There is no way in DBPro to blend different animations on certain limbs. Like Super Nova said using Enhanced Animations you can, for example, set the lower part of the character to loop the running animation while looping a completely different one on the upper body (e.g. Run & Gun, Walk & Gun, Run & Aim, Walk & Look, etc.). Unless you want to spend hundreds of hours doing all these manually Enhanced Animations allows you to do this and a lot more. Additionally, by extracting animation data your models will take up less space, load faster and you will be able to share the animation between different objects. So to say there are so many useful commands that you can create a full blown animation editor package.


Intel Core2Duo 2.2GHZ, 2GB, GeForce 8600M GT 1280MB, Windows Vista Ultimate SP2, PureBasic 4.61 + DarkGDK 2.0
Daniel wright 2311
User Banned
Posted: 11th Jul 2012 21:44
Quote: "There is no way in DBPro to blend different animations on certain limbs. Like Super Nova said using Enhanced Animations you can"


Yes there is,yes and no,not blending aniamtions but rotating limbs,but your right,this is good for blending animations together,but,this is what animating is for,I guess if you do not know how to animate then this is a good thing for you.

my signature keeps being erased by a mod So this is my new signature.
Olby
22
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 11th Jul 2012 23:00 Edited at: 11th Jul 2012 23:02
Quote: "Yes there is,yes and no,not blending aniamtions but rotating limbs,but your right,this is good for blending animations together,but,this is what animating is for,I guess if you do not know how to animate then this is a good thing for you."


Most commercial games utilise blended animation sets (or better yet use procedurally generated ones). It has nothing to do with being good or bad at animating objects (I doubt professional game studios opt for blending because they're not capable of animating all possible animations - hundreds of them). It's all about saving your precious dev time of doing repetitive and unnecessary tasks and believe me it pays off eventually. You should definitely have a second look at EnAn maybe you'll find it useful this time.


Intel Core2Duo 2.2GHZ, 2GB, GeForce 8600M GT 1280MB, Windows Vista Ultimate SP2, PureBasic 4.61 + DarkGDK 2.0
Daniel wright 2311
User Banned
Posted: 11th Jul 2012 23:42
Quote: "You should definitely have a second look at EnAn maybe you'll find it useful this time"


Yes,I just might do that,I just cant see using 30 diffrent models for 30 diffrent animations to play.

my signature keeps being erased by a mod So this is my new signature.
Mage
Valued Member
19
Years of Service
User Offline
Joined: 3rd Feb 2007
Location:
Posted: 13th Jul 2012 06:58 Edited at: 13th Jul 2012 07:00
Quote: "
Yes,I just might do that,I just cant see using 30 diffrent models for 30 diffrent animations to play."


They are right about Enhanced Animations.

Having every character have a huge number of animations built into their body object sucks. It sucks because the object takes a long time to load. So long that during game play you can see a small lag when one of them loads. Levels take a long time to load because of this.

I split the animations across several objects so I could attach smaller groups of animations to the characters instead. It was faster but still sucked.

With enhanced animations. You use the EA commands to copy each separate animation (running, walking, standing) and save them all to separate animation files. (This is a media preparation step intended to be done before your game is programmed and uses the files, not while your game is running.)

Then in your game you can simply load those animations as separate stand alone items. You use the EA commands to link characters bodies to the animations without having to load anything twice. DBP simply points to the already loaded animation, which is way faster. Changing animations? It simply links to another animation then.

This also allows you to smoothly transition between animations, like running and walking without any awkward or jerky animation.

Because you don't have to load the objects with any animations, The smaller object files load way faster. Not to mention if you properly keep track of things you can clone object when possible and be wicked fast.

Because of this I can now achieve 0ms load time when loading characters in ideal situations. This would be where all the parts are loaded already on other characters and all file loading can be skipped.

Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 13th Jul 2012 09:38
Sounds good.

Daniel wright 2311
User Banned
Posted: 13th Jul 2012 18:52 Edited at: 13th Jul 2012 18:53
I re downloaded Enhanced Animations and looking at it now makes alot more sence to me,but,Is there a already writen code to extract animations? it would be easer for me,if not,I will write something out and post it for all.

my signature keeps being erased by a mod So this is my new signature.
Olby
22
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 13th Jul 2012 22:25
Quote: "EnAn_ObjExtractAnimation( DWORD ObjID, LPSTR pFileName, DWORD StartFrame, int EndFrame )"



Intel Core2Duo 2.2GHZ, 2GB, GeForce 8600M GT 1280MB, Windows Vista Ultimate SP2, PureBasic 4.61 + DarkGDK 2.0

Login to post a reply

Server time is: 2026-07-07 20:23:39
Your offset time is: 2026-07-07 20:23:39