BulletX port to Axiom


Moderator: Contrib Moderators

Passer-by

Posts: 2

Joined: Sun Dec 13, 2009 11:29 pm

Post Mon Dec 14, 2009 11:29 pm

Re: BulletX port to Axiom

Hey what's the progress on this? I'm currently using Newton. I'd love to be able to use a physics library geared directly towards Axiom (The less I have to code the better)

Regular

Posts: 31

Joined: Sat Mar 07, 2009 10:27 am

Post Sun Jan 10, 2010 9:16 pm

Re: BulletX port to Axiom

Hello.

How was this project going?
I'm very eager :-)

Veteran

Posts: 788

Joined: Wed Mar 22, 2006 8:06 pm

Post Mon Jan 11, 2010 9:15 am

Re: BulletX port to Axiom

Skatt, I'd be curious what your experience with BulletX was? The latest svn version I used didn't do at best, missed collisions, box shaped entities end-up standing on edges, well I could have some bugs in the code but merely switching to PhysX worked greatly.

No way want to take any inspirations away from you, but an opinion: doing a port means updating it with changes to the original, and BulletX looks like it deserves yet. But you could use BulletX right away if you'd use Axiom<->Xna conversion of math objects Matrix, Vector3, Quaternion and implement a BulletXPhysicsSceneManager (that derives from an existing one, e.g. the OctreeSceneManager) and handles a BulletXPhysicsSceneNode : OctreeSceneNode that cares for updating the underlying physics objects if there are any changes to its transforms. The BulletXPhysicsSceneManager would do the simulation step and peek results back to scene nodes, so both way data exchange should be ensured sufficiently. Then there don't need to be as many updates to project code, since you're more with the interface than the bug sensitive physics implementation.

Honestly, JigLibX prooved faster and simplier to use to me than BulletX, although less featured, however the demo they have is very nice imo, includes rigid body primitives, heightmap terrain and joints - you can drive a car on the terrain. Yet anoter choice could be PhysX, because it's blazigly fast and accurate compared to JigLibX/BulletX even without a HW acceleration and despite the 2 levels of wrapping it (e.g. Axiom->Xna->PhysX native). Unfortunately it's not pure C# and you basically can't use it on other than desktop platforms.

2c
User avatar

Veteran

Posts: 134

Joined: Fri Apr 17, 2009 7:38 am

Location: Finland

Post Sun Jan 24, 2010 5:40 am

Re: BulletX port to Axiom

Andris, Im interested that JigLibX but yet havent checked how it works with axiom, is it hard work to make it work? Are somewhere that already converted?
If I have time, i might try to get it work and upload it to axiomcontrib if needed..

Veteran

Posts: 788

Joined: Wed Mar 22, 2006 8:06 pm

Post Tue Jan 26, 2010 9:36 am

Re: BulletX port to Axiom

Migel, I don't think it's any difficult to get basic simulation running, that applies for both BulletX and JigLibX. Basically you have to initialize instance of some master object representing the physics world, add physics objects, do a simulation step each frame, retrieve new transforms of the simulated objects and apply them to scene nodes (the other direction should be there too, but is not essential in all cases). Both libraries have enough of easy examples on how to setup these things. Because they use Xna math structures in method signatures, you need to convert between Axiom and Xna when doing those calls, example convertors here, using C#3.0 extension methods could be more elegant, these things were mentioned above already.

But to stay too simple would be lame, because you will need more after a bit and I was thinking that a PhysicsSceneManager could care for all the setup and synchronisation, including use of physics materials and joints. Currently don't know whether and how to be inheriting to get the PhysicsSceneManager. You might but might not want physics an all the scene managers deriving from the abstract SceneManager (Default, Octree, Terrain, Bsp, PCZ..), but can derive only one type ofc.
Previous

Return to Add-Ons Project Talk

Who is online

Users browsing this forum: No registered users and 1 guest

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.