Slashdot Mirror


Nvidia Physics Engine Almost Complete

Nvidia has stated that their translation of Ageia's physics engine to CUDA is almost complete. To showcase the capabilities of the new tech Nvidia ran a particle demonstration similar to Intel's Nehalem demo, at ten times the speed. "While Intel's Nehalem demo had 50,000-60,000 particles and ran at 15-20 fps (without a GPU), the particle demo on a GeForce 9800 card resulted in 300 fps. In the very likely event that Nvidia's next-gen parts (G100: GT100/200) will double their shader units, this number could top 600 fps, meaning that Nehalem at 2.53 GHz is lagging 20-40x behind 2006/2007/2008 high-end GPU hardware. However, you can't ignore the fact that Nehalem in fact can run physics."

49 of 179 comments (clear)

  1. It's just particles by Animats · · Score: 2, Interesting

    This is just a particle system. Smoke, snow, rain, and maybe water look better, but it apparently has no influence on gameplay.

    1. Re:It's just particles by Dr.+Eggman · · Score: 3, Funny

      Super-soakers Online! Cloth and liquid simulations determine who got wet, how wet, and whether or not that means they're out!

      --
      Demented But Determined.
    2. Re:It's just particles by Anonymous Coward · · Score: 2, Funny

      because if Portal taught us anything, its that modern games have no need for physics!

    3. Re:It's just particles by grahamd0 · · Score: 5, Funny

      EA Presents: Cancun Wet T-Shirt Contest 2K9!

    4. Re:It's just particles by Mastadex · · Score: 5, Funny

      With what is promised by this physics engine, you will be able to tell between all natural and fake boobs. Its all in the bounce!

      --
      A morning without coffee is like something without something else.
    5. Re:It's just particles by Anonymous Coward · · Score: 2, Funny

      Mod +6: This comment goes to 11.

    6. Re:It's just particles by CastrTroy · · Score: 2, Informative

      You obviously don't remember what it was like when 3D cards first came out. There were many games that were Glide only. Meaning that you had to have a 3DFX graphics card to run them. Back when sound cards first came out, this also happened. You had to have a sound blaster, or Adlib, or Gravis ultrasound, and again only certain cards would work with certain games, I imagine that physics cards could probably work in the same way. Require that you use a certain physics card, or you don't get to play the game. Eventually things will get standardized, and you will get to use any physics card for any game, but I don't think that it's necessary right from the start.

      --

      Anthropic principle: We see the universe the way it is because if it were different we would not be here to see it.
    7. Re:It's just particles by Dekker3D · · Score: 2, Interesting

      no.. multiplayer wet t-shirt deathmatch. ;)

    8. Re:It's just particles by Solder+Fumes · · Score: 5, Funny

      Slow motion

      (.)(.)

      (')(')

      (.)(.)

      Much faster

      (:)(:)

      So fast they're a blur

      (|){|)

  2. Duke! by wild_quinine · · Score: 5, Funny
    The best news about this is that it implies that if hardcore kit kills with it, then at least budget hardware (that many people have already!) can do it acceptably. That means finally seeing games that REQUIRE physics acceleration.

    It'll be like 1996 all over again, only from a physics not graphics perspective. That, and there might be a new Duke Nukem game due out within the next 12 years.

  3. I couldn't find anything specific - will nVidia... by mmell · · Score: 5, Interesting

    ...provide Linux drivers, or will the F/OSS community have to reverse-engineer this one?

  4. Is particle motion a fair test case? by DoofusOfDeath · · Score: 5, Informative

    Is a particle motion simulator a abnormally easy test case?

    When I was getting up to speed on IBM Cell programming, IBM had a programmer's tutorial (excellently written, btw). The example problem they used for their chapter(s?) on code tuning were a particle simulator. It was a wonderful example problem, because it showed how to vectorize a program. But then when we went to vectorize our own algorithm, it didn't fit the Cell's vector programming instructions nearly as cleanly, so in the end we didn't get nearly the performance increase due to vector instructions as did the particle simulator.

    So I'm thinking that just even though CUDA can do a good job with particle motion simulations, we shouldn't remotely assume that it's good for particular algorithms for which each of us is responsible.

    1. Re:Is particle motion a fair test case? by Anonymous Coward · · Score: 2, Interesting

      Yes, particle systems are easy (in terms of physics), because they are essentially just moving points with varying velocities and accelerations... Such a simulation is easy to vectorize (eg: update the position of all points in parallel by performing lots of additions at the same time).

      Actually useful collision detection of say, convex volumes with rotational velocities, with the volumes being stored in a 3D space partition (eg: kd-tree or BSP tree) will likely prove significantly more difficult to parallelize because of the big increase in algorithmic complexity.

    2. Re:Is particle motion a fair test case? by AcidPenguin9873 · · Score: 4, Interesting

      That's exactly why I'm skeptical of CUDA in general. Rendering graphics is one of those "embarrassingly parallel" operations, where for every frame rendered, each triangle, vertex, and pixel is independent of the others. I don't know much about physics processing, but I'm guessing it's the same. Simply throwing say, 4x more hardware at the problem gives you pretty much the ideal 4x speedup. Once you introduce random data dependencies into the problem, though, parallelization is much harder and you don't get the same speedups.

      There are a lot of easily-parallelizable problems out there, which is great...but then again, there are a lot of not-so-easily-parallelizable problems out there too. I don't think CUDA would do any better than a general-purpose CPU on the latter class of problems.

  5. Re:I couldn't find anything specific - will nVidia by karbonKid · · Score: 5, Informative

    http://www.nvidia.com/object/cuda_get.html offers: "NVIDIA Driver for Linux with CUDA Support (169.09)"

    So, physics should work on Linux, having been ported to CUDA already, and CUDA being cross-platform, but the question is if any Linux games will actually support and/or make use of it.

  6. So by Snuz · · Score: 3, Funny

    PC Gaming is dead . . . right?

    1. Re:So by Lord+Ender · · Score: 4, Informative

      NVDA is a chip maker. They make the best GPUs, period. Their chips are used in high-end PCs, but also in Sony's PS3.

      --
      A slashdotter who didn't build his own computer is like a Jedi who didn't build his own lightsaber.
  7. Experts please explain something by Handlarn · · Score: 5, Interesting

    Anyone care to explain why there's such a big difference between a GPU and a CPU? I keep hearing how GPU's are this and that much faster than a CPU at calculations like graphics, physics and such, so naturally I assume there's a big difference that makes us still chose the x86 and x64 CPUs as the main processors of a PC. What are the limitations; why can't just the libraries be ported for GPUs instead of CPUs and why don't we then just run all calculations on a GPU, if they are anything from 2 to 50 times faster?

    It just seems to me that if a graphics card can calculate physics then it would also be able to do pretty much all the same types of calculations that a regular CPU can do, but I am obviously missing a big part of it.

    Experts, continue! :)

    1. Re:Experts please explain something by Rafe_Aguilera · · Score: 2

      CPU's are general purpose processors that perform a lot of different functions. GPU's are highly specialized ASICs designed to do one or two things very, very quickly.

      CPU = Jack of all trades, master of none; GPU = the highly trained specialist.

    2. Re:Experts please explain something by caerwyn · · Score: 5, Informative

      Particle systems are about as perfectly a parallel problem as it's possible to get- and not only that, the calculations are generally very straightforward with few (if any) general CPU control structures (branches, loops, etc).

      As a result, the massively parallel hardware on a GPU that exists to render many triangles/pixels/shader programs/etc at once can be exploited to calculate updates for many particles at once. The CPU is at an inherent disadvantage because it is only leveraging a small subset of it's full capabilities.

      The CPU is very good at *lots* of different tasks. The GPU is phenomenally good at a very specific set of tasks. Physics just happens to fit within that set.

      --
      The ringing of the division bell has begun... -PF
    3. Re:Experts please explain something by cerelib · · Score: 4, Funny

      Wow, that has to be the worst car analogy I have ever read on Slasdot. Instead of comparing on specialization of hardware (minivan vs drag-racer might have been a winner), you went down some sort of bandwidth path. I don't even know what the "re-fuel", gas vs electric thing equates to.

    4. Re:Experts please explain something by cowscows · · Score: 5, Informative

      In its most basic definition, a GPU is just a CPU that's been highly specialized towards graphics. It can't do anything that a CPU can't also do, it just is able to do particular things much faster. Basically, they take a lot of the common tasks that graphics require of a processor, and they put really efficient ways to do it directly into the hardware, and they put a whole lot of them.

      Think of a CPU as a big tool box. There's something in there for every task, including a screwdriver that can be used to put screws into things. Then next to it, you have a big cordless 18 volt drill (The GPU). Way easier to drive screws with that than the manual screwdriver in your toolbox. But when you need to drive a nail instead, yeah you could bash it in with your screw gun, but it's easier to go back to your toolbox and find a hammer.

      I guess that would make a physics processor the nail gun. Or something...

      --

      One time I threw a brick at a duck.

    5. Re:Experts please explain something by ardor · · Score: 2, Informative

      A GPU excels at massively parallel tasks. Stuff like rendering, raytracing (yes! a GPU can raytrace!), DCTs, ... essentially, a GPU is a stream processor that maps a function (a shader) on independent entities (pixels, or vertices).
      Applying a complex formula millions of times, each time with a different set of coefficients? -> GPU.
      GPUs fail at tasks where lots of synchronization or frequent branching is necessary. Stuff like game logic, for instance, or state machines. Your typical office application is a good example.
      So, GPUs are processors that operate in a very limited area. But they excel there. This is a contrast to CPUs, which are a jack of all trades.

      --
      This sig does not contain any SCO code.
    6. Re:Experts please explain something by Space+cowboy · · Score: 2, Informative

      Simple reason:

      On my Mac Pro, I have 8 3GHz CPU's. Consider that the baseline.

      I have 2 8800GT cards to drive the 30" and 2x23" (rotated, one each side of the 30" :-) monitors. That gives me 224 1.5GHz stream processors in the GPU. Even harmonising GHz, thats 8 compared to 112, and its a lot easier to get a parallel algorithm running efficiently on a GPU than on multiple CPU's due to differing hardware designs...

      Now stream processors aren't quite the same as general purpose processors, but the way they're implemented these days, they can be programmed in high-level languages (see jon stokes' article) and if their architecture suits what you want, they can be very very quick. See here for info on programming them...

      Simon.

      --
      Physicists get Hadrons!
    7. Re:Experts please explain something by lnxpilot · · Score: 2

      Please check your facts.
      The Cell processor *can* do double-precision calculations.

    8. Re:Experts please explain something by hey! · · Score: 2, Funny

      Well, analogies are a left brain function, and left brains probably prefer to generate cdr analogies.

      --
      Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
  8. Why particle systems? by Thanshin · · Score: 5, Interesting

    They should test physics systems with spheres on irregular ground, with uneven μ (coefficient of kinetic friction), and changing wind.

    Those are the kind of problems that force programmers to use approximations when using a physics engine.

    The next step is really abstracting the physics from the development, not having pretty water.

    1. Re:Why particle systems? by Animats · · Score: 5, Interesting

      They should test physics systems with spheres on irregular ground, with uneven (coefficient of kinetic friction), and changing wind.

      I always liked to test on the hard cases (see my web site) but, in fact, what game developers and animators want is not realistic physics. The game people want "infinitely destructible environments", where you can blow up anything. And, of course, eye candy. The animation people want physics they can direct, where the starting and ending positions are specified but what happens in the middle might be automated. So most character motion in video games is spliced-together motion capture bits, hand animation, and a bit of physics now and then.

      Most game physics engines today cheat on the hard cases, but by now, they usually cheat in ways that don't do something blatantly nonphysical.

      My original goal, back in 1996 when I was working on this, was to get to a two-person fighting game with real martial arts. The physics engine we had was good enough, although in the era of 200MHz CPUs, a bit slow. But a control system that can do a judo throw against an uncooperative opponent is still out of reach. Worse, controlling a physically realistic martial arts character through a game pad is just hopeless. Play would be like a typical day at the dojo: "You lost your center. Your left foot should have been further forward when you tried that throw." "Yes, sensi". Work out three times a week for a year, and you get to be halfway decent. As a game, that sucks.

      So I created the "ragdoll falling downstairs" cliche as a demo, licensed the technology to a middleware provider, and went on to other things.

  9. Re:I couldn't find anything specific - will nVidia by wanerious · · Score: 4, Insightful

    Don't get me wrong, I am a HUGE fan of linux, I use it on all my computers. However, there is no point in releasing drivers for this in Linux because the only use would be physics accelerated games, which won't be ported to Linux anyway.

    The *only* use?? Geez, I'd like to get my hands on the API to write some physics educational/demonstration software. Or just create physically accurate simulations for kicks. We don't *have* to rely on others to write software for us.

  10. 640K RAM is enough for anybody, right? by mmell · · Score: 2, Insightful
    Just because you don't currently have a use for this, doesn't mean nobody ever will.

    That's okay - somebody else already posted the answer - this thing'll use an established mechanism (CUDA). I don't know what that is, but after this card hits the market, I'll probably start to find out.

  11. Oh really? by bconway · · Score: 4, Funny

    However, you can't ignore the fact that Nehalem in fact can run physics.

    In fact, I can.

    --
    Interested in open source engine management for your Subaru?
  12. Re:I couldn't find anything specific - will nVidia by dreamchaser · · Score: 4, Informative

    (sarcasm on)Yes, I am sure there are no scientific or enginnering applications for accellerated physics calculations (sarcasm off).

    Anyone ever tell you that a lot of scientific types use Linux on their workstations? They do.

  13. Real Physics engine goal by Anonymous Coward · · Score: 5, Funny

    I want to see 10^88 particles simulated at 10^33 frames / second.

    1. Re:Real Physics engine goal by Anonymous Coward · · Score: 3, Funny

      How do you know you're not?

    2. Re:Real Physics engine goal by Anonymous Coward · · Score: 2, Interesting

      He made rough guesses at how many "frames per second" actual time runs at and how many particles there are in the universe, then asked for a simulation of it. He's asking for a simulated copy of the universe. It's funny on a lot of levels: a) he could go outside and get the same thing; b) he has an unreasonable requirement for his physics engines; c) it's absurd because it's beyond calculation; d) it's absurd because the universe can't simulate itself (simulating every particle in the universe and its calculations would require more matter/energy than there is in the universe, and since the simulation would exist in the universe the simulation would have to simulate itself within the simulation, recursively).

      Of course, it WAS funny until it had to be explained.

  14. Comment removed by account_deleted · · Score: 5, Funny

    Comment removed based on user account deletion

  15. real physics? by goombah99 · · Score: 2, Interesting

    To what extend does this contain real physics as opposed to "game" physics. Cuda maps to linear algebra fairly well but most phyics is second order (either algebraically or as differential equations). Are they actually trying to implement those or are they just making things that "look right" but really don't obey physics.

    I recall that in the original Toy Story there is only one place they used "real physics". When the jump rope is thrown off the balcony (for the army men to descend), they used real physics to model it's tangled fall. But thye later sent it was not a good idea to use the real physics. Not only was it harder but it didn't really look right and could not be easily tweaked. So all the rest is pretend physics.

    --
    Some drink at the fountain of knowledge. Others just gargle.
    1. Re:real physics? by king-manic · · Score: 2, Interesting

      I recall that in the original Toy Story there is only one place they used "real physics". When the jump rope is thrown off the balcony (for the army men to descend), they used real physics to model it's tangled fall. But thye later sent it was not a good idea to use the real physics. Not only was it harder but it didn't really look right and could not be easily tweaked. So all the rest is pretend physics. What people perceive a situation to look like and how it would realistically look have drifted a lot. Due partially to the real life rarity of those situations and Hollywood/Video games distortion of it. We all expect shot guns to be massive overkill at medium to short ranges when in reality they don't hit that hard. We expect all explosions to involve flames. We expect bullets to hit with far more kinetic force then they do. We expect a whole lot of things that just don't happen in real life. It doesn't have a huge impact on most people but I'm sure it really urques the physics pedants.
      --
      "There are more things in heaven and earth, Horatio, than are dreamt of in your philosophy."
    2. Re:real physics? by interstellar_donkey · · Score: 3, Funny

      We expect bullets to hit with far more kinetic force then they do.

      What are you talking about? I was just playing this game the other day where I shot a guy in the chest with my 9mm several times. He hardly moved when I shot him, and it took like 20 shots to finally take him down.

      Just like real life.

      --
      The Internet is generally stupid
  16. FIrst you need a Windows version that won't crash. by mmell · · Score: 5, Funny

    Just sayin'. ;^)

  17. What about graphics? by Guspaz · · Score: 2, Interesting

    It's great that they can do all this physics stuff on the GPU, but they seem to be forgetting the other thing you need that for; graphics. Games like Crysis don't exactly leave room on the GPU to do anything but graphics, and throwing physics into the mix will only make things worse.

  18. Re:I couldn't find anything specific - will nVidia by bendodge · · Score: 2, Insightful

    Linux games? I guarantee you that many packages tagged "science" will use this in no time and games will be left to rot.

    --
    The government can't save you.
  19. Re:Sync between machines with different cards? by Mr+Z · · Score: 5, Informative

    Huh? The local physics computations are only being used for presentation and local extrapolation. The server recomputes the relevant physics anyway, and can re-sync everyone periodically. That's how FPSes work to reduce lag--they do local extrapolation, and the server periodically snaps everyone back in line. It sometimes leads to what John Carmack calls "paradoxes" where locally displayed events get undone, but it works.

    So, if some portion of your local physics calculation is purely for local presentation (e.g. game outcome doesn't depend on exactly how dirt particles fly around or boobs bounce, but you want it to look realistic), the server doesn't need to reproduce any of that to model the game correctly. Your screen might look different than someone else's, but in an immaterial way. For the super-soaker example, the server will still compute actual "wetness," possibly with a simplified model that skips computing the goosebumps and most of the dripping water.

    --Joe
  20. Using how much bandwidth? by tepples · · Score: 2, Informative

    The local physics computations are only being used for presentation and local extrapolation. The server recomputes the relevant physics anyway, and can re-sync everyone periodically. Using how much bandwidth per particle?

    For the super-soaker example, the server will still compute actual "wetness," possibly with a simplified model that skips computing the goosebumps and most of the dripping water. That's kind of what I meant by "use coarse particles for game logic and finer particles for iCandy."
  21. Re:300 fps ! by Z34107 · · Score: 2, Informative

    Wow ! That's more than 4 times faster than the human brain can detect. Now if I only knew why a frame rate this high is needed. Anybody?

    It's not needed. But it's useful for comparison.

    Nehalem only got x frames per second, but nVidia Magic Goodness 9800 Large Numbers GTX got y FPS, where y > x, can show that nVidia MG9600LNGTX > CPU.

    Also, presumably this won't be used to run 50,000 particle games at 300fps, but much more complicated simulations (infinitely destructable environments, not linear algebra) at 60fps.

    --
    DATABASE WOW WOW
  22. Re:I couldn't find anything specific - will nVidia by somersault · · Score: 5, Informative

    id seem to make all their games for Linux, and they also like using random accessories like that USB flak jacket thing that simulates you getting shot (by quickly puffing up pockets of air with pneumatic compressors). No doubt Quake 5 or whatever will support it at least.

    --
    which is totally what she said
  23. Spoiler by spruce · · Score: 2, Funny

    They're fake

  24. Couldn't agree more by Redbaran · · Score: 2, Informative

    I'm using CUDA for my masters project, and I've had the same problem that you describe. The way CUDA works, having a conditional statement that evaluates differently in each thread will kill your performance. It makes sense as to why:
    A GeForce 8800GTX has 16 multiprocessors, which each have 8 processors, so a total of 128 processors. It's your basic SIMD (single instruction, multiple data) architecture. So if you have lots of conditions, you go from having 128 processors, to having 16 as your code serializes because it has turned into MIMD.

    In my particular project, there have been times where I've tried to optimize something with an if statement, but it's not worth it for the reason described above. With that said, it's still much faster then doing computation on the CPU. I think the biggest problem to working with CUDA, at least for me, is that I've never worked with an SIMD architecture like it, so I don't know any really good techniques. I assume they're out there, but I haven't come across anything more then what they say in the CUDA programming guide, which is fairly minimal.

    I think CUDA is good for what it is designed to do, but you won't see a real time raytracer on it anytime soon even though the gflops are there.

  25. 640k particles are enough for everyone! by FlashBuster3000 · · Score: 2, Funny

    nuff said