Multithreaded / GPU based vertex animation?

Posted By: HeelX

Multithreaded / GPU based vertex animation? - 05/31/10 18:54

A8 will have a very nice feature that is a good selling point: GPU-based bone animation.

In the manual, you still propose to use vertex animation when a lot of actors are moving (like crowds, armies, etc.). Is this proposal still valid if you use GPU-bones animation VS. CPU-based vertex animation?

Other than that: (and here comes my proposal) --- are you considering GPU-based vertex animation in the future?

OR: Are you calculating the vertex positions in a multithreaded fashion? If you do not plan to add GPU-based vertex animation and do not multithread the calculations - is there are way to replace your calculations by my own so that I can set up my own animation format for models and calculate it on the CPU by myself by using multithreading under C++? Would you be so kind and give an example for this, then?

This is especially useful if you are doing procedural animations, so if you want to extent the engine into that direction... then... just my two cents :-)

This is an important topic for me,
so, thanks in advance,
-Christian
Posted By: William

Re: Multithreaded / GPU based vertex animation? - 06/01/10 00:59

It would be nice if vertex animation is sped up. As I use it a fair bit.
Posted By: jcl

Re: Multithreaded / GPU based vertex animation? - 06/01/10 07:28

In the last time, people seem only to want features that were already implemented more or less long ago. Seems I can go on vacation... laugh

http://manual.3dgamestudio.net/beta.htm

GPU based animation is only supported in A8 however. It needs the A8 vertex format, which is different to A7.
Posted By: HeelX

Re: Multithreaded / GPU based vertex animation? - 06/01/10 08:00

JCL, either I speak in the last time in ambiguous words - and if so, I promise I improve on that - or you don't read carefully. Or both. Who knows.

Nevertheless. In the beta page you are explicitely talking about bones animation. I (or respectively, we) talk about vertex animation. That is for instance, if you load a model in MED with bones animations and click on Edit\Convert to points animation.

So, again my question in a easy to understand order of causal relations:

1.) Situation 1: You provide in A8 a shader which allows GPU accelerated bones animations
2.) Request: We would like to have in A8 a shader that does vertex animations on the GPU rather on the CPU
3.) Reason 1: it is rather time consuming on models with lots of vertices to calculate animations on the CPU if not multithreaded.
4.) Conclusion 1: If your CPU-animation code is not multithreaded (is it?), a parallel GPU would be way more faster, especially on models with lots of vertices
5.) Situation 2: if you don't want to do this, I ask for a way to calculate vertex animations by our own without using ent_setvertex because (citing the manual) "Modifying a mesh of a certain entity [with ent_setvertex] affects all entities that use the same mesh" and using ent_clone is kinda wrong because you have then for each individual entity a cloned mesh...
6.) Request 2: If Situation 2 becomes true, could you provide an example how to do that with DirectX functions without cloning the mesh or can you provide a way to do this (or similar)?

I hope this is clearer to you know. If I am mistaken and confused big time, show me.

Thanks.
Posted By: jcl

Re: Multithreaded / GPU based vertex animation? - 06/01/10 08:12

Ah, I see. I must learn to read more than the first sentence of a post. GPU accelerated vertex animation is also theoretically possible. But it does only offer a relatively small speed advantage, and this only in special cases. So, we will probably not provide such a shader, unless some good reason comes up.
Posted By: HeelX

Re: Multithreaded / GPU based vertex animation? - 06/01/10 08:15

Okay.. what is this special case you were mentioning?
Posted By: jcl

Re: Multithreaded / GPU based vertex animation? - 06/01/10 08:18

The special case is when you have many vertex animated models of the same type on the screen, which have a huge number of polygons but only few animation cycles (maybe 5 or 6). In that case the GPU could gain some speed by interpolating the animation with a shader.
Posted By: HeelX

Re: Multithreaded / GPU based vertex animation? - 06/01/10 09:00

This is my case, I will have lots of entities on screen, ~1000 vertices each, vertex animated, 4-6 frames per animation, only ~4 models, but many of each type (ranges from 1 to 100 each). My hopes are that model instancing and GPU powered animation will reduce the workload for it (in the future)... so, is it a big deal to do it when you have finished some of the more important stuff?
Posted By: jcl

Re: Multithreaded / GPU based vertex animation? - 06/01/10 09:14

Yes, this is possible. When A8 is released, you could send me such a scene and I'll check how I can improve it with GPU vertex animation.

However you must be aware that for GPU based vertex animation to make any sense, we must allocate as many model meshes as there are frames. So we need 5 meshes for a model with 5 frames, which of course consumes 5 times the memory. I'd say this is tolerable for 5 frames, but not if the model has 30 or 50 frames. You'll then use up all your memory for one single model.

When speed is important, better use GPU based bones animation.
Posted By: HeelX

Re: Multithreaded / GPU based vertex animation? - 06/01/10 11:47

Ah, I thought that you mean ~5 frames per animation sequence. In that case I think that the costs are way too high for such a (maybe small) improvement.

Anyways, I will then provide you a scene.

Thanks for your explanations!
-Christian
© 2024 lite-C Forums