iDevGames Forums
Bullet Physics Library / COLLADA physics viewer - Printable Version

+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Game Programming Fundamentals (/forum-7.html)
+--- Thread: Bullet Physics Library / COLLADA physics viewer (/thread-4057.html)



Bullet Physics Library / COLLADA physics viewer - erwincoumans - Jul 26, 2006 10:07 PM

The open source physics library Bullet is also available for MacOS X.
It includes a COLLADA Physics Viewer, that can import files generated with Maya (ColladaMaya), Max, XSI and Blender 2.42.

Download here: http://bullet.sourceforge.net

Thanks,
Erwin Coumans
(I just switched to Mac, and the Macbook Pro is great!)


Bullet Physics Library / COLLADA physics viewer - OneSadCookie - Jul 27, 2006 04:24 AM

Info about building a Universal Binary on the command-line: http://tips.onesadcookie.net/tips/published/Building+Autotooled+Projects+with+Xcode+SDKs

SConstruct to build a Universal Binary application with a proper application bundle: http://onesadcookie.com/svn/repos/Astro/SConstruct (obviously, the same ideas will work fine in a Makefile or whatever your build tool of choice is)


Bullet Physics Library / COLLADA physics viewer - aarku - Jul 27, 2006 03:59 PM

How's it compare to ODE and Newton? (PhysX and Havok too, if anyone can make a valid comparison...)

Cheers,
-Jon


Bullet Physics Library / COLLADA physics viewer - erwincoumans - Jul 27, 2006 05:10 PM

Quote:How's it compare to ODE and Newton? (PhysX and Havok too, if anyone can make a valid comparison...)

The biggest benefit is that it is open source, and it has better collision detection then OPCODE/ODE. It has continuous collision detection, and proper convex hull and cylinder support, so it should be an improvement. Also, it has COLLADA physics import, which enables tools like Maya, Max, XSI and Blender. Bullet's collision detection will be soon part of ODE, so both libraries will interoperate.

It's an open source library, so best not to compare against closed source or commercial solutions. I'm ex-Havok engineer, and worked on PhysX too (Playstation 3 port), and I can tell they are better optimized and have better support.

Erwin

PS: thanks for the Universal Binary links, I'll check them out.


Bullet Physics Library / COLLADA physics viewer - erwincoumans - Aug 11, 2006 12:21 AM

Bullet physics library has CMake support, which autogenerates Xcode projectfiles. This makes universal binary generation easier. See http://cmake.org , download cmake and run cmake -G Xcode .

Can someone verify this universal binary demo runs under PowerPC?

Download

Thanks,
Erwin


Bullet Physics Library / COLLADA physics viewer - Frank C. - Aug 11, 2006 02:33 AM

Works on my (aging) Dual 800Mhz G4. Looks good, but the simulation's a bit much for my comp to handle!


Bullet Physics Library / COLLADA physics viewer - erwincoumans - Aug 11, 2006 03:59 PM

Thanks for testing. Can you test this binary, which loads a quake bsp file, and let's you shoot boxes. It should work on little and big endian machines (it will print it in the console).

http://www.continuousphysics.com/ftp/pub/test/index.php?dir=physics/demos/&file=BspPhysicsDemoMacOSX_Universal.tgz

Thanks,
Erwin


Bullet Physics Library / COLLADA physics viewer - Fenris - Aug 11, 2006 04:15 PM

Crashes on startup, since it tries to allocate 3.4 gigabytes of RAM... Smile I'm intrigued by this, however, so I'd love it if you could produce a less hungry version. Wink


Bullet Physics Library / COLLADA physics viewer - erwincoumans - Aug 11, 2006 04:20 PM

We should be able to make it work together.
Do you have the console output? Can you copy/past it in a reply?

By the way, don't expect fancy rendering. It just loads the bsp, converts the static geometry into convex brushes, and then you can shoot boxes.

Thanks,
Erwin


Bullet Physics Library / COLLADA physics viewer - Malarkey - Aug 11, 2006 04:31 PM

This is the output that I get on my G5:

argc=1
argv[0]=/Users/vtagle/Downloads/Release/BSP_PHYSICS_DEMO
new name=/Users/vtagle/Downloads/Release/BSP_PHYSICS_DEMO.bsp
Machine is Little Endian
BSP_PHYSICS_DEMO(10061) malloc: *** vm_allocate(size=3623886848) failed (error code=3)
BSP_PHYSICS_DEMO(10061) malloc: *** error: can't allocate region
BSP_PHYSICS_DEMO(10061) malloc: *** set a breakpoint in szone_error to debug
terminate called after throwing an instance of 'std::bad_alloc'
what(): St9bad_alloc
Abort trap
logout


Bullet Physics Library / COLLADA physics viewer - erwincoumans - Aug 11, 2006 04:35 PM

>>Machine is Little Endian

Perhaps a bug in the endianess check. Is your G5 little or big endian? Is it a PPC?
Thanks,
Erwin


Bullet Physics Library / COLLADA physics viewer - Frank C. - Aug 11, 2006 04:44 PM

Same "Machine is Little Endian" problem here - definitely a endian bug.

G5's (and G4's and G3's) are big endian PPC.


Bullet Physics Library / COLLADA physics viewer - erwincoumans - Aug 11, 2006 04:46 PM

I fixed some issues related to endian-check.

Can you verify this new Universal Binary?
http://www.continuousphysics.com/ftp/pub/test/index.php?dir=physics/demos/&file=BspBulletPhysicsDemoMacOSX0.2.tgz


The compiler didn't complain about an undefined enum, which hopefully caused the problem.
Alternatively, please buy 3.4 gigabytes of RAM and let me know if that helps ;-)

Thanks,
Erwin


Bullet Physics Library / COLLADA physics viewer - ERaZer - Aug 11, 2006 06:16 PM

erwincoumans Wrote:I fixed some issues related to endian-check.

Can you verify this new Universal Binary?
http://www.continuousphysics.com/ftp/pub/test/index.php?dir=physics/demos/&file=BspBulletPhysicsDemoMacOSX0.2.tgz


The compiler didn't complain about an undefined enum, which hopefully caused the problem.
Alternatively, please buy 3.4 gigabytes of RAM and let me know if that helps ;-)

Thanks,
Erwin

Works for me (never tried the first version), but then again, I'm on a Intel Mac, so Little Endian for me...


Bullet Physics Library / COLLADA physics viewer - Fenris - Aug 12, 2006 12:59 AM

Works fine now! Smile Nifty stuff indeed.