Pre-Newbie questions

hkyriazi
Posts: 8
Joined: Thu Nov 17, 2011 6:32 pm

Pre-Newbie questions

Post by hkyriazi »

1) Does Bullet Physics do stand-alone 3-D rigid body dynamics simulations, or must I use something like Blender, with Bullet Physics as a plug-in?
2) What's the easiest way to model a thousand or so identical 3D rigid bodies that undergo simple collision and recoil? (Blender has way more capability than I need.)
User avatar
Dr.Shepherd
Posts: 168
Joined: Tue Jan 04, 2011 11:47 pm

Re: Pre-Newbie questions

Post by Dr.Shepherd »

hkyriazi wrote:1) Does Bullet Physics do stand-alone 3-D rigid body dynamics simulations, or must I use something like Blender, with Bullet Physics as a plug-in?
2) What's the easiest way to model a thousand or so identical 3D rigid bodies that undergo simple collision and recoil? (Blender has way more capability than I need.)
I think I can answer this question. HAHA

1. You can do this alone, no need to use 3d package
2. check the BasicDemo in the Demo/ Directory.

Check Demo and you can start from there
hkyriazi
Posts: 8
Joined: Thu Nov 17, 2011 6:32 pm

Re: Pre-Newbie questions

Post by hkyriazi »

Thanks! I'll check it out.
User avatar
dphil
Posts: 237
Joined: Tue Jun 29, 2010 10:27 pm

Re: Pre-Newbie questions

Post by dphil »

Dr.Shepherd wrote: 1. You can do this alone, no need to use 3d package
To add to/clarify what Dr Shepherd said, you can indeed use Bullet alone as a collision detection and dynamics library without visualization, but it does *not* have graphics integration; if you want graphics, you need to provide that yourself. Typically people use either their own renderers (as with the Bullet demos' OpenGL renderer, which you can adapt for your purposes) or some 3rd party graphics engines (Ogre3D, OpenSceneGraph, etc).
hkyriazi
Posts: 8
Joined: Thu Nov 17, 2011 6:32 pm

Re: Pre-Newbie questions

Post by hkyriazi »

Thanks, Dr. Shepherd and dphil.

I downloaded Bullet 2.79, but when I unzipped it, I couldn't find (or recognize) an executable file. So, I'm too ignorant to even get a demo running. I gather it's more involved than just a simple click. I do have a pdf of the manual, but haven't found step-by-step instructions there yet on getting it running.

On a different subject, assuming I do want 3D visualization, what's the best (easiest) way to get that for the simple rigid body collisions I'll be modeling?
Karrok
Posts: 65
Joined: Fri May 13, 2011 1:11 pm

Re: Pre-Newbie questions

Post by Karrok »

Once you extracted the zip you can do one of two things:

in the bullet-2.79/msvc folder there are a couple of .bat files, assuming you know which visual studio version you have, you execute the appropriate .bat file (so if you have visual studio 2008 you execute vs2008.bat).
a vs2008 folder is generated (bullet-2.79/msvc/vs2008 for example). In that folder is a .sln, open this.

Then just build whatever demo you want and it'll automatically build the Bullet core libs.

Alternatively, you can use CMake, but I guess for now this involves a bit too much configuring compared to the method above.
User avatar
dphil
Posts: 237
Joined: Tue Jun 29, 2010 10:27 pm

Re: Pre-Newbie questions

Post by dphil »

I would check out the wiki pages for help on getting started: http://bulletphysics.org/mediawiki-1.5. ... ng_Started

As for visualization, I think the easiest way is just adapt the Bullet demo code, which already has rendering. Otherwise...it's pretty much up to you. If you're ok with OpenGL, you could write your on rendering code. Or, you might try Ogre3D, a popular open source graphics engine. There would be a bit of a learning curve for that too though. Once you have a renderer to use, probably the easiest way to get visuals is if you implement the btIDebugDraw interface (http://bulletphysics.com/Bullet/BulletF ... gDraw.html). Then if you tell the bullet engine to use your implementation (bulletWorld->setDebugDrawer(...)), it will make the calls to your debug drawer to draw stuff. So, Bullet figures out the info necessary for rendering (triangles, lines, etc), and tells your debug drawer what to draw and where. Then your implementation can decide *how* to draw that with your particular renderer (ie by forwarding the appropriate draw calls to your graphics engine).
hkyriazi
Posts: 8
Joined: Thu Nov 17, 2011 6:32 pm

Re: Pre-Newbie questions

Post by hkyriazi »

Thanks, Karrok and dphil (once again). I'm learning how little I know. It seems I'll either have to buy Visual Studio (I can get an academic version for $129) or use Blender. (The only programming language I know is FORTRAN, so it seems there'll be a steep learning curve for me no matter what.)
User avatar
Dr.Shepherd
Posts: 168
Joined: Tue Jan 04, 2011 11:47 pm

Re: Pre-Newbie questions

Post by Dr.Shepherd »

hkyriazi wrote:Thanks, Karrok and dphil (once again). I'm learning how little I know. It seems I'll either have to buy Visual Studio (I can get an academic version for $129) or use Blender. (The only programming language I know is FORTRAN, so it seems there'll be a steep learning curve for me no matter what.)
In my memory, you can get a Visual Studio Express for free, and moreover, you can use codeblocks, someone posted that in the forum.
hkyriazi
Posts: 8
Joined: Thu Nov 17, 2011 6:32 pm

Re: Pre-Newbie questions

Post by hkyriazi »

I'm getting more comfortable working in Blender. Is using its bullet physics engine in any way inferior to using bullet physics in a stand-alone way, computationally or accuracy-wise?