Platform Agnostic GPU Physics? Or... Ageia?

Started by
8 comments, last by erwincoumans 17 years, 3 months ago
Hey there, I'm finding difficulty finding information about hardware accelerated physics that is not complete marketing bullshit. My company is trying to build a massive networked physics simulation and we are interested in using special hardware to accelerate physics server-side (and possibly client side, in the future when nextgen hardware is prolific). We're a small shop and we don't want to support more than one hardware physics codepath. It looks to me that nVidia and ATI's physics acceleration efforts to date have been device-specific hacks that would not port from one vendor to another. It also seems that Ageia's PhysX cards don't have low-level physics drivers - you are locked in to using their physics engine (Novodex, I think). So it would seem that we are totally out of luck and there is actually no good way to do hardware physics yet. Is this the case? Is there any work being done on a HSLS analog for physics? Or is everyone just waiting for CPUs to have enough cores to make GPU/dedicated physics a ludicrous idea?

Shedletsky's Bits: A Blog | ROBLOX | Twitter
Time held me green and dying
Though I sang in my chains like the sea...

Advertisement
You've probably seen this website already, but here it is anyway: http://www.gpgpu.org/

They have a "forums" section, which is probably a better place to ask your question than gamedev.net.
IIRC, but physics done on a graphics card is usually eye-candy only (eg. massive particle simulations and the like) and so is pretty much useless on a server.

Ageia might make more sense, but as you say you're locked in to using their own engine. And while I don't know a huge amount about server hardware, I have a suspicion that a good set of servers would outperform PhysX easily (can you even get PhysX cards for server hardware?).
Just to follow up:

I asked and the concensus over at gpgpu.org was to either pony up for Havok, which maintains the three code paths (ATI, nVidia, CPU) for physics for you, pony up for PeakStream which is thus far vaporware, or forget about hardware accelerated physics for the time being.

Shedletsky's Bits: A Blog | ROBLOX | Twitter
Time held me green and dying
Though I sang in my chains like the sea...

If you're interested in increasing the server power then it seems odd to me that you'd want to do it by packing extra hardware into one machine - because that hardware is going to be specialised and hard to program, and there's a limit to the amount that you can connect anyway.

Surely you're better off working out how to connect multiple machines together over a LAN and get them working together as a (effectively) single server. This way is much more extensible.

I can see two ways of doing this:

One is to write a fundamentally networked physics engine - with a central core that can farm out packets of work to any number of machines (or threads or processors) and then collect/combine the results.

Another, almost certainly less efficient, but perhaps easier, method would be to split the domain into overlapping areas and run each area on a separate machine (or thread). Then have a separate application that coordinates them all - in particular handing off control of objects across boundaries. In theory there might be cases where you have objects influencing multiple simulations (through a kind of horizontal "stack", or big pile of objects), but in practice I expect this would be really rare, and perhaps not even noticible when it actually happens.
If you're only trying to do server-side physics accelleration for now, just use what works best for you. Yes, you'll be locked into a certain hardware platform to some extent, but its on the server side so you have complete control over the platform. It may cost you a small premium if cheaper solutions come out, but you won't have to worry about your code path being incompatible with your hardware.

On the client side, since you're not going to be implimenting physics acceleration until the supporting hardware is more wide-spread I wouldn't worry about it for now, and if neccesary, re-write your physics system to use the best platform in a few years when the picture should be more clear.


As for your server options, nVidea's 8x00 series and ATI's (AMD's now) R600 should both be monsters with regards to the level of programability they support. nVidea already has a driver which can be used to entirely bypass the Graphics API to get access to the hardware, so you write the code in fairly straight-up C, not the mess you would otherwise create to map your physics calculations onto the functionality that DirectX/OGL expose. ATI is supposed to have something similar in the works. Hardware wise, nvidea has 128 scalar FPUs, while ATI is rumored to have 64 4-wide SIMD units. If your calculations are well suited to vectorization and you're willing to write victorized algorithms, ATI might provide better performance if the rumors hold true.

Ageia's cards are pretty widely available and do have real-world performance benefits so they're worth considering as well. The API has been made free I believe so they're giving you a lot of work for no cost. I do wonder if their API will scale to multiple physX cards though, as you may want more physics processing Juice in your server.

Finally, depending on if you're intending to buy new server hardware or have relatively recent (core2duo, Xeon 53xx) hardware already you might want to just upgrade your servers to 4-Core CPUs and dedicate a core or two to physics. Since multi-core is the wave of the future, this is the surest-thing as far as continued future use is concerned, and will apply to consumer hardware as multi-core is adopted more broadly.


One last note: Microsoft is indeed working on a Physics component to eventually be included with DirectX, though its release is niether scheduled or confirmed publicly. We know they're working on it because they've posted Job listings and because it makes sense. Surely an open-source equivilant (ie: OpenPhysicsLibrary) will also be undertaken as a competitor some time in the future as well. Niether is here today, but I imagine at least one will come hand-in-hand with the widespread consumer addoption of physics-capable hardware.

throw table_exception("(? ???)? ? ???");

It sounds like you are looking for a hardware solution to implement your own proprietary engine. If this is the case then the answered you are getting will not lead you anywhere.
Havok does not have a networked solution for physics neither does Ageia.

There is a hardware solution you can try.
http://www.clearspeed.com/

It is not cheap because it is not a consumer card but it can produce 25 gfloats in double precision of sustained throughput, and you can connect many of them into an array.
It is priced at around $10000 depending on the options, but if you consider that a Havok license goes for over $100000, (not including gpu effects and extras), it is not that expensive is you already have your own software.
You can achieve top of the line (blue gene kind of performance) with few of them depending on how much you are willing to invest.

Other than that your only other solution would be a farm of xeons quad cores

[Edited by - jovani on January 12, 2007 9:27:22 PM]
Quote:Original post by jovani
It sounds like you are looking for a hardware solution to implement your own proprietary engine. If this is the case then the answered you are getting will not lead you anywhere.
Havok does not have a networked solution for physics neither does Ageia.


That has *nothing* to do with it. If you have the server side engine, and that is distributed over the network the way MMO servers are, the physics solution itself doesn't deal with the "distributed" aspect of the system.

Run an instance of said server on a machine, pop in whatever physics solution you want; viola! Done. Not to gloss over the details of implimentation to make it seem simple, but really what I'm saying is that you don't need to have distributed physics only a distributed server.

Now, the clearspeed cards are nice for many things, but the cost is prohibitive and its likely that they might even be overkill. Its no poin't putting a $10,000 card into a server that can handle 1000000 physics objects if the box's other resources can only handle 1000 players. It would be far more effective to slap a 8800GTX cards in for 1/16th the cost and adequate performance.

---

Also, I just checked the numbers and the 8800GTX, which is little more than 128 single-precision FPUs, can sustain 330gflops. Granted the clearspeed card is double-precision, but even allowing generous overhead the nVidia card has at least 5 times the potential throughput at 1/16th the price.

throw table_exception("(? ???)? ? ???");

Quote:Original post by Ravyne
Quote:Original post by jovani
It sounds like you are looking for a hardware solution to implement your own proprietary engine. If this is the case then the answered you are getting will not lead you anywhere.
Havok does not have a networked solution for physics neither does Ageia.


That has *nothing* to do with it. If you have the server side engine, and that is distributed over the network the way MMO servers are, the physics solution itself doesn't deal with the "distributed" aspect of the system.

I am sorry it did not know you had a similar problem in the pass and you solved that way.
However I stand by what I said, in my humble experience I had only seen physics in a networks game in the valve engine, which uses Havok the way you are saying.

My impression from Telamon was that the physics solution itself was going to be networked, which is not possible with any physics engine to my knowledge, so recommending Havok, Ageai, Nvidia, Ati, Gpu hardware, or any other not tested solution is just fiction.

Quote:Original post by Ravyne
Now, the clearspeed cards are nice for many things, but the cost is prohibitive and its likely that they might even be overkill. Its no poin't putting a $10,000 card into a server that can handle 1000000 physics objects if the box's other resources can only handle 1000 players. It would be far more effective to slap a 8800GTX cards in for 1/16th the cost and adequate performance.

---

Also, I just checked the numbers and the 8800GTX, which is little more than 128 single-precision FPUs, can sustain 330gflops. Granted the clearspeed card is double-precision, but even allowing generous overhead the nVidia card has at least 5 times the potential throughput at 1/16th the price.


Well there you go maybe the G8800 is better than Clearspeed and may become a consumer add on card for more general programming but it is not a real solution yet.
I was given a real and general hardware answer, I still do not know how a video card can be used for general physics programming other than cute particle effects demos with shaders.
But you are right maybe the new G8800 and the promised CUDA language will be a solution in future.
There is standardization work on the data side, COLLADA provides rigid body dynamics data. This helps tools/pipeline collaboration.

Apart from closed source engines, you can also consider use open source Open Dynamics Engine , Bullet physics engine , jiglib or other libraries as a starting point and optimize from there.

Bullet also has some start on GPU optimizations, although still premature.

See this link to GPU rigid body and fluids done on the NVidia 8800, it seems to allow much more general purpose physics on the GPU then previously possible.

Multi-core CPUs (Xenon, Cell etc) and GPUs are most promising to accelerate physics I think.
Erwin

This topic is closed to new replies.

Advertisement