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.

Work in Progress / Enhanced Animation - addon for DBpro

Author
Message
Ron Erickson
Moderator
21
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 5th Oct 2006 20:58 Edited at: 20th Feb 2007 15:07
Hello all!

Time for my newest project's WIP thread. Some of you know about this already, but for those that don't here is the functionality that is planned and in progress.

-Extracting of animations from objects into a custom file format
-Ability to apply different animations to individual limbs.
-Blending between different animations.
-Ability to apply rotation commands to limbs when animations are playing.
-Limb Hierarchy commands: FindLimbParent, IsLimbChild
-Rotate limbs on a global axis independent of limb hierarchy.

I have all of the difficult math stuff worked out. I am about 50% done with the custom file format (that was a real pain to get working correctly!). The limb hierarchy commands are all complete. Things are going good, but slower than I expected. I am hoping to be finished this month but don't hold me to it! lol

If you have any questions or ideas for further functionality, I would LOVE to hear it.
Thanks!!

WOLF



Chenak
22
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United Kingdom
Posted: 5th Oct 2006 21:08
Nice! Looking forward to this! It definately sounds a lot better than the AA plugin. I think thats basically all the commands needed.

Something to set an animation frame will prolly be good but might not be possible as far as I'm aware, it would produce some interesting ragdoll effects though.
Ron Erickson
Moderator
21
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 5th Oct 2006 21:23 Edited at: 5th Oct 2006 21:24
Quote: "Something to set an animation frame will prolly be good but might not be possible as far as I'm aware, it would produce some interesting ragdoll effects though. "


Oh yeah
It wil definately have a "Set Limb Frame" command. I just forgot to mention it.

I am hoping that adding the ability to set a limb's rotation according to the global axis will help a lot with setting up rag-dolls. That is the main intention of adding that feature.

EZrotate!
TextureMax!
3D Character Maker!
dark coder
22
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 5th Oct 2006 21:28
Sounds awsome, any idea of the price you will be selling this for? assuming you are selling this.

And by blending animations, I hope you mean you load up say 4 animation sets, like walk,run,die,idle etc, and you can just use a command like 'Loop/Play Blending Animation ObjId,AnimId' and the blending and all would be taken care of, and should a player die then you switch it to anim 3.

And I assume you will be able to set the Elapsed time, so making the animations timer based should be no problem.

Hallowed are the ori.
Ron Erickson
Moderator
21
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 5th Oct 2006 21:45
Quote: "Sounds awsome, any idea of the price you will be selling this for? assuming you are selling this."

Well, my other two addons, EZrotate and TextureMax, each sell for $20. I imagine it will probably be about the same.

The blending of animations is used to transition from one animtion to another. So, say you are currently looping a run animation and you want to switch to a jump animation. You will be able to blend between the two seamlessly.

There will have to be some kind of speed control as you mentioned. I'm not exactly sure how some of that is going to be layed out yet though.

EZrotate!
TextureMax!
3D Character Maker!
The admiral
22
Years of Service
User Offline
Joined: 29th Aug 2002
Location:
Posted: 5th Oct 2006 23:57
Great good to finally see the work in progress post heh.

The admiral
Gil Galvanti
19
Years of Service
User Offline
Joined: 22nd Dec 2004
Location: Texas, United States
Posted: 6th Oct 2006 01:00
sounds good, looking forward to seeing how the blending animations works.

Pirates of Port Royale
Live the life of a pirate.
Ron Erickson
Moderator
21
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 6th Oct 2006 01:35
I had another thought for a cool feature. I'll have to see if I can add it or not. What do you think about the ability to add a movement vector to your animations?
For instance, you could apply a movement vector of 10 units on the Z axis for a "run" animation. At each frame in the looping animation, it will automatically figure out the interpolated distance based on the new animation frame, then apply that movement distance to your object. So, if you slow down or speed up your animation playing speed, your object will always move accordingly.
What do you think?

EZrotate!
TextureMax!
3D Character Maker!
The admiral
22
Years of Service
User Offline
Joined: 29th Aug 2002
Location:
Posted: 6th Oct 2006 03:36
That sounds handy heh

The admiral
entomophobiac
22
Years of Service
User Offline
Joined: 1st Nov 2002
Location: United States
Posted: 6th Oct 2006 17:43
How about the option to set the animation speed inside the engine, timer-based?

We use RenderWare at our school, and RenderWare has a fixed 24 frames per second ratio for animations. All animations must be exported that way. I think it would be handy to have a similar system, actually, because in that case you would only have to worry about how to export your animations, and the system would take care of the rest.

You could have, like, a "set standard animation rate" command or similar, that would define the frame rate specificially for your needs.
Ron Erickson
Moderator
21
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 6th Oct 2006 18:05
That should be easy to do.

EZrotate!
TextureMax!
3D Character Maker!
Duffer
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 6th Oct 2006 19:06 Edited at: 6th Oct 2006 19:08
@Wolf,

Excellent - was waiting for the WIP thread and here it is...

I'd been using the DBPro commands for limbs to try and join new limbs etc and was amazed at how messed-up limb names became etc.

Fairly minor thought - but ability to rename limb names?

the ones I'd really like to see (probably a whole other project) would be to copy and paste animation frame sequences, to delete keyframes or to re-pose the object and capture it as a new keyframe>?

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
Alquerian
18
Years of Service
User Offline
Joined: 29th Mar 2006
Location: Reno Nevada
Posted: 6th Oct 2006 19:46 Edited at: 6th Oct 2006 19:49
Right on WOLF, I have been waiting for this since the post in the DBPro forum started a month or two ago. Glad it has gotten as far as a WIP. I am also eagerly awaiting some more of your work on EZActor. Have you given any more thought to licensing an SDK for developer usage of EZActor?

EDIT:
oh yeah, thought this thread needed one of these to spice life up a bit


"We are what we repeatedly do. Excellence, therefore, is not an act, but a habit." - Aristotle
Ron Erickson
Moderator
21
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 6th Oct 2006 20:33
First,

Quote: "oh yeah, thought this thread needed one of these to spice life up a bit"


Don't you see this is a SERIOUS matter!
Oh man, that gave me a good chuckle.

Quote: "Fairly minor thought - but ability to rename limb names?"

Hmmm... well, let me put it this way. I read your post and said to myself. This is an ANIMATION plugin. So, then I hurried off and added the command
It works nicely! Thanks for the suggestion.

Quote: "the ones I'd really like to see (probably a whole other project) would be to copy and paste animation frame sequences, to delete keyframes or to re-pose the object and capture it as a new keyframe>?"

Right now I have added the ability to export animation from a loaded object into a custom file format. That file is then loaded back into your program and used for the animation data. What I was planning to do is add a start frame and end frame option to the export routine so you can easily save and load parts of animation sequences. That would make them MUCH easier to manage. I think that will take care of the sequence question.
I could look at adding other ways of saving to the custom file format. Being able to delete keyframes and/or add them by using the model's current rotation would certainly make creating your own animation creation program EASIER. It would be good funtionality to have so I'll see what I can do.

Quote: "I am also eagerly awaiting some more of your work on EZActor. "

So am I.

Quote: "Have you given any more thought to licensing an SDK for developer usage of EZActor?"

Same as before. It is something that I want to eventually look into, but I have a LONG way to go before I can even consider it. Namely, I have to FINISH 3D Character Maker first!

EZrotate!
TextureMax!
3D Character Maker!
Duffer
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 7th Oct 2006 01:00
@Wolf,

Top marks. Will endeavour to be patient now....

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 7th Oct 2006 11:50
COOL
I love your plugins, and ezrotate is great!

Duffer
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 7th Oct 2006 15:26
@ Wolf,

Further suggestion - would there be any way of creating a 'wolf' link limb type command that in effect prevented DBPro jumbling up all the limb numbers every time any new limb was linked/joined... (again, not directly with the animation theme....)

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
Ron Erickson
Moderator
21
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 7th Oct 2006 15:45 Edited at: 7th Oct 2006 15:46
Quote: "would there be any way of creating a 'wolf' link limb type command that in effect prevented DBPro jumbling up all the limb numbers every time any new limb was linked/joined... (again, not directly with the animation theme....)"


I'm not exactly sure what is happening. Do you have any example code that shows the problem? What it *might* be is the way that DBpro stores limbs in the dbo structures. Each limb can store one sibling and one child. If a limb has two siblings, then only the next limb would be listed as a sibling. The other sibling would be the sibling of the second limb. It's hard to explain
Anyway, if you link to a limb higher up in the hierachy, then it will have to PUSH everything else accordingly.
I'll have to see if I can come up with either a workaround or another way to accomphish the same thing. This probably won't be real high up on the priority list though. As a temporary fix, after linking a new limb, can't you just parse through the limb names to get it all straightened out again?

EZrotate!
TextureMax!
3D Character Maker!
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 7th Oct 2006 16:10
Wolf, you could make a function which does what link limb does, but fills a table with old limb numbers, and new limb numbers, so that you could make another function which looks up an old limb number and returns the new one, so the programmer can just have a variable for the number of the arm. Or an array for every limb.
That shouldn't be too hard, and would work just as well as a function to try to keep the limb numbers.

Ron Erickson
Moderator
21
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 7th Oct 2006 21:18
That feels like a hack to me though and I really like to do things the right way.
As I mentioned before, if you could send me some example code/model that this happens with, maybe I could just go back in and FORCE the ID's of them back to what they used to be.

EZrotate!
TextureMax!
3D Character Maker!
Duffer
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 8th Oct 2006 01:06
@ Wolf,

No worries. Simple when you said it. Just kept the original checklst data and parsed....

You concentrate on what you were up to originally!

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
entomophobiac
22
Years of Service
User Offline
Joined: 1st Nov 2002
Location: United States
Posted: 10th Oct 2006 10:47
Any idea on when you'll be done with the animation plugin, Wolf?
Ron Erickson
Moderator
21
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 10th Oct 2006 16:40
I am hoping to be close to finishing by the end of the month. By the time I write all of the help files and make some examples though, it will most likely be toward the end of next month. Keep in mind though, I do this stuff in my free time. My schedule has been kind of hectic lately both at work and at home. So, as long as I can keep working on it steadily, then that is my estimate.

Along with the release of the animation plugin, I am going to *try* to release a generic character from my model making program. That way, not only do I have something to "animate" in the example, but you all will get to see first hand the quality that you can expect from 3DCM. It will also allow people to start using the model as a place holder for their games until 3DCM is released.

I wish I could do this stuff full time! I have so many ideas that I would love to make come to life.

EZrotate!
TextureMax!
3D Character Maker!
Duffer
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 11th Oct 2006 00:45
@Wolf,

That placeholder character idea is a damn fine one - as you say we can start setting up stuff for future projects, you get to advertise 3dcm and we get a solid rigged character to kick around with using the plugin....

can wait til end Nov for that!

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
Ron Erickson
Moderator
21
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 11th Oct 2006 16:26 Edited at: 11th Oct 2006 16:43
I made some AWESOME progress last night!

I now have the saving and loading of animation files working completely (actually, there is one more thing that I need to do to make it work with ALL dbo files, but that is a minor thing). This has been tested and verified by a SetLimbToFrame command.

The syntax for the command is:
EnAn_SetLimbToFrame ObjNo, LimbNo, AnimID, frame
ObjNo: The object number
LimbNo: The limb that you want to set the frame of
AnimID: The loaded animation file
frame: The Animation frame that you want to set it to (float value)

The command will set the chosen limb and all of it's children to the animation frame chosen. I plan to add a parameter to exclude the child limbs if you want. I also plan to make some variants to it where you can choose two different animation frames and an interpolation value between them.

Anyway, this is a big step. It proves a couple of things. My saving/loading of the custom file format is working. The parent/child hierarchy stuff is working. The interpolation between frames is working. And the actual setting of individual limbs to particular animation frames is working.
Later, I'll try to post up a screen of this in action.

Next up is the set-up of the actual animation system.
I have some ideas of how I am going to do it. Basicly, it will work *similar* to DBpro's native animation system. There will be PLAY and LOOP commands. I am also going to add TRANSITION commands to blend from one animation to another. That way you can set how long you want transitions to be (time based) and it will handle the interpolation for you. I might also look at adding some other features like REVERSE. Any other ideas are welcome! The goal is to make this as useful as possible.


-Ron

EZrotate!
TextureMax!
3D Character Maker!
adr
21
Years of Service
User Offline
Joined: 21st May 2003
Location: Job Centre
Posted: 11th Oct 2006 16:36
This is ridiculous...

I actually bought Monster's AA plugin, but I haven't even used it because it's overly complex. Your plugin just looks so much more straight forward.

Consider my $20 in the bank ...

[center]
But you see, I have the will of the warrior. Therefore, the battle is already over. The winner? Me!
Ron Erickson
Moderator
21
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 11th Oct 2006 21:13 Edited at: 11th Oct 2006 21:16
Ok, I have attached a quick vid of the per-limb aniamtion frame stuff working. As you can see, only the left leg is "animating" on the one model.

Here is the source to see how simple it is:



EZrotate!
TextureMax!
3D Character Maker!

Attachments

Login to view attachments
Duffer
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 11th Oct 2006 21:22 Edited at: 11th Oct 2006 21:23
@ Wolf,

Excellent - keep putting in those 'adds functionality' commands...

Top drawer stuff...

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
Xenocythe
19
Years of Service
User Offline
Joined: 26th May 2005
Location: You Essay.
Posted: 11th Oct 2006 21:23
Wow! This is really nice! Will it be free?


Duffer
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 11th Oct 2006 21:30 Edited at: 11th Oct 2006 21:31
@ Xenocythe,

In yer dreams - see thread above - if it does everything it looks like it will do it is practically 'free' for $20....

@ Wolf,

Thinking 'out of the box:-

- could you create commands to merge two animation files - append one file to another or the like?

- what about a 'rigged' dbo object - but with no existing frames of animation.... could you create commands to add frames of animation or at least add frames of animation to he animation file rather than the 3d object and then apply them?

- what about (perhaps for a later day!!) a small utility program to review and perhaps edit the contents of the animation files in a digestable / manageable way?

- if second one above possible, what about the saving out of the animation data as a new animation file?

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
Ron Erickson
Moderator
21
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 11th Oct 2006 21:44
Quote: "- could you create commands to merge two animation files - append one file to another or the like?"


I could probably do that. Or, you could just append the animation to your object before you export it to an animation file.

Quote: "- what about a 'rigged' dbo object - but with no existing frames of animation.... could you create commands to add frames of animation or at least add frames of animation to he animation file rather than the 3d object and then apply them?"


A rigged dbo file with no animation data in it could still use a loaded animation file created with this plugin. That is actually the beauty of the custom file format. It can tremendously cut down on media size. Instead of EACH of your models having to contain all of the animation data, none of them actually need it. Once you create the animation file, you can apply to any of your objects.

Quote: "- what about (perhaps for a later day!!) a small utility program to review and perhaps edit the contents of the animation files in a digestable / manageable way?"


You could write one with a few lines of code in DBpro. Just load a model, then load the animation file, then apply it to the model. The problem with trying to create a "tool" is that the animation files ONLY contain animation data. There is no reference to the model that the animation data came from.



I think MOSTLY what you are looking for is a way to easily modify and create animations. I could look at being able to add/delete keyframes which would give you that power.

EZrotate!
TextureMax!
3D Character Maker!
Duffer
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 11th Oct 2006 22:44
@Wolf, scrap those ideas then - easier to load animation file, add animation and then resave animation file.... a definite yes to the last sentence though...

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
adr
21
Years of Service
User Offline
Joined: 21st May 2003
Location: Job Centre
Posted: 11th Oct 2006 23:54
Quote: "- what about ... a small utility program to review and perhaps edit the contents of the animation files in a digestable / manageable way?"


I think one of the first things I'll write is a showcase app which let's you tick/select limbs and apply separate animations to each of those limbs. No reason it couldn't be generalised.

[center]
But you see, I have the will of the warrior. Therefore, the battle is already over. The winner? Me!
Ron Erickson
Moderator
21
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 12th Oct 2006 17:59
Last night, I made a slight change to the way that the commands are layed out. Instead of using an object number system like DBpro uses, I've changed to a named system.

Basicly, instead of the command structure being like this:
EnAn_LoadAnimationFile "test1.EnAn", AnimID

I have changed it to this:
AnimID = EnAn_LoadAnimationFile "test1.EnAn"

Not a big deal in the grand scheme of things, but it does offer a lot of advantages.

Besides that, I am still working on the "Animation Playing" structures.

-Ron

EZrotate!
TextureMax!
3D Character Maker!
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 14th Oct 2006 00:53
Also, what about a reverse animation, pause animation, reset animation, etc.
And what about calling this: EZanimation
All the commands could be prefixed EZani_

Another thing, what about making it compatible with EZrotate so that if you have a limb that is animating, its child could point in the same direction as it usually does relative to the rest of the object.

Duffer
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 14th Oct 2006 10:11
@ Diggsey - some good ideas there...

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
Ron Erickson
Moderator
21
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 14th Oct 2006 15:33
Quote: "Also, what about a reverse animation, pause animation, reset animation, etc."

I planned to include commands to cover these things.

Quote: "And what about calling this: EZanimation
All the commands could be prefixed EZani_"

Because it doesn't really make animations easier. Well, I guess it does a little bit, but mostly it ENHANCES what can be done with animations. I've decided to call it "Enhanced Animation" and the prefix to the commands is EnAn_

Quote: "Another thing, what about making it compatible with EZrotate so that if you have a limb that is animating, its child could point in the same direction as it usually does relative to the rest of the object."

It will be compatable with EZrotate. Well, sort of. I am going to do all of the rotation stuff in the plugin with the standard DBpro Euler angles. If you want to use EZrotate to determine what some of those values are, that is up to you.
I'm not sure what all I am going to include as far as limb rotation commands go. The MAIN thing that I would like to include is a "set limb by global angles" command set, that would ignore all of the hierarchy of the limb's parents. With that, it would open up a lot of possibilities to do other things.

Progress is continuing. Right now, I am fighting a memory leak when I delete loaded animation files. I've spent the last day trying to solve it with no luck. I might have to move on and come back to it later.

EZrotate!
TextureMax!
3D Character Maker!
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 15th Oct 2006 00:45
I can't wait 'til this is finished! Have you thought about making an animation editor which exports directly to your filetype?
I'm a bit confused by most of these animating programs around at the moment

adr
21
Years of Service
User Offline
Joined: 21st May 2003
Location: Job Centre
Posted: 15th Oct 2006 18:18 Edited at: 15th Oct 2006 18:20
Quote: "Have you thought about making an animation editor which exports directly to your filetype?"

I think such an idea was dismissed about 5 posts up. As WOLF said, you could write an exporter yourself in 10 lines.

Quote: "I'm a bit confused by most of these animating programs around at the moment"

It doesn't matter what application you use, 3D animation is hard. Some interfaces make it easier to understand than most, but it's still a long drawn out process.

I think a utility to preview what happens when you apply animation x to limbs a,b and c would be very helpful, but that's something I'd enjoy writing, to get used to the commands. I wouldn't want someone to take writing that away from me.

[center]
But you see, I have the will of the warrior. Therefore, the battle is already over. The winner? Me!
Ron Erickson
Moderator
21
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 16th Oct 2006 02:50
I have no plans at making any kind of animation editor at the moment. Like adr says, an editor can be made somewhat easily if I can provide all of the commands that I would like to.

I'm STILL fighting with that memory leak. I have a couple of ideas of things to try yet. It has really slowed my progress down though

EZrotate!
TextureMax!
3D Character Maker!
Ron Erickson
Moderator
21
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 16th Oct 2006 20:21
YEAHHHHH!!!!!!!!!!!!

I FINALLY KILLED the memory leak I was having!
As expected, it was something STUPID.


OK, Time to move on... FINALLY!

EZrotate!
TextureMax!
3D Character Maker!
Duffer
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 16th Oct 2006 23:24
@ Wolf, congrats - why is it always something right in front of you?>

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
Ron Erickson
Moderator
21
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 17th Oct 2006 16:29
Well actually, it wasn't really right in front of me.
I had a pretty good idea of what was causing it, but I had trouble determining which part was actually doing it. It wasn't related to deleting the animation objects. It was related to not clearing all of the temporary stuff whenever I load an object. It appeared to be whenever I deleted an object because of the way I had set up the test program. I just had a loop that if I pressed the "up" key, it would delete the currently loaded animation object and then reload it. Everytime I did that, I would see my memory drop. I finally determined that it was in the loading of objects by watching how much memory was taken every time I just loaded an object. It was about twice the memory as the file size. Deleting the object would clear out about the file size worth of memory. Once I determined that it was in the loading of objects (not deleting) then it was much easier to find.
I don't pretend to be a C++ guru (although I am getting better), and this has to do with some very messy pointer stuff. If nothing else, I am learning a LOT from this project!

I have the determined the approach that I am going to take with the animation portion of this now. Actually, the plugin will be broke up into 3 seperate groups of commands:

Object Control - Commands that effect your objects directly.
For example, here are some commands that I have included so far:
EnAn_ObjRenameLimb: Renames a limb of an object
EnAn_ObjTotalLimbs: Returns the total amount of limbs in an object
EnAn_ObjTotalFrames: Returns the total number of animation frames
EnAn_ObjFindLimbParent: Returns the parent limb of the passed limb
EnAn_ObjIsLimbChild: Returns if a given limb is a child of another limb
EnAn_ObjExtractAnimation: Saves the animation data of an object into the custom animation file format
EnAn_ObjSetLimbToFrame: Sets the limb of an object to the animation frame of a loaded animation object

Animation ID - Commands related to a loaded animation file
Animation files store limb hierarchy data and animation data
EnAn_AnimLoad - Load an animation file
EnAn_AnimDelete - Delete an animation file
EnAn_AnimGetParentLimb - Like EnAn_ObjFindLimbParent but for animation file
EnAn_AnimIsLimbChild - Like EnAn_ObjIsLimbChild but for animation file
EnAn_AnimGetTotalFrames - Total Frames of an animation object
EnAn_AnimGetTotalLimbs - Totla Limbs of an animation object
EnAn_AnimGetLimbRotKeys - Number of rotation keys for a limb
EnAn_AnimGetLimbPosKeys - Number of position keys for a limb
EnAn_AnimGetLimbScaleKeys - Number of scale keys for a limb
EnAn_AnimGetLimRotKeyTime - The time of a given rotation key
EnAn_AnimGetLimPosKeyTime - The time of a given position key
EnAn_AnimGetLimScaleKeyTime - The time of a given scale key
Also included are all of XYZ rotation, position and scale of each key.
I am going to try to include the ability to delete/add/modify both keys and limbs and also to re-save the data.

Object Animation Control - The animation command set.
This will allow you to add a loaded object to be controlled by an animation ID. Basicly, it will work like this:
You will use this command:
EnAn_oacCreate ObjID
This will allow you to control a DBpro object with the Animation ID's loaded above. For each limb of an object, there is "playing" animation information such as start frame, end frame, current frame, play speed, looping, reversing, ...etc. In addition to that, there is ANOTHER whole animation set for "transition" animations. Again, it includes the stuff above, but also a transition time. It will work like this. You set an animation to play (or loop). When you want to switch to a different animation, you set the "transition" animation to the new action and set a transition time for it to take place. As the transition time is used, the "playing" animation will be interpolated with the "transition" animation more and more. Once, the total transition time is used, then the "transition" animation will become the "playing" animation.
I hope that makes sense! I think it will offer a very clean, easy way to set up animation systems. Any thoughts or ideas are welcome!

-Ron

EZrotate!
TextureMax!
3D Character Maker!
Chris K
21
Years of Service
User Offline
Joined: 7th Oct 2003
Location: Lake Hylia
Posted: 17th Oct 2006 22:12
When you say blending, do you mean straight up linear blending, or does it do anything decent like time warping or (*hopes*) registration curves?

Not that linear blending isn't fine for some things, it's just it very often screws up.

-= Out here in the fields, I fight for my meals =-
Ron Erickson
Moderator
21
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 17th Oct 2006 22:36
I was planning just linear blending for now. When I saw your post I looked up some info on registration curves and time warping. Interesting stuff. I found a really good paper on it which I have bookmarked and will look at in more detail later.
Still, at this point, I am aiming at just having linear blending. The other stuff is definately something that I will look to improve to in the future though.

EZrotate!
TextureMax!
3D Character Maker!
Duffer
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 22nd Oct 2006 20:25
@Wolf,

Howzit going?

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
Ron Erickson
Moderator
21
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 23rd Oct 2006 16:38
Good.

I am pretty much as far as I expected to be at this time, so I guess that is good.

I did do another small project last week making a wrapper for the TrackIR. For more information on that look at the thread in the dll talk area of the forum. The manufacturer of the TrackIR, NaturalPoint, also make relatively inexpensive motion tracking hardware. I might eventually look into using their equipment for doing motion capture animations.

EZrotate!
TextureMax!
3D Character Maker!
Ron Erickson
Moderator
21
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 25th Oct 2006 17:31
Progress update:

I now have the following commands added:
EnAn_oacSetFrame oacID, Limb, AnimID, frame, ExcludeChild
EnAn_oacSetInterpolFrame oacID, Limb, AnimIDa, frameA, AnimIDb, frameB, Interpolation, ExcludeChild

They work like this:
You load an animation file into an AnimID.
You set control over an object using the "Create Object Animation Control" command.
You then can apply any animation frame from the AnimID to to any limb (inlcuding or excluding child limbs) of your object.
The interpolated version allows you to select 2 frames (from 2 different AnimID's if you like) and an interpolation value between them.

Next I have to add the Play/Loop commands. When that is done, the CORE functionality will be complete. There will still be a lot to do after that, but the hard work will be done!

-Ron

EZrotate! TextureMax! Enhanced Animations! (coming soon....) 3D Character Maker! (coming soon....)
Duffer
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 25th Oct 2006 19:48
@ Wolf,

Excellent stuff. Keep it coming...

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
Ron Erickson
Moderator
21
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 27th Oct 2006 23:10 Edited at: 27th Oct 2006 23:13
More progress...

I have the animation system working! You can now PLAY and LOOP animations based on an elapsed time value. The commands work like this:

EnAn_oacCreate ObjID
Create an animation control object. The ObjID parameter is the DBpro object that you want to be able to control with loaded animations.

EnAn_oacPlayAnim oacID, Limb, AnimID, StartFrame, CurrentFrame, EndFrame, loop, ExChild
This is the command to actually play animations. Here is a definition of the parameters:
oacID - The "Animation Control" object created with the EnAn_oacCreate command
Limb - The limb that you want to apply the animation to
AnimID - The ID of the loaded animation data file
StartFrame - The first frame of the animation
CurrentFrame - Usually the same as the StartFrame. Sometimes you will want this different when looping.
EndFrame - The last frame of the animation
Loop - Flag to Loop or Stop the animation once it reaches the end frame
ExChild - Flag to say if you want the animation applied or not applied to all of the limb's children

EnAn_oacUpdate oacID, time
This is the command that you place in your loop that actually updates the animation object. There is simply an oacID parameter and an elapsed time value. I am also going to look at adding an "EnAn_UpdateAll" command that will update ALL oacID's with an elapsed time value.


I also have the code for animation transitions written. It still needs tested though, so I am sure there are a couple things that need tweaked with it. The transitions work the same as the PLAY animations, but there is also a "transition time" parameter. As more of the "transition time" is used, the more the transition animation is interpolated into the PLAY animation. Once the transition time is all used up, it will become the PLAY animation.

All in all, I think everything is turning out really clean. It should be EASY to use and offer tons of flexibility!

-Ron

EZrotate! TextureMax! Enhanced Animations! (coming soon....) 3D Character Maker! (coming soon....)

Login to post a reply

Server time is: 2024-11-23 22:27:46
Your offset time is: 2024-11-23 22:27:46