Articulations and CUDA


I am doing research on physics based character control which involves running lots of simulations with articulations and analysing the results, then tweaking the simulations and repeating. Simulating on the CPU, I can run several simulations in parallel, which speeds things up a lot, but I still have so many iterations to run that it can take hours to complete. I have noticed that recent versions of PhysX include CUDA support, and I am wondering whether I can speed things up further by using the GPU, but I have some questions:

  • what kind of performance might I expect for simulating articulations (containing about 20 links) on GPU vs CPU, assuming that I can run a large number of independent simulations in parallel?

  • if the GPU is likely to be significantly faster, what would be the best way to structure my problem? For example, would one scene with lots of articulations, or many separate scenes be a better way to go?

  • can anyone point me to a tutorial or some example code using the GPU in PhysX? I’ve looked at the pages on the Nvidia developer website, but I don’t really feel confident yet that I could get it working easily. Some example code would be really useful.

  • would the output of the simulation using the GPU be identical to that from the CPU?

I appreciate any help anyone can give me with this.

Afaik, articulations do not support GPU acceleration.

Thanks a lot for the reply. Just out of interest, do you know if there is a list of what simulation tasks are or aren’t supported in CUDA, or any info on which simulation scenarios are likely to be suited to the GPU?

Inside PhysX SDK, only particles/fluids and cloth are using CUDA acceleration - you can find more info in corresponding docs sections.

APEX extensions on GPU are also featuring volumetric smoke sim (Turbulence) and rigid bodies (Destruction).
However, GPU Rigid bodies are samewhat limited in features (no joints, one-way interactio with CPU RB, etc) and are currently being reworked for PhysX 3.x SDK

Also, there is pure GPU accelerated FLEX solver, that can simulate variety of objects (rigids, cloth, softbody, fluids), but afaik it also does not support complex joints yet.

Thanks for the detailed response, it’s very helpful.