Physics Simulation Forum

 Page 1 of 1 [ 1 post ]
 Print view Previous topic | Next topic
Author Message
 Post subject: Using Bullet without geometry infoPosted: Thu Sep 01, 2011 11:26 am

Joined: Sun Jan 30, 2011 8:46 pm
Posts: 64
Hi,

I am trying to add physics to an open source solid modeling software : BRL-CAD . The aim is to allow objects to fall to the ground under gravity.

BRL-CAD represents objects in a pure mathematical sense. So a sphere is just a radius and center point. It does not try to approximate it using triangles etc because the software is not required to render the shapes in real time. Rendering occurs using raytracing which can use the mathematical information about the geometry of the object.

So I cannot create exact collision shape geometry in Bullet to match the geometry represented by BRL-CAD. A sphere is a simple case, but more complex shapes can exists such as a Boolean operation of say a Cube subtracted from another bigger cube, thus removing a chunk of it. So the geometry information is accessed using handles to the representation in BRL-CAD structures.

Therefore Bullet knows nothing but the AABBs of the shapes and can only detect their overlaps. Exact contact points is generated using custom overlap detection and contact manifold generation of tools from BRL-CAD.

The way I plan to use Bullet for this is initially create a collision shape using btBoxShape and set its AABB to what I want. This is because I cannot just create AABBs without specifying some collision shape. However during the simulation I need to get a callback that allows me to modify the contact points and normals as the actual geometry inside the AABB may not be a box, but a sphere.

So if we take the simple case of say a sphere of 1m falling to a ground plane on the xz plane from a height of 50m above the origin, then I would "create" this sphere using a btBoxShape in Bullet because as far as bullet is concerned it knows nothing but the AABB of the geometry. When this shape hits the ground plane, then bullet would generate points all along the bottom face of the box.

However I want the contact point to be reset to the single point(assuming there is no interpenetration yet) at the bottom of the sphere which actually makes contact and whose shape the rigid body actually represents.

So my question is (finally!) as follows :
* is it possible to register custom manifold generation algorithms with bullet, such that I can reset the contact points using geometry information that only I have and bullet does not

* If I do reset the contact points and normals, then will bullet recalculate the forces between the sphere and the object automatically, or can I register custom algos to set the force direction, and let bullet handle only the resulting acceleration.

Top

 Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending
 Page 1 of 1 [ 1 post ]

Who is online

Users browsing this forum: Exabot [Bot] and 4 guests

 You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum

Search for:
 Jump to:  Select a forum ------------------ BULLET PHYSICS LIBRARY USERS    General Bullet Physics Support and Feedback    Release Announcements    Applications, Games, Demos or Movies using Bullet PHYSICS AUTHORING TOOLS, SERIALIZATION AND STANDARDS    Physics authoring tools, serialization, standards and related topics RESEARCH AND DEVELOPMENT IN COLLISION DETECTION & PHYSICS. Don't post Bullet support questions here!    Research and development discussion about Collision Detection and Physics Simulation    Links, Papers, Libraries, Demos, Movies, Comparisons       Non-technical forum and license/patent discussion    Career Opportunities