Dynamic animation of models?

Discussion about everything. New games, 3d math, development tips...
Post Reply
npc
Posts: 17
Joined: Mon Apr 27, 2015 2:52 pm

Dynamic animation of models?

Post by npc »

Hi all,

I am using the irllicht engine as a client for visualization, and for that, I would need to be able to make up model animations on the fly and when they are computed. More specifically, I'm developing a physics and NPC control server doing all the heavy computations, and it continuously sends all the coordinates and models via UDP to a wrapper around irrlicht, which then tells irrlicht how to update the positions and directions of all models. This works fine for static models, but since the physics engine can also do deformation, wobbling, breaking, bending etc., these things can only be rendered if it is possible to change the models dynamically. Splitting everything up into a large number of small models that are then positioned accordingly would be one possibility, but I'm wondering if someone here knows of a more elegant approach. The physics is all point-based, so that would perhaps fit nicely with a dynamic mesh model (or something... I haven't done much game or graphics programming, even though I've been into programming for well over 30 years now :D)

Any ideas, suggestions etc. are highly appreciated!
sunnystormy
Posts: 105
Joined: Mon Jun 02, 2014 2:32 am
Location: Washington, D.C.
Contact:

Re: Dynamic animation of models?

Post by sunnystormy »

Hmmm...

I think you're able to grab a collection of all the model vertices that you can replace with new vertex data. Have you considered trying that?

You'd have to grab all of the model vertices regardless if you wanted to link them to the "physics world" of your physics engine. What you're essentially doing here is the reverse, where you're making the point manipulation on the physics-side, then injecting the new vertex data into the mesh.

I haven't tried this myself, but it sounds cool if you're able to pull it off.

Good luck!
My blog: http://fsgdp.wordpress.com "The Free Software Game Development Pipeline"
npc
Posts: 17
Joined: Mon Apr 27, 2015 2:52 pm

Re: Dynamic animation of models?

Post by npc »

Hey Sunnystormy,

Thanks - yes, this is exactly what I want to do. Do you know if there is any code that I can look at that does anything remotely similar to this? Just need something to get started...
sunnystormy
Posts: 105
Joined: Mon Jun 02, 2014 2:32 am
Location: Washington, D.C.
Contact:

Re: Dynamic animation of models?

Post by sunnystormy »

There should be a physics example inside of the "tutorials" section of the Irrlicht website. I would recommend giving that a look. Otherwise, a "bullet physics Irrlicht" search should get you somewhere. :)
My blog: http://fsgdp.wordpress.com "The Free Software Game Development Pipeline"
npc
Posts: 17
Joined: Mon Apr 27, 2015 2:52 pm

Re: Dynamic animation of models?

Post by npc »

Thanks, this is exactly what I was looking for!! :)

By the way, the physics and NPC engines will be freely available under GPL as soon as they are halfway complete. If anyone is interested in using them (a network communication layer is also included so that the whole thing can be distributed, it's computationally a little bit on the demanding side, at least for now), I'll keep you posted on the progress.
npc
Posts: 17
Joined: Mon Apr 27, 2015 2:52 pm

Re: Dynamic animation of models?

Post by npc »

Thanks again, the vertices (and indices) are really easy to get to, and easy to manipulate.

P.S: I also have to say that the irrlicht engine is a true marvel in its design! :)
sunnystormy
Posts: 105
Joined: Mon Jun 02, 2014 2:32 am
Location: Washington, D.C.
Contact:

Re: Dynamic animation of models?

Post by sunnystormy »

Not a problem. I'm sure CuteAlien (et.al.) will be glad to hear that. :)
My blog: http://fsgdp.wordpress.com "The Free Software Game Development Pipeline"
npc
Posts: 17
Joined: Mon Apr 27, 2015 2:52 pm

Re: Dynamic animation of models?

Post by npc »

Hi all,

Quick update, if anyone is interested. Here is a short video showing how mesh models can be controlled from the outside, i.e. each vertex in each model is updated dynamically:

https://www.youtube.com/watch?v=eav_k3prKVM

Still a number of things to work out (bugs in collision), but the great thing is that the models are rendered very smoothly and at high FPS, while all the physics processing is done on a server, where it can potentially use as many cores as are available. I'll get deformation working next (I can change the mesh in any way or form), and one thing that would be really nice for that is to make the objects reflective, i.e. like mirror surfaces. I've been looking into how to do this, but does anyone know offhand what the best direction is here? Any help is appreciated!
sunnystormy
Posts: 105
Joined: Mon Jun 02, 2014 2:32 am
Location: Washington, D.C.
Contact:

Re: Dynamic animation of models?

Post by sunnystormy »

Hey, NPC!

Congrats! Glad to see it working. :)
My blog: http://fsgdp.wordpress.com "The Free Software Game Development Pipeline"
Post Reply