Page 1 of 1

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

Posted: Sat May 23, 2009 3:20 am
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

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

Posted: Mon May 25, 2009 2:30 pm
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

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

Posted: Thu May 28, 2009 4:59 pm
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

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

Posted: Fri May 29, 2009 12:59 am
by peltonen
Looking great... can't wait for the reintroduction of split impulse.

Thanks!

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

Posted: Sat May 30, 2009 12:34 pm
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

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

Posted: Tue Jun 09, 2009 7:19 am
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

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

Posted: Tue Jun 09, 2009 1:52 pm
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

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

Posted: Thu Jun 11, 2009 1:42 am
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

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

Posted: Thu Jun 11, 2009 7:36 am
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.

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

Posted: Thu Jun 11, 2009 11:01 am
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);
	}
}

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

Posted: Thu Jun 11, 2009 2:09 pm
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

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

Posted: Thu Jun 11, 2009 2:18 pm
by ola
Thanks, can you try out Bullet 2.75 RC2?
Yes, it works fine now! :-) Thank you.

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

Posted: Thu Jun 11, 2009 7:16 pm
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.

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

Posted: Fri Aug 14, 2009 3:15 pm
by Cleanrock
is it possible to get a changes summary of the latest 2.75 RC here ? (2.75 RC7 atm)