Game Development Community

physics in T3D .. physx, bullet, ???

by TheGasMan · in Torque 3D Professional · 08/20/2010 (3:13 am) · 8 replies

Genuine question: (not meant to start an argument or flame session..I ask genuine questions)
Why do we have 2 partial Physics implementations instead of 1 that is mostly complete ?
[I appreciate them, I just wonder why it was done this way. Can we get a story on it ?]


//
Things I like half-baked:
brownies, muffins, beef roasts, souffles ..etc
:P

#1
08/20/2010 (4:02 am)
We (Sickhead) originally implemented PhysX for our own project and GG asked us to integrate it into Torque 3D. What we started with in T3D 1.0 was what we had implemented for our game project and were able to make general purpose enough to be useful.

In T3D 1.1 we abstracted things to support other physics APIs and make the system more flexible for future development.

Bullet was added mostly for Mac and iPhone. Unfortunately it turns out that Bullet has horrible performance compared to the same scene in PhysX (because it lacks a threaded solver), but luckily it wasn't so hard to get integrated. I think you'll hear more about physics on Mac/iPhone soon enough.

Physics like all other parts of Torque are an on going project... there are always improvements, enhancements, and new features to implement.
#2
08/20/2010 (4:21 am)
Thanks for sharing that Tom.
Afterall, ..knowing is half the battle. ;)
#3
08/20/2010 (1:07 pm)
Quote:
..knowing is half the battle
And blowing shit up with cool explosions is the other half!
#4
08/20/2010 (4:31 pm)
Quote:Unfortunately it turns out that Bullet has horrible performance compared to the same scene in PhysX (because it lacks a threaded solver)

Im not very familiar with Bullet at all but I thought I remembered their SDK having both a multi-threaded demo and mention of a threaded solver?
#5
08/21/2010 (12:37 am)
@Jason

When i last looked 6 months ago they had a partial solution.

They multithread the process of calculating collisions/contacts, but the simulation step and resolving those contacts is still done in the primary thread.

It seems like now they have some new experimental GPU stuff, but i haven't had time to test any of it.
#6
09/03/2010 (1:18 am)
but then why is the GMK implementation of bullet so fast?
I integrated the last GMK release (for 1.1 alpha1) into 1.1 beta2 and it performs very well.....
why the difference?

oh, just by the way, to anyone who knows, can I create physics prefabs? regardless of physics API?
#7
09/03/2010 (3:44 am)
@deepscratch

I don't know... the implementation is pretty much taken from one of their examples. Its probably made worse because we use 2 physics scenes to maintain the client-server split, but it seems like its alot more than just that.

If your using PhysicsShapes and not any Px based classes then yes... you can totally prefab physics objects and still switch APIs.
#8
09/03/2010 (5:38 pm)
mmm, good to know,
this opens up a whole new ball park.