First 2D and 3D CUDA PGS constraint solver preview!

 Posts: 17
 Joined: Mon Oct 28, 2013 12:18 am
First 2D and 3D CUDA PGS constraint solver preview!
Roman and me have been working on implementing a 3D CUDA Projected Gauss Seidel rigid body constraint solver based on Takahiro Harada's 2D CUDA work. Takahiro and me will be discussing this general purpose gameplay physics on GPU at the Physics Tutorial of the Game Developers Conference in San Francisco on Tuesday March 24th.
The results are very promising: CUDA performs really well, even though we haven't optimized fully yet (low occupancy).
You can check the precompiled Windows 32bit binaries at google code.
* update * The implementation will be open sourced, and we are working on the OpenCL port.
Thanks,
Erwin
The results are very promising: CUDA performs really well, even though we haven't optimized fully yet (low occupancy).
You can check the precompiled Windows 32bit binaries at google code.
* update * The implementation will be open sourced, and we are working on the OpenCL port.
Thanks,
Erwin
Re: First 2D and 3D CUDA PGS constraint solver preview!
This looks very interesting, but I have Radeon, so I don't have CUDA support... Have You got in plans translate it to OpenCL?
 Erwin Coumans
 Site Admin
 Posts: 4198
 Joined: Sun Jun 26, 2005 6:43 pm
 Location: California, USA
 Contact:
Re: First 2D and 3D CUDA PGS constraint solver preview!
Yes, AMD helped us with the OpenCL version. It will be open sourced soon, but you need to wait for a public available OpenCL device driver for GPU or CPU.
(the CUDA kernels are almost identical to the OpenCL)
We demonstrated both versions this week during our Physics Tutorial at the game developers conference. The slides are here:
Online Google presentation: http://docs.google.com/Present?docid=dc ... pauth=true
PDF: http://bulletphysics.com/GDC09_ErwinCou ... rs_2nd.pdf
Thanks,
Erwin
(the CUDA kernels are almost identical to the OpenCL)
We demonstrated both versions this week during our Physics Tutorial at the game developers conference. The slides are here:
Online Google presentation: http://docs.google.com/Present?docid=dc ... pauth=true
PDF: http://bulletphysics.com/GDC09_ErwinCou ... rs_2nd.pdf
Thanks,
Erwin
Re: First 2D and 3D CUDA PGS constraint solver preview!
This is fantastic information. Great work!
Re: First 2D and 3D CUDA PGS constraint solver preview!
GPU for physics is interesting, but so far I'm still unable to compile the source code under MinGW (CUDA samples for bullet), I don't plan to migrate over to VC, thus, problems...
Anyway, Erwin and the bullet team, GREAT JOB...
Anyway, Erwin and the bullet team, GREAT JOB...
Re: First 2D and 3D CUDA PGS constraint solver preview!
Hi Erwin  Thanks for the work on this and also for posting the Windows bunaries.
Current Bullet svn head has the Cuda broadphase available, but that's it. I assume once your recent Cuda work is more complete, the Cuda constraint solver will be included in libbulletcuda as well. What is the schedule for this?
I'm not sure I understand how the CDTestFramework and ReleaseAllBulletDemos examples are using Bullet. I presume they're using the solver? What are they intended to demonstrate?
As this solver is not yet available, and given I'm interested in using Cuda with current Bullet (or even 2.74), are there any examples with source code that demonstrate how to currently confugure and use the Cuda classes in libbulletcuda? I'm currently running into issues trying to use bt3DGridBroadphase on my own.
I'm also unsure of how to use the "particles.vcproj" in current Bullet, which is part of Extras/libbulletcuda. I can't get it to successfully link; it comes up with unresolved symbols. I can post an error report if you'd like.
I know this post covers a lot of territory, but if you can fill me in on the status and plans, I'd appreciate it. I'm researching Cuda status for my client at ISU (Doug McCorkle). Thanks.
Current Bullet svn head has the Cuda broadphase available, but that's it. I assume once your recent Cuda work is more complete, the Cuda constraint solver will be included in libbulletcuda as well. What is the schedule for this?
I'm not sure I understand how the CDTestFramework and ReleaseAllBulletDemos examples are using Bullet. I presume they're using the solver? What are they intended to demonstrate?
As this solver is not yet available, and given I'm interested in using Cuda with current Bullet (or even 2.74), are there any examples with source code that demonstrate how to currently confugure and use the Cuda classes in libbulletcuda? I'm currently running into issues trying to use bt3DGridBroadphase on my own.
I'm also unsure of how to use the "particles.vcproj" in current Bullet, which is part of Extras/libbulletcuda. I can't get it to successfully link; it comes up with unresolved symbols. I can post an error report if you'd like.
I know this post covers a lot of territory, but if you can fill me in on the status and plans, I'd appreciate it. I'm researching Cuda status for my client at ISU (Doug McCorkle). Thanks.
Re: First 2D and 3D CUDA PGS constraint solver preview!
This CUDA solver looks very interesting. Any update on when we will be able to test it in own builds?
Thanks,
Krystian
Thanks,
Krystian
 Erwin Coumans
 Site Admin
 Posts: 4198
 Joined: Sun Jun 26, 2005 6:43 pm
 Location: California, USA
 Contact:
Re: First 2D and 3D CUDA PGS constraint solver preview!
We will include some parts of the constraint solver for Bullet 2.75, later this month. Plan is to share the kernels with a pure CPU version as well as OpenCL implementation (in collaboration with AMD).PaulMartz wrote: Current Bullet svn head has the Cuda broadphase available, but that's it. I assume once your recent Cuda work is more complete, the Cuda constraint solver will be included in libbulletcuda as well. What is the schedule for this?
Bullet/Extras/CDTestFramework is mainly a broadphase nbody collision benchmark. The ReleaseAllBulletDemos show all main features of Bullet.I'm not sure I understand how the CDTestFramework and ReleaseAllBulletDemos examples are using Bullet. I presume they're using the solver? What are they intended to demonstrate?
What issues exactly? Can you update to latest trunk, and check out Bullet/Demos/Gpu2dDemo? We will add a Gpu3dDemo, and enable CUDA soon.As this solver is not yet available, and given I'm interested in using Cuda with current Bullet (or even 2.74), are there any examples with source code that demonstrate how to currently confugure and use the Cuda classes in libbulletcuda? I'm currently running into issues trying to use bt3DGridBroadphase on my own.
Please remove/ignore particles.vcproj, it is redundant and obsolete. We will delete it.I'm also unsure of how to use the "particles.vcproj" in current Bullet, which is part of Extras/libbulletcuda. I can't get it to successfully link; it comes up with unresolved symbols. I can post an error report if you'd like.
The GPU 3D collision/constraint solving kernels, including CUDA support, will be available later this month. Note that the solver is workinprogress and not fully generic yet, only supporting contact constraints (although we started working on noncontact joints)This CUDA solver looks very interesting. Any update on when we will be able to test it in own builds?
Thanks,
Erwin
Re: First 2D and 3D CUDA PGS constraint solver preview!
Very, very nice!
I've recompiled the demo to enable CUDA and increased the number of cubes to 4500 (10 by 10 by 45). Using this setting de framerate drops below 24 only a few times.
But I see no apparent performance increase between the CPU solver and the CUDA solver (same with CUDA integrator vs CPU integrator). Am i doing something wrong?
My hardware: Geforce GTX 260, Core2 Quad Q9550 2.83Ghz, 8Gb internal ram.
I assumed CUDA could outperform a CPU by 5 to 20 times ..
I've recompiled the demo to enable CUDA and increased the number of cubes to 4500 (10 by 10 by 45). Using this setting de framerate drops below 24 only a few times.
But I see no apparent performance increase between the CPU solver and the CUDA solver (same with CUDA integrator vs CPU integrator). Am i doing something wrong?
My hardware: Geforce GTX 260, Core2 Quad Q9550 2.83Ghz, 8Gb internal ram.
I assumed CUDA could outperform a CPU by 5 to 20 times ..