v2.0 RC3 posted/tagged

4 views
Skip to first unread message

Paul Martz

unread,
Oct 17, 2011, 6:22:23 PM10/17/11
to osgbull...@googlegroups.com
Hi all -- I've just tagged and uploaded RC3.

Changes since last RC:

* Fixes for the Bullet 2.76/2.77 build issues noted previously.

* Adds CreationRecord::_margin to set the collision shape margin for convex
tri mesh and convex hull shapes. Also hardcodes a margin of 0.0 for convex hull
shapes created by the LaunchHandler. This fixes an issue in the slider example;
if you put a teapot on top of the nightstand, it floated a couple inches above
the surface. This is now fixed.

* Many changes to the slider example... You can now yank the drawer out of the
nightstand and it breaks the slider constraint. Also, we now use a custom
osgShadow technique to improve behavior and appearance for this demo.

I think we're very close to a final release at this point, so I'm just going to
let it sit for a few days while people try it out. Please test and provide feedback.

Thanks!

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

Karrot

unread,
Oct 18, 2011, 8:49:48 AM10/18/11
to osgbullet-users
I've no idea if its still something you're willing to put time in but:

I've been using the debug drawer for a bit (with simple models) but
recently swapped out the more detailed models and one of the debug
functions ended up being counter productive (the drawWireframe). For
each triangle in the wireframe a normal is also drawn, for non-complex
models not a problem, but for complex models, it just ends up in a
yellow pincushion, which obscures the model.

This normal is drawn in virtual void processTriangle @
btCollisionWorld.cpp inside the DebugDrawcallback.
However there is no way to switch this on-off. Such additional
functionality might be nice to have in osgBullet.
I'm not sure if it is possible and/or easy to do, as the virtual
function is inside the callback, so it's just an idea ;-)

Paul Martz

unread,
Oct 18, 2011, 10:12:06 AM10/18/11
to osgbull...@googlegroups.com

Unfortunately it looks like DebugDrawCallback is private to btCollisionWorld's
implementation, so the only way to override this would be to derive a class from
btCollisionWorld (or btDynamicsWorld or btDiscreteDynamicsWorld). Seems like
kind of a heavyweight workaround.

I've seen the effect your describe, and I agree it's ugly and annoying. However,
it's not an osgBullet-specific issue. Creating the same complexity collision
shape from any other source would still create the same pin-cushion result. Too
bad Bullet doesn't have a DBG flag to disable normals.

Note that this effect might be an indication that your collision shape has too
many triangles. I've heard the Bullet folks say that you should really have no
more than a few dozen triangles in a collision shape for maximum efficiency.
osgBullet v2.0 lets you set a triangle reduction in the CreationRecord to create
a collision shape with fewer triangles, so you could give that a try:

CreationRecord* cr; ...
cr->_reductionLevel = CreationRecord::AGGRESSIVE;

This will create a collision shape with fewer triangles, but leaves your visual
model unchanged. In many cases, the difference in the physics behavior isn't
noticeable.

Karrot

unread,
Oct 18, 2011, 10:28:25 AM10/18/11
to osgbullet-users
Hm, yeah thats way too heavy for a workaround, Guess I'll make it an
enhancement request @ Bullet.
I'll have a looksee in the creationRecord, it's only a couple of
models that could need some reduction anyway.
Reply all
Reply to author
Forward
0 new messages