Open Scenegraph and Bullet?

Show what you made with Bullet Physics SDK: Games, Demos, Integrations with a graphics engine, modeler or any other application
Post Reply
HeroIsNotBorn
Posts: 5
Joined: Mon Dec 11, 2006 2:56 pm
Location: orlando, florida

Is anyone working on openscenegraph + bullet?

Post by HeroIsNotBorn »

Is anyone working on openscenegraph + bullet?
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA
Contact:

Re: Is anyone working on openscenegraph + bullet?

Post by Erwin Coumans »

HeroIsNotBorn wrote:Is anyone working on openscenegraph + bullet?
Probably not yet. Are you interested in starting an integration?

If so, You can post your results here, and get some feedback/help on this forum.
Erwin
HeroIsNotBorn
Posts: 5
Joined: Mon Dec 11, 2006 2:56 pm
Location: orlando, florida

Thin Box Problem

Post by HeroIsNotBorn »

I created multiple thin boxes with size of (1.6, 0.1, 1.6) in my scene, some of them occasionally will penetrate into each other.

Like, with a scene including hundreds of thin boxes and one thin box to represent the ground, one box occasionally will penetrate the ground.
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA
Contact:

Post by Erwin Coumans »

I created multiple thin boxes with size of (1.6, 0.1, 1.6) in my scene, some of them occasionally will penetrate into each other.

Like, with a scene including hundreds of thin boxes and one thin box to represent the ground, one box occasionally will penetrate the ground.
It's easier to break a rigidbody dynamics engine then to make effective use of it. Some rules of thumb might help: sizes of less then 0.2 are not supported. Large mass ratios are not supported either (avoid 100kg on top of 1kg), don't use huge sizes for collision shapes (<10 units). If you need a larger static environment, use either triangle meshes with reasonable sized triangles (< 10 units), or a plane shape.

This and much more should go in the manual (Bullet_User_Manual.pdf)
Hope this helps,

Do you have some demo using OpenSceneGraph?
Erwin
HeroIsNotBorn
Posts: 5
Joined: Mon Dec 11, 2006 2:56 pm
Location: orlando, florida

I made a video

Post by HeroIsNotBorn »

I guess I can work around the thickness problem by changing the world dimension unit.

My application is for visualizing hurricane damage process.
I made a video showing shingles fell to the ground under gravity force. but I donot know how to paste here. It's about 4 megabytes.
And I am still working on that.
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA
Contact:

Re: I made a video

Post by Erwin Coumans »

HeroIsNotBorn wrote:I guess I can work around the thickness problem by changing the world dimension unit.

My application is for visualizing hurricane damage process.
I made a video showing shingles fell to the ground under gravity force. but I donot know how to paste here. It's about 4 megabytes.
And I am still working on that.
Perhaps you can upload it to YouTube?

It's best to use meters for units: 1 meter = 1 unit. Then gravity around 10.
And keep object sizes 'reasonable' above 20 centimeter (in any direction) and at most 10 meters.
Also, never make the margin totally zero or too small (setCollisionMargin/setMargin), that's destined to fail. Best to use at least 0.02 - 0.05 units. Other improvements include making the internal timesteps smaller.
The internal timestep is normally 60 hertz, and you can change this by changing the 3rd parameter of 'stepSimulation'. The second should be large enough too:
This would use an internal timestep of 240 hertz:

Code: Select all

dynamicsWorld->stepSimulation(timeStep, 1000, 1.0 / 240.0);
It will allow at most 1000 times 240 hertz internal fixed steps to reach your 'timeStep'. Don't pass 0 as second argument.

Hope this helps,
Erwin
janoc
Posts: 1
Joined: Tue May 20, 2008 5:50 pm

Re: Open Scenegraph and Bullet?

Post by janoc »

Hello,

I have posted an example of OSG 2.4 with Bullet 2.68 on the OSG wiki:
http://www.openscenegraph.org/projects/ ... /Tutorials

You need to make a makefile or project, it is using an Eclipse CDT project at the moment.

The example runs the update of the physics in the main rendering loop,
however that is trivial to move either into a callback of a special node
or a thread or whatever you need.
PaulMartz
Posts: 28
Joined: Mon Jun 02, 2008 7:21 pm

Re: Open Scenegraph and Bullet?

Post by PaulMartz »

Anyone interested in using OSG and Bullet should see the topic "Announcing osgBullet" in this forum:
http://www.bulletphysics.org/Bullet/php ... =17&t=4308
Post Reply