GPU Rigid-body compound from spheres primitives

Post Reply
matmuze
Posts: 4
Joined: Mon Jan 11, 2016 10:36 pm

GPU Rigid-body compound from spheres primitives

Post by matmuze »

Hi there,

I am trying to run a large scale rigid-body simulation (thousands of rigid bodies) for molecular dynamics scenes using bullet GPU...

To deal with collision-detection with molecules it is common to use a collision proxy made out of spheres, since shapes can be very complex sometimes.

I attached an image to show you guys how a proxy could look like.

I tried to use NV Flex before but it is rather restrictive in a sense that particles that compose the proxies must have the same radius, which is not preferable in our case, since as you can see spheres can vary greatly in size.


Reading about this technique, on which bullet is built upon, it seems like efficient rigid-body simulation on the GPU with different radius bodies is possible after all...

http://graphics.ewha.ac.kr/gSaP/ (section 2. Particle Simulation)

What I would like is to create a single rigid-body which would be made out of spheres primitives.

I would also like this to be made in the most efficient way as possible using instancing of the rigid-body shape when using a large number of instances of the same molecules.

Thanks in advance for your help, I will dig in the API in the meanwhile to see if I can find answers myself and keep this post up to date.

Best regards,
Mathieu.
Attachments
union-of-balls.png
union-of-balls.png (303.01 KiB) Viewed 9346 times
User avatar
drleviathan
Posts: 849
Joined: Tue Sep 30, 2014 6:03 pm
Location: San Francisco

Re: GPU Rigid-body compound from spheres primitives

Post by drleviathan »

Bullet has a btMultiSphereShape which sounds like exactly what you want: arbitrary number of spheres, each with its own relative position and radius.

Bullet supports "shape sharing": you can instantiate a single 20-sphere btMultiSphereShape and then assign that one shape to 100 different btRigidBody instances -- they will all collide with the same shape.
matmuze
Posts: 4
Joined: Mon Jan 11, 2016 10:36 pm

Re: GPU Rigid-body compound from spheres primitives

Post by matmuze »

Hi there, thanks for the reply but I dont think this is designed for the GPU, is it ?
User avatar
drleviathan
Posts: 849
Joined: Tue Sep 30, 2014 6:03 pm
Location: San Francisco

Re: GPU Rigid-body compound from spheres primitives

Post by drleviathan »

There is some experimental GPU acceleration code in Bullet but I have not tried it.
toddcpierce
Posts: 2
Joined: Fri Jan 22, 2016 3:44 pm

Re: GPU Rigid-body compound from spheres primitives

Post by toddcpierce »

Ahhhh... someone else wanting to use Bullet for molecular dynamics.

Are you having any luck? I have a (hobby) requirement for simulating a LOT of particles too.

I'm thinking about taking it to the next level (QM/MM) even.

First, I just want to know if I can intervene when a particle bumps into something. Is there a handle on that where I can run code? Can I output the force/velocity/location information of every particle to a file at a given timestep like in Gromacs?

Would be fun indeed.

-Todd
johnsonalpha
Posts: 73
Joined: Fri May 01, 2015 8:23 pm

Re: GPU Rigid-body compound from spheres primitives

Post by johnsonalpha »

Bullet isnt good for this type of thing use a open source physics engine called Chrono Engine here a link

http://chronoengine.info/chronoengine/

You can simulate large granular stuff with real world cohesive effects heres a video of the granular stuff simulated in chrono engine

https://vimeo.com/140448032
https://vimeo.com/135975392
matmuze
Posts: 4
Joined: Mon Jan 11, 2016 10:36 pm

Re: GPU Rigid-body compound from spheres primitives

Post by matmuze »

I looked at the chrono engine, and it does not have a GPU module which is available publicly, I'm trying to simulate large number of rigid bodies, however Bullet GPU is nowhere near the performances which are mentioned in the videos or presentations (SIGGRAPH)... has anyone managed to run Bullet GPU with decent performance yet ?
johnsonalpha
Posts: 73
Joined: Fri May 01, 2015 8:23 pm

Re: GPU Rigid-body compound from spheres primitives

Post by johnsonalpha »

Yes chrono engine has a open source gpu solver on github. I suggest you do a little more research and look into chrono engine. Bullet isnt made for this kind of thing also ive tested the Bullet gpu stuff and its as you described.
Post Reply