v2.0 release notes

8 views
Skip to first unread message

Paul Martz

unread,
Oct 12, 2011, 6:27:45 PM10/12/11
to osgbull...@googlegroups.com
Hi all -- Please review the release notes below. I'm doing the 2.0 release on a
branch:
https://osgbullet.googlecode.com/svn/branches/2_00-branch
The release notes are in the top level osgBullet directory on that branch. I'll
tag a second release candidate shortly and announce here and on osg-users as well.

I'm looking into one bug I'd like to see resolved before the final release. Many
of the examples now allow you to hit the Delete key to reset the physics
simulation to its initial state. This works fine on Windows for everything, but
on OS X it works for all the examples *except* the osgbpp app.

I also want to get the new osgbInteraction event handlers documented with
Doxygen. Then I'm ready for a release, unless something comes up I don't know
about yet.

Please test and report back here as time allows. I would appreciate any
feedback. Thanks!
-Paul

osgBullet v2.00.00 Release Notes

v2.00.00 is not backwards-compatible with osgBullet v1.xx. osgBullet-based
applications and projects will need to port their code to the new version.
Changes from v1.01.00 to v2.00.00 include the following:

* The osgbBullet library has been replaced with two libraries: osgbCollision and
osgbDynamics. Your project will need to link with the new libraries. The
v2.00.00 contains an analogous change in the namespaces and header file
directory structure.

* By linking with osgbCollision, your osgBullet application can use Bullet for
collision detection without a dependency on libBulletDynamics. The new
collision example program demonstrates this usage.

* The OSGToCollada class has been replaced by new rigid body creation
convenience routines. See the osgbDynamics/RigidBody.h header file. Nearly all
of the examples and tests use the new interface.

A new library, osgbInteraction, has been added to allow user interaction with
the physics simulation. The library contains the following classes:

* The HandNode class features a fully articulated hand model that can be
driven by a data glove or keyboard. Support for the P5 data glove is provided.

* The DragHandler allows the user to drag rigid bodies using the mouse.

* The LaunchHandler allows the user to fire objects into the scene.

* The SaveRestoreHandler allows the user to capture the physics simulation at
a particular point in time, then restore back to the capture point.

* New examples demonstrate hinge and slider constraints.

* The MotionState class now exposes routines to convert between Bullet collision
object and OSG coordinates while correctly accounting for differences due to
center of mass and scaling.

* A new example, saverestore, demonstrates saving current physics state and
restoring from file.

* Many classes are now documented using Doxygen.


Paul Martz

unread,
Oct 12, 2011, 11:42:38 PM10/12/11
to osgbull...@googlegroups.com
On 10/12/2011 4:27 PM, Paul Martz wrote:
> I'm looking into one bug I'd like to see resolved before the final release.
> Many of the examples now allow you to hit the Delete key to reset the physics
> simulation to its initial state. This works fine on Windows for everything,
> but on OS X it works for all the examples *except* the osgbpp app.

This turned out to be my old friend, "dynamic_cast succeeds on Windows but fails
on OS X." I was using a dynamic_cast to change a btCollisionObject* to a
btRigidBody*. Failed on OS X, worked on Windows. I changed the dynamic_cast to a
static_cast to get around it. This worries me; I've read a few forum discussion
on this issue, but I still don't understand what's going wrong here.

Anyhow, RC2 is now posted! Announcing on osg-users shortly...
-Paul

Karrot

unread,
Oct 17, 2011, 3:51:38 AM10/17/11
to osgbullet-users
Looks nice, time to take it for a spin! :D

Karrot

unread,
Oct 17, 2011, 5:32:58 AM10/17/11
to osgbullet-users
Couple of build problems using:

OSG 3.0, Bullet 2.77, OSGworks 2.00.00 RC1(rev344), OSGBullet 2.0 (rev
252)

.\..\..\src\osgbInteraction\LaunchHandler.cpp(149) : error C2660:
'btDynamicsWorld::addRigidBody' : function does not take 3 arguments

This is an overload added in Bullet 2.78, so it will not be compatible
with previous bullet versions.

..\..\..\examples\slider\slider.cpp(422) : error C2039: 'isEnabled' :
is not a member of 'btSliderConstraint'
..\..\..\examples\slider\slider.cpp(428) : error C2039: 'setEnabled' :
is not a member of 'btSliderConstraint'

Same as above, both member functions are not present in 2.77, but are
in 2.78.

osgbCollision and Dynamics build without a problem against 2.77.

So Bullet 2.77 and previous versions should probably be removed from
the compatibility list (or somehow fixed).

Karrot

unread,
Oct 17, 2011, 8:57:51 AM10/17/11
to osgbullet-users
As expected, osgBullet compiles and demos run just fine and dandy with
Bullet 2.78 and 2.79.

Only tested 64bit on Win7 @ VS2008sp1.

Paul Martz

unread,
Oct 17, 2011, 9:20:42 AM10/17/11
to osgbull...@googlegroups.com
Blech. Thanks for the testing. I'll dig in.
-Paul

Paul Martz

unread,
Oct 17, 2011, 10:30:09 AM10/17/11
to osgbull...@googlegroups.com
Thanks, Karrot -- I've managed to fix both of these, and I'm currently building
with 2.76 for test purposes.

The addRigidBody overload that takes collision filters is in
btDiscreteDynamicsWorld, but I failed to dynamic_cast to that from
btDynamicsWorld before invoking that function. So this is one of those "how on
Earth did it work at all on other platforms" issues. Glad you caught it.

For the second one, I've been involved in some discussion at bulletphysics.org
that have led me to believe that I really want to remove and delete the
constraint, rather than just disable it. So I've updated the code to do that,
which removes the compatibility issue with isEnabled/setEnabled usage.

My changes are on the branch and on trunk. Please update and try again as time
allows.

I'm seeing an issue with the slider example only on Mac OS X: If I
ctrl-leftmouse and pull the drawer all the way out, then release the mouse
button to drop the drawer on the floor, it falls right through the floor and
doesn't collide. Not sure what's going wrong here, but it's obviously some kind
of problem with collision filters. I'll continue looking into it.
-Paul

On 10/17/2011 3:32 AM, Karrot wrote:

Karrot

unread,
Oct 17, 2011, 11:20:34 AM10/17/11
to osgbullet-users
Hm, the collision filtering you are using should be fine (I'm using a
simular collision filtering setup). My only oneducated guess would be
that OS X isn't handling the bitmasks the way they should and/or can't
assign the proper values to collideswith....

You could try with the implementation as provided by the example, ie.
define BIT(x) (1<<(x))

enum CollisionTypes {
COL_DRAWER = 0,
COL_STAND = BIT(0),
COL_DEFAULT = BIT(0)
};

unsigned int drawerCollidesWith = COL_DEFAULT;
unsigned int standCollidesWith = COL_DEFAULT;
unsigned int defaultCollidesWith = COL_DRAWER | COL_STAND |
COL_DEFAULT;

It's probably unlikely to make a difference, but it might just with OS
X, mayhap it handles int constructor values slightly difference or
something.

Karrot

unread,
Oct 17, 2011, 11:26:07 AM10/17/11
to osgbullet-users
Something else that springs to mind is the filtermasks might be wrong
(which is wierd as it works for x86/64...)

unsigned int drawerCollidesWith( COL_DEFAULT | COL_STAND);
unsigned int standCollidesWith( COL_DEFAULT | COL_DRAWER);
unsigned int defaultCollidesWith( COL_DRAWER | COL_STAND |
COL_DEFAULT );

(see Note: As of 17/08/10,.... in the wiki)

Paul Martz

unread,
Oct 17, 2011, 12:57:58 PM10/17/11
to osgbull...@googlegroups.com

Actually, the filters are correct in the current code: the drawer and the stand
should *not* collide with each other. However, down at the bottom of the main
rendering loop, when I delete the constraint (because the drawer is pulled out),
I want to change the collision flags so that the drawer and stand *do* collide,
and this was where I was running into problems.

The solution I had in place -- directly modify the collision flags in the drawer
body's btBroadphaseProxy, seemed to work on Windows, but failed on OS X. I
struck up a conversation in the forum:
http://bulletphysics.org/Bullet/phpBB3/viewtopic.php?f=9&t=7538
and have now modified the example to remove and add back the drawer body with
the new filters. Seems like kind of a kludge, but it works on both Windows and
OS X: when the drawer is pulled out, it now properly falls onto (and not
through) the floor.

About the only other thing I'd like to do before the next RC is limit the slider
demo depth map shadow to be centered around the nightstand. Digging into that now...

--
-Paul Martz Skew Matrix Software
http://www.skew-matrix.com/

Karrot

unread,
Oct 17, 2011, 4:55:45 PM10/17/11
to osgbullet-users
Well, glad that's solved then :)
Reply all
Reply to author
Forward
0 new messages