Bullet 2.75 beta1: GPU, SPH fluids preview, new constraints

Open source Bullet Physics SDK release information
Post Reply
bullet_team
Posts: 21
Joined: Mon Oct 28, 2013 12:18 am

Bullet 2.75 beta1: GPU, SPH fluids preview, new constraints

Post by bullet_team »

* UPDATE 2009 June 11 *

Bullet 2.75 RC3 (SVN revision 1694) is available for download and testing:
http://code.google.com/p/bullet/downloads/list

Some features:
  • Smoothed Particle Hydrodynamics (SPH) fluids preview, thanks to Rama Hoetzlein for contributing this under the ZLib license! See Bullet/Extras/sph. The SPH fluids will be integrated into Bullet with two-way interaction, similar to cloth/soft body simulation.
  • GPU physics kernels preview. Right now mainly CPU version, you can enable CUDA version manually. An OpenCL version will follow soon. See Bullet/Demos/Gpu2/3dDemo
  • 2D physics demo, with 2D and 3D object interaction, see Bullet/Demos/Box2dDemo
  • New constraints: btHinge2Constraint,btUniversalConstraint,btGeneric6DofSpringConstraint, thanks to Roman Ponomarev
  • Use ALT+Left/Middle/Right Mouse button+mouse motion for Maya-style camera navigation
  • Re-enabled split impulse constraint solver option, to avoid adding momentum due to penetration recovery (includes SIMD support)
  • Removed first argument 'localInertiaTensor, from btMultiSphereShape. Update your code by remove the first argument: it calculates its local inertia from its aabb now.
  • Increased performance by disabling motion state synchronization for static/inactive objects.
    Use btDiscreteDynamicsWorld::setSynchronizeAllMotionStates(true); for backwards compatiblity.
  • many bug fixes
Thanks everyone for the contributions and patches and other feedback!

There are still many open issues, they will be addressed in upcoming versions!
Enjoy,
Erwin
gjaegy
Posts: 178
Joined: Fri Apr 18, 2008 2:20 pm

Re: Bullet 2.75 beta1: GPU, SPH fluids preview, new constraints

Post by gjaegy »

Nice work Erwin.

I guess I am getting a bit annoying with my stupid feature request, but any idea when split impulse will be there again ?

Cheers,
Greg
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA
Contact:

Re: Bullet 2.75 beta1: GPU, SPH fluids preview, new constraints

Post by Erwin Coumans »

gjaegy wrote:Nice work Erwin.

I guess I am getting a bit annoying with my stupid feature request, but any idea when split impulse will be there again ?

Cheers,
Greg
Fair enough, we'll include the feature for Bullet 2.75:
http://code.google.com/p/bullet/issues/detail?id=202

Thanks for the reminder,
Erwin
peltonen
Posts: 18
Joined: Thu Jan 17, 2008 8:16 pm

Re: Bullet 2.75 beta1: GPU, SPH fluids preview, new constraints

Post by peltonen »

Looking great... can't wait for the reintroduction of split impulse.

Thanks!
fido
Posts: 14
Joined: Sun Mar 22, 2009 5:57 pm

Re: Bullet 2.75 beta1: GPU, SPH fluids preview, new constraints

Post by fido »

Just another reminder - I don't see "active objects set" in 2.75beta.
It still iterates m_collisionObjects many times each simulation step.
Atleast, I did myself simple modification to btDiscreteDynamicsWorld
that I have separate container for rigid bodies thus many loops with
such construction:
for (int i=0;i<m_collisionObjects.size();i++)
{
btCollisionObject* colObj = m_collisionObjects;
btRigidBody* body = btRigidBody::upcast(colObj);
if (body)

are working with much smaller set of data now. Until that, it made
Bullet unusable for large world with thousands of static objects and
only a few rigid bodies.

best regards, Fido
JamesH
Posts: 19
Joined: Mon Oct 16, 2006 6:19 pm

Re: Bullet 2.75 beta1: GPU, SPH fluids preview, new constraints

Post by JamesH »

I'm trying to compile the sph project and it's looking for the glee_2008d.lib file. Any idea what this is, or rather, where it is ?

Many thanks
ola
Posts: 169
Joined: Sun Jan 14, 2007 7:56 pm
Location: Norway
Contact:

Re: Bullet 2.75 beta1: GPU, SPH fluids preview, new constraints

Post by ola »

Just a small reminder for this tiny fix :-)
http://www.bulletphysics.com/Bullet/php ... f=9&t=3599

(virtual definition of addCollisionObject / removeCollisionObject in btCollisionWorld.h)

Best regards,
Ola
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA
Contact:

Re: Bullet 2.75 beta1: GPU, SPH fluids preview, new constraints

Post by Erwin Coumans »

Bullet 2.75 RC1 has been uploaded, based on latest SVN trunk revision 1691.
gjaegy wrote: I guess I am getting a bit annoying with my stupid feature request, but any idea when split impulse will be there again ?
Can you test Bullet 2.75 RC1, it adds the split impulse option.
ola wrote: (virtual definition of addCollisionObject / removeCollisionObject in btCollisionWorld.h)
Added in RC1.
JamesH wrote: I'm trying to compile the sph project and it's looking for the glee_2008d.lib file. Any idea what this is, or rather, where it is ?
Can you please try RC1? glee*.lib should not be needed anymore, it includes glee.c now.
fido wrote: Atleast, I did myself simple modification to btDiscreteDynamicsWorld
Same simple modification has been applied, can you please test RC1?

Thanks for all the feedback!
Erwin
JamesH
Posts: 19
Joined: Mon Oct 16, 2006 6:19 pm

Re: Bullet 2.75 beta1: GPU, SPH fluids preview, new constraints

Post by JamesH »

Erwin Coumans wrote:Bullet 2.75 RC1 has been uploaded, based on latest SVN trunk revision 1691.
JamesH wrote: I'm trying to compile the sph project and it's looking for the glee_2008d.lib file. Any idea what this is, or rather, where it is ?
Can you please try RC1? glee*.lib should not be needed anymore, it includes glee.c now.
Thanks Erwin, it compiles now

Cheers.
ola
Posts: 169
Joined: Sun Jan 14, 2007 7:56 pm
Location: Norway
Contact:

Re: Bullet 2.75 beta1: GPU, SPH fluids preview, new constraints

Post by ola »

I just tested the RC1 (svn 1691), and I think I might have a problem with static rigid bodies. We depend on switching the rigid bodies from dynamic to static and back (by removing, re-adding with or without mass).

Previous behaviour for these was that they are added to the world and show up as active for a second or so, before turning inactive (they return body->getActivationState() == ISLAND_SLEEPING). Now, they appear to remain active at all times, returning body->getActivationState() == ACTIVE_TAG.

I don't know if the only problem is that they return ACTIVE_TAG instead of ISLAND_SLEEPING, or if this then also influences the collision detection performance? At least, there might be code that relies on this flag, which will now break because of this change. I'm looking through my own code for this right now...

I also saw that now btDiscreteDynamicsWorld::setGravity and clearForces only applies to the dynamic rigid bodies. This could have broken some functionality in our case, so please make a note of this in the release notes :-)

Apart from that, the improvement in only updating the moving rigid body transforms is great :-)

Best regards,
Ola

EDIT:
Maybe it's sufficient to add something like this to btDiscreteDynamicsWorld::addRigidBody? "else setActivationState(ISLAND_SLEEPING);" That fixed the issues I had here in my code.

Code: Select all

void	btDiscreteDynamicsWorld::addRigidBody(btRigidBody* body)
{
	if (!body->isStaticOrKinematicObject())
	{
		body->setGravity(m_gravity);
	}

	if (body->getCollisionShape())
	{
		if (!body->isStaticObject())
		{
			m_nonStaticRigidBodies.push_back(body);
		}
            else
                body->setActivationState(ISLAND_SLEEPING);

		bool isDynamic = !(body->isStaticObject() || body->isKinematicObject());
		short collisionFilterGroup = isDynamic? short(btBroadphaseProxy::DefaultFilter) : short(btBroadphaseProxy::StaticFilter);
		short collisionFilterMask = isDynamic? 	short(btBroadphaseProxy::AllFilter) : 	short(btBroadphaseProxy::AllFilter ^ btBroadphaseProxy::StaticFilter);

		addCollisionObject(body,collisionFilterGroup,collisionFilterMask);
	}
}
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA
Contact:

Re: Bullet 2.75 beta1: GPU, SPH fluids preview, new constraints

Post by Erwin Coumans »

ola wrote: EDIT: Maybe it's sufficient to add something like this to btDiscreteDynamicsWorld::addRigidBody? "else setActivationState(ISLAND_SLEEPING);" That fixed the issues I had here in my code.
Thanks, can you try out Bullet 2.75 RC2?
Erwin
ola
Posts: 169
Joined: Sun Jan 14, 2007 7:56 pm
Location: Norway
Contact:

Re: Bullet 2.75 beta1: GPU, SPH fluids preview, new constraints

Post by ola »

Thanks, can you try out Bullet 2.75 RC2?
Yes, it works fine now! :-) Thank you.
Wavesonics
Posts: 71
Joined: Thu May 22, 2008 8:03 pm

Re: Bullet 2.75 beta1: GPU, SPH fluids preview, new constraints

Post by Wavesonics »

Why was split impulse removed?

And when was it removed? I'm using 2.73, was it in that?

I ask because we are seeing, every once in a while, some very strange output from Bullet (position data wise), and I'm wondering if it could be from a bug in the split impulse solver?

Too be specific we are seeing NAN as position output (Wii/PPC)

We are right on the cusp of release, so we don't want to upgrade any libs if we don't have to, but if there is a fixed split impulse solver in this version, we might have to.
Cleanrock
Posts: 7
Joined: Tue May 01, 2007 6:23 pm

Re: Bullet 2.75 beta1: GPU, SPH fluids preview, new constraints

Post by Cleanrock »

is it possible to get a changes summary of the latest 2.75 RC here ? (2.75 RC7 atm)
Post Reply