does irrlicht support an event based animation system?

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Cube_
Posts: 1010
Joined: Mon Oct 24, 2011 10:03 pm
Location: 0x45 61 72 74 68 2c 20 69 6e 20 74 68 65 20 73 6f 6c 20 73 79 73 74 65 6d

does irrlicht support an event based animation system?

Post by Cube_ »

to explain a bit better.

if the mouse is moved up the torso would angle up but the legs would be unaffected, or if the user reloads then the torso plays the reload animation but the legs still play their walk/run loop.

Does irrlicht have the facilities for this type of animation behavior?
"this is not the bottleneck you are looking for"
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: does irrlicht support an event based animation system?

Post by hendu »

There is nothing special in that, you create such animations in your modeling program, or use separate feet/torso like Q3.

Irr does not support animation blending for skinned models, ie one single model with two separate animations running at once. "feet: run" and "torso: reload", for example.
Cube_
Posts: 1010
Joined: Mon Oct 24, 2011 10:03 pm
Location: 0x45 61 72 74 68 2c 20 69 6e 20 74 68 65 20 73 6f 6c 20 73 79 73 74 65 6d

Re: does irrlicht support an event based animation system?

Post by Cube_ »

no animation blending for skinned models?
I figured I'd have to have the legs and torso be separate models just parented together then (either that or I'd have to integrate animkit which supports pretty advanced blending but I really can't be bothered if I can aesthetically hide the seam that would be created from such a model split)

the question is: how would parenting them together work? based on center of mass? root bone for the skeleton? (I'd guess center of mass/origin point as determined either by the mesh or bounding box).
Although I suppose I should at least have a peak at animkit to see how much work is needed to integrate it - if it's fast enough I won't have to worry about splitting the models up since I can just blend animations.
"this is not the bottleneck you are looking for"
chronologicaldot
Competition winner
Posts: 688
Joined: Mon Sep 10, 2012 8:51 am

Re: does irrlicht support an event based animation system?

Post by chronologicaldot »

Similar problem in FPS. For those games, in simple cases, the body had the static root bone and arms, head, and legs were separate meshes.
May I ask what yours is for?

<musing> It would be nice just having a system where you can map a mesh to a bone system and load and control the bone system separately (with or without a mesh). Then we could write animators that controlled specific bones without worrying about the mesh. Now, once the mesh is put in place, it might animate funny... </musing>
mongoose7
Posts: 1227
Joined: Wed Apr 06, 2011 12:13 pm

Re: does irrlicht support an event based animation system?

Post by mongoose7 »

I know nothing of animkit, but if you can extract the bone transforms frame by frame, then you can use that to manipulate the Irrlicht bones, frame by frame.
Cube_
Posts: 1010
Joined: Mon Oct 24, 2011 10:03 pm
Location: 0x45 61 72 74 68 2c 20 69 6e 20 74 68 65 20 73 6f 6c 20 73 79 73 74 65 6d

Re: does irrlicht support an event based animation system?

Post by Cube_ »

chronologicaldot: I need animation blending for a third person game I'm doing for a game jam, specifically a third person 3D platformer. (but running isn't the only available animation, there are various powerups and similar that affect the upper torso animation such as boxing gloves (I may or may not implement that specific powerup, but it serves a good example and is indeed something I plan to implement))


mongoose: frame by frame manipulation sounds like it would be
a) slow
b) take a lot of programmer time to implement and maintain. (essentially if any animation needs changing that would imply all the animation code needs changing, unless I completely misunderstand you).

I think I'll just opt for splitting the model into pieces like older games do and figure out a way to hide the seams.
"this is not the bottleneck you are looking for"
mongoose7
Posts: 1227
Joined: Wed Apr 06, 2011 12:13 pm

Re: does irrlicht support an event based animation system?

Post by mongoose7 »

a) no - the animation system *is* slow
b) no - you write code to transfer/apply the animation to Irrlicht - if you change the animation, the new animation gets applied
But simpler is better, of course.
Cube_
Posts: 1010
Joined: Mon Oct 24, 2011 10:03 pm
Location: 0x45 61 72 74 68 2c 20 69 6e 20 74 68 65 20 73 6f 6c 20 73 79 73 74 65 6d

Re: does irrlicht support an event based animation system?

Post by Cube_ »

right, so can the animation system be (ab)used to take the animation from one place and apply it on the fly in another (say have the torso completely unanimated during the run cycle and then take an animation from later on and apply that frame by frame in code for the torso?
In worst case I'll just cobble together some hack to get it to work at a rudimentary level.

I don't suppose you can point me in the right direction as to what features I should read up on? (or ideally a working example so I can get a visual idea of what needs to be done)
"this is not the bottleneck you are looking for"
mongoose7
Posts: 1227
Joined: Wed Apr 06, 2011 12:13 pm

Re: does irrlicht support an event based animation system?

Post by mongoose7 »

Yes, it is even up to you, as you can apply different animations to different parts.

Look in the Irrlicht example in the SmartBody code. They take the pose from the character and apply it frame by frame to the Irrlicht bones.
Cube_
Posts: 1010
Joined: Mon Oct 24, 2011 10:03 pm
Location: 0x45 61 72 74 68 2c 20 69 6e 20 74 68 65 20 73 6f 6c 20 73 79 73 74 65 6d

Re: does irrlicht support an event based animation system?

Post by Cube_ »

wouldn't that require smartbody though? (I'm fine with that, animkit isn't a good match for my needs for example, no irrlicht bindings)
"this is not the bottleneck you are looking for"
mongoose7
Posts: 1227
Joined: Wed Apr 06, 2011 12:13 pm

Re: does irrlicht support an event based animation system?

Post by mongoose7 »

No. *You* supply the pose and then mimic the code in the Irrlicht interface. Did you look at it?
Cube_
Posts: 1010
Joined: Mon Oct 24, 2011 10:03 pm
Location: 0x45 61 72 74 68 2c 20 69 6e 20 74 68 65 20 73 6f 6c 20 73 79 73 74 65 6d

Re: does irrlicht support an event based animation system?

Post by Cube_ »

I can't find a smartbody example in the irrlicht examples folder, so I googled it and found an example relating to a smartbody library that has irrlicht bindings - hence my question.

I'm not sure what smartbody example you're referencing as I don't have one.
Image


Anyway, I'm reading the smartbody irrlicht bindings now, it should give me some idea of what I'm supposed to be doing - I'll update this if I find the appropriate code (or if I opt for smartbody since it has irrlicht bindings).
"this is not the bottleneck you are looking for"
mongoose7
Posts: 1227
Joined: Wed Apr 06, 2011 12:13 pm

Re: does irrlicht support an event based animation system?

Post by mongoose7 »

Project Announcements>>SmartBody! Is this your first visit to the forums?
You'll find a link to the download for SmartBody. Download and expand, then find the Irrlicht example.
Post Reply