Overclock.net - Overclocking.net
     
 
Home Gallery Reviews Blogs Register Today's Posts Mark Forums Read Members List


Go Back   Overclock.net - Overclocking.net > Software, Programming and Coding > Other Software

Reply
 
LinkBack Thread Tools
Old 08-08-08   #1 (permalink)
4.0 GHz
 
CorporalAris's Avatar
 
intel nvidia

Join Date: Jun 2007
Location: Burnsville, MN, USA
Posts: 2,250

Rep: 101 CorporalAris is acknowledged by manyCorporalAris is acknowledged by many
Unique Rep: 88
Trader Rating: 6
Default PhysX FAQ

Welcome! This is my first FAQ ever, just F.Y.I. And I overdid it. I spent several hours writing this...

The main reason I am writing this FAQ is because I think that people are a little confused about what PhysX is, what it can do, and why I think it works better on GPU's than on CPU's.


Everything you wanted to know about
PhysX
by NVIDIA

Things covered in this FAQ:
  • What is PhysX?
  • What is calculated by PhysX?
  • How does a CPU process physics?
  • How does a PPU process physics?
  • How does a GPU process physics?
  • Why are GPU's better than CPU's for physics?
What is PhysX

PhysX was originally the product of Ageia, a company based in California, which was founded in 2002. PhysX was originally designed to be a hardware physics solution. Specifically, it was sold on a PCI or PCI-E 1x style card, called a Physics Processing Unit, or PPU. It was designed to offload the physics calculations from the main Central Processing Unit, allowing the CPU to focus on other things, resulting in a higher framerate in video games. Also, since the PPU was dedicated to handling physics calculations, physics based effects became more accurate and often had more physics based objects flying about. The Ageia PPU was a large parallel processor, similar to a Graphics Processing Unit, or GPU.

I personally like this quote very much, from nVidia.com:

Quote:
What is physics for gaming and why is it important?
Physics is the next big thing in gaming. It's all about how objects in your game move, interact, and react to the environment around them. Without physics in many of today's games, objects just don't seem to act the way you'd want or expect them to in real life. Currently, most of the action is limited to pre-scripted or ‘canned' animations triggered by in-game events like a gun shot striking a wall. Even the most powerful weapons can leave little more than a smudge on the thinnest of walls; and every opponent you take out, falls in the same pre-determined fashion. Players are left with a game that looks fine, but is missing the sense of realism necessary to make the experience truly immersive.

Physics is becoming a more and more important part of video games lately. New technologies, such as Digital Molecular Matter, or DMM, and Endorphin Real-Time animation, all need extensive use of physics engines. There are hundreds of uses for physics in games, but lets cover a few of them.


When something in a video game explodes, you usually see several things happening. You see sparks, gibs (parts of the original model), flames, bodies, dust, etc ALL go flying in different directions. The physics software must calculate the velocity, mass, shape, hitbox, and type of EACH gib you see flying. So if a door flies off a vehicle, the physics engine has to calculate every single movement for each Frame Per Second, or FPS.


Sparks, or particle effects, each have to be calculated for velocity, distance, and type.


Volumetric Smoke or Clouds or Dust have to be calculated for speed, density, wind, nearby force, etc. You can already see things adding up here. You have millions of calculations going on for each little thing to make it look realistic.


When Ragdolls are calculated, each bone in the body is connected by a joint, which has resistance. The bone can't pass through other bones, and it can't pass through physical walls. But you don't want the body to go completely limp. He has to have motion, perhaps the direction of his last damage.

I could simply go on and on, but the thing is, physics are an extremely important part of video games. Just imagine Half-Life 2 with out physics! Each and everyone of these things is calculated at nearly the same time.

How does a CPU process physics?

To start this, I need to explain how CPU's process's. I'll be basic, because this is a little confusing, even to me. Essentially, all CPU's work like so. An instruction is given from memory, or input, the instruction is decoded, the instruction is executed, and then the result is placed back into memory, or output. The exact keywords are: fetch, decode, execute, and writeback.

Now, since EVERYTHING that happens on a computer is sent through a processor, EVERYTHING MUST DO THIS. Per processor core, ONE instruction can be processed at a time, so all other instructions must wait their turn, depending on their priority. This is called, I believe, In Order Execution.

We just covered how many calculations go on per second, and we know that a LOT of them happen in a second. Each single one of those calculations must wait it's turn in line, until it can be processed. Now, the reason that any of these calculations happens at a reasonable amount of time is because the CPU can do each of the calculations extremely fast.

For instance, a single core of my Intel e7200 Duo Core processor can run at 2.6 GHz. That measurement, Hertz, means Cycles per Second. So, my 2.6 GHz core can make 2.6 BILLION calculations. Now, I know that this isn't entirely true, because Clock Rate alone doesn't make a processor. But for the sake of keeping it simple, let's pretend it does.

Another thing that affects processing speed is how many floating-point calculations can be made. I am not even going to try and understand this, because this is beyond me. But I will try to give the basics of how it works. Here is a quote from Wikipedia.org:

Quote:
In computing, floating point describes a system for numerical representation in which a string of digits (or bits) represents a real number.
So, essentially, it is a type of calculation that can be done quickly. A processor can handle a specific amount of these calculations per second.

One of my main complaints of CPU physics is that in some games, if too many physics calculations are needed suddenly, your gameplay FPS can drop substantially. Since the CPU is clogged with physics calculations, the GPU has to wait on data, your network has to wait on data, and the entire game just slows down.

So physics on a processor isn't bad. Righto? It can be done, and it can be done well. But since more and more things are becoming calculated by physics, and more is going on in a CPU than simply your video game, it's not the best solution.

How does a PPU process physics?

A PPU, once again, essentially offloads all those calculations to a separate processor, freeing up the CPU. The PPU calculates all these physics, their constraints, etc, and feeds the answers to the CPU. And since you just took all those millions of calculations elsewhere, the CPU can now easily throw a bunch of rocks around and not have to worry about it.

Now, another advantage of the Ageia PPU is that it has a very high floating-point, so it can do many of these "quick" calculations per second.

Next, the PPU also does something called Parallel Computing. It can perform many calculations at the same time, by splitting large calculations into smaller ones, and solving them simultaneously. From nVidia's PhysX FAQ page:

Quote:
The multithreaded PhysX engine (originally from AGEIA) was designed specifically for hardware acceleration in massively parallel environments. [The] AGEIA's PhysX processor had tens of cores.
Yeah, tens of cores. These large calculations were split down into tens of smaller ones, then solved together at the same time. This allowed the PPU to make more of these similar calculations faster than a CPU.

I know that there are other advantages to using a PPU, but quite simply, I have spent over 4 hours researching, learning, and writing this, so I'm not going to go deeper in the multi-threading, or whatever.

How does a GPU process physics?/Why is it better than the CPU?

First off, I think that GPU's aren't the best solution to solve this problem with CPU physics. I believe that solution was the Ageia PPU, but it had problems. It wasn't well advertised, it was expensive, and it was only used in a few games. And then there is this problem with people who don't want to buy new things, or things that can't be easily explained to them. So that's gone.

However, the GPU is still a much better place for physics calculations to take place. It has all the things that made the PPU a good thing, such as a highly parallel architecture, many cores, multi threading, high floating points, etc. Plus, they are already very popular among low-end gamers, all the way up to high-end gamers.

From nVidia.com:

Quote:
NVIDIA's GPUs, have as many as 128 cores today, so they are well-suited to take advantage of PhysX software. More importantly, the GPU architecture is a more natural fit than a CPU because of the highly parallel and interactive nature of game physics.
Plus, since the GPU is very much mass-produced, the prices are much lower than the PPU.

To end this lengthily FAQ, I hope you all have a better understanding on What PhysX is, Why it is better on a GPU, and that maybe you learned something. Please help me with this FAQ by pointing out spelling or grammar mistakes, pointing out informational mistakes, or adding to it. Also, if SOMEONE can easily explain multi-threading or floating-point, that would be awesome.

THANKS FOR READING! EXPECT SOME MORE STUPIDLY LONG FAQ'S FROM ME IN THE FUTURE!

___

Some sources:
http://en.wikipedia.org/wiki/Parallel_Computing
http://www.nvidia.com/page/home.html
http://www.nvidia.com/object/nvidia_physx.html
http://en.wikipedia.org/wiki/PhysX
http://en.wikipedia.org/wiki/Graphics_processing_unit
http://www.nvidia.com/object/io_1202161567170.html
http://en.wikipedia.org/wiki/Clock_rate
http://en.wikipedia.org/wiki/Physics_processing_unit
http://en.wikipedia.org/wiki/Floating_point
http://appft1.uspto.gov/netacgi/nph-...her+AND+bordes


PS: Games that use PhysX

Quote:
The following games feature PhysX hardware support:[6]

* 2 Days to Vegas
* Adrenalin 2: Rush Hour
* Age of Empires III
* Age of Empires III: The WarChiefs
* Alpha Prime
* Auto Assault
* Backbreaker
* B.A.S.E. Jumping
* Bet on Soldier: Blackout Saigon
* Bet on Soldier: Blood of Sahara
* Bet on Soldier: Blood Sport
* Beowulf: The Game
* Bladestorm: The Hundred Years' War
* Captain Blood
* Cellfactor: Combat Training
* Cellfactor: Revolution
* City of Villains
* Crazy Machines 2
* Cryostasis: Sleep of Reason
* Dark Physics
* Desert Diner
* Dragonshard
* Dusk 12
* Empire Above All
* Empire Earth III
* Entropia Universe
* Fallen Earth
* Fury
* Gears Of War
* Gluk'Oza: Action
* GooBall
* Gothic 3
* Gunship Apocalypse
* Heavy Rain
* Hero's Journey
* Hour of Victory
* Huxley (video game)
* Infernal
* Inhabited island: Prisoner of Power
* Joint Task Force
* KumaWAR
* Magic ball 3



* Mass Effect
* Medal of Honor: Airborne
* Metro 2033
* Mobile Suit Gundam: Crossfire
* Monster Madness: Battle for Suburbia
* Monster Truck Maniax
* Myst Online: Uru Live
* Open Fire
* Paragraph 78
* Pirates of the Burning Sea
* PT Boats: Knights of the Sea
* Rail Simulator
* Red Steel
* Rise Of Nations: Rise Of Legends
* Robert Ludlum's The Bourne Conspiracy
* Roboblitz
* Sacred 2
* Sherlock Holmes: The Awakened
* Showdown: Scorpion
* Silverfall
* Sovereign Symphony
* Sonic and the Secret Rings
* Speedball 2
* Stoked Rider: Alaska Alien
* Switchball
* Tension
* The Hunt
* The Stalin Subway
* Tom Clancy's Ghost Recon Advanced Warfighter
* Tom Clancy's Ghost Recon Advanced Warfighter 2
* Tom Clancy's Rainbow Six Vegas
* Tom Clancy's Splinter Cell: Double Agent
* Tortuga: Two Treasures
* Two Worlds
* Ultra Tubes
* Unreal Tournament 3
* Unreal Tournament 3: Extreme Physics Mod
* Warfare
* Warmonger: Operation Downtown Destruction
* W.E.L.L. Online
* Winterheart's Guild
* WorldShift

Many more titles also use the PhysX SDK, but not all include support for PhysX hardware but instead use Nvidia based GPU's.
__________________
Xbox 360 | EVGA Fanboy.
Team Fortress 2 INCREASED Graphics Config | 4.0GHz = CPU-Z Verified
We are Gr33n Machine: EVGA GTX 260 Core 216 / Galaxy 8400GS
What is PhysX FAQ
I am 61% addicted to Counterstrike. What about you?

System: Current Specs
CPU
Intel E7200 @ 3.8GHz 1.34v
Motherboard
Evga 680i SLi BLACK
Memory
8GB DDR2 Corsair XMS2
Graphics Card
EVGA GTX260/216
Hard Drive
120GB Seagate + 500GB Western Digital
Power Supply
Coolermaster 600W
CPU cooling
Xigmatek Nepartak
GPU cooling
Stock
OS
Windows 7 7100 x64
Monitor
22" Samsung

Last edited by CorporalAris : 08-14-08 at 12:47 AM
CorporalAris is offline   Reply With Quote
Old 08-08-08   #2 (permalink)
PC Gamer
 
JTD92's Avatar
 
intel nvidia

Join Date: Sep 2006
Location: PDX
Posts: 4,048

Rep: 380 JTD92 is a proven memberJTD92 is a proven memberJTD92 is a proven memberJTD92 is a proven member
Unique Rep: 306
Hardware Reviews: 1
Trader Rating: 17
Default

Nice write up. I suggest you make a 8800GS/9600GSO Info thread. Rep+

System: Gaming Rig
CPU
Intel Core 2 Duo E6400 @ 3.2Ghz
Motherboard
Gigabyte GA-P965-DS3
Memory
4GB (4 x 1GB) G.Skill DDR2 800
Graphics Card
XFX 8800GS 384MB (G92)
Hard Drive
Western Digital Caviar 160GB
Sound Card
X-Fi XtremeMusic
Power Supply
Antec Earthwatt 430W
Case
Cooler Master Centurion 5
CPU cooling
AC Freezer 7 Pro
GPU cooling
Zerotherm GX810
OS
Windows 7 Ultimate RC / Windows XP Professiona SP3
Monitor
Acer 22" Widescreen LCD
JTD92 is offline Overclocked Account JTD92's Gallery   Reply With Quote
Old 08-08-08   #3 (permalink)
4.0 GHz
 
CorporalAris's Avatar
 
intel nvidia

Join Date: Jun 2007
Location: Burnsville, MN, USA
Posts: 2,250

Rep: 101 CorporalAris is acknowledged by manyCorporalAris is acknowledged by many
Unique Rep: 88
Trader Rating: 6
Default

I will. Either tonight or tomorrow. Thanks!
__________________
Xbox 360 | EVGA Fanboy.
Team Fortress 2 INCREASED Graphics Config | 4.0GHz = CPU-Z Verified
We are Gr33n Machine: EVGA GTX 260 Core 216 / Galaxy 8400GS
What is PhysX FAQ
I am 61% addicted to Counterstrike. What about you?

System: Current Specs
CPU
Intel E7200 @ 3.8GHz 1.34v
Motherboard
Evga 680i SLi BLACK
Memory
8GB DDR2 Corsair XMS2
Graphics Card
EVGA GTX260/216
Hard Drive
120GB Seagate + 500GB Western Digital
Power Supply
Coolermaster 600W
CPU cooling
Xigmatek Nepartak
GPU cooling
Stock
OS
Windows 7 7100 x64
Monitor
22" Samsung
CorporalAris is offline   Reply With Quote
Old 08-08-08   #4 (permalink)
4.0 GHz
 
zaeric19's Avatar
 
intel ati

Join Date: Jun 2008
Location: Milwaukee, WI
Posts: 732

Rep: 103 zaeric19 is acknowledged by manyzaeric19 is acknowledged by many
Unique Rep: 90
Trader Rating: 2
Default

Wow, very informative, +rep for putting this together.

System: Archetype
CPU
C0 E8400 @ 500x8
Motherboard
Gigabyte GA-X38-DS4
Memory
2x2GB GSkill PC2-8000
Graphics Card
HD5770 @ 960/1290
Hard Drive
Raptor X, 640gb AAKS, 1TB GP
Sound Card
HT Omega Striker 7.1
Power Supply
Corsair 750 TX
Case
Lian Li A05N
CPU cooling
Fuzion v2
GPU cooling
Stock
OS
Windows 7 x64 Home
Monitor
24" Acer 1920x1080
zaeric19 is offline   Reply With Quote
Old 08-08-08   #5 (permalink)
4.0 GHz
 
CorporalAris's Avatar
 
intel nvidia

Join Date: Jun 2007
Location: Burnsville, MN, USA
Posts: 2,250

Rep: 101 CorporalAris is acknowledged by manyCorporalAris is acknowledged by many
Unique Rep: 88
Trader Rating: 6
Default

Ugh, thanks. I feel like sleeping now.
__________________
Xbox 360 | EVGA Fanboy.
Team Fortress 2 INCREASED Graphics Config | 4.0GHz = CPU-Z Verified
We are Gr33n Machine: EVGA GTX 260 Core 216 / Galaxy 8400GS
What is PhysX FAQ
I am 61% addicted to Counterstrike. What about you?

System: Current Specs
CPU
Intel E7200 @ 3.8GHz 1.34v
Motherboard
Evga 680i SLi BLACK
Memory
8GB DDR2 Corsair XMS2
Graphics Card
EVGA GTX260/216
Hard Drive
120GB Seagate + 500GB Western Digital
Power Supply
Coolermaster 600W
CPU cooling
Xigmatek Nepartak
GPU cooling
Stock
OS
Windows 7 7100 x64
Monitor
22" Samsung
CorporalAris is offline   Reply With Quote
Old 08-13-08   #6 (permalink)
Audiophile
 
Lukeatluke's Avatar
 
intel nvidia

Join Date: Feb 2008
Posts: 1,063

Rep: 81 Lukeatluke is acknowledged by some
Unique Rep: 71
Trader Rating: 0
Default

Thanks for info and nice FAQ.

Rep++ for curiosity and time spend on writting this.
__________________
Quote:
Originally Posted by Takendown2;
NO SYSTEM IS EVER GOING TO BE FUTURE PROOF!!!


PM me my English mistakes anytime.

System: Lovier
CPU
q66 ł 3Ghz § [1.19V]
Motherboard
Asus P5Qe zero Vdroop<3
Memory
TGextreem2x2GB@1066
Graphics Card
88hundret GT
Sound Card
7.1 Realtek
Power Supply
Corsair TX750
Case
cm'Six90
CPU cooling
Xigmatek HDT-s-1283bolt thru
GPU cooling
dualslot
OS
Vista x64
Monitor
Samsung 2493hm
Lukeatluke is offline   Reply With Quote
Old 08-13-08   #7 (permalink)
Bioweapon
 
OmegaNemesis28's Avatar
 
intel ati

Join Date: Aug 2007
Location: NY
Posts: 18,800
Blog Entries: 18

Rep: 966 OmegaNemesis28 is becoming famousOmegaNemesis28 is becoming famousOmegaNemesis28 is becoming famousOmegaNemesis28 is becoming famousOmegaNemesis28 is becoming famousOmegaNemesis28 is becoming famousOmegaNemesis28 is becoming famousOmegaNemesis28 is becoming famous
Unique Rep: 533
Folding Team Rank: 471
Team Name: Nemesis
Hardware Reviews: 22
Trader Rating: 8
Default

Nice thread. + rep

Btw, what is weird is that............ there are pictures of Halo, Crysis, and Counter-Strike Source yet they aren't PhysX based. They show off physics but not PhysX
__________________


July MOTM - Vote Now!
Resident Evil 5 Gameplay and Cutscenes
[Project] Ω Reestablished / [Project]Nemesis i7 Revival
"A new Genesis is at hand, and I shall be its creator!"~Albert Wesker
"The best case mods are never finished, but in a perpetual state of evolution."~Flux



System: Nemesis i7 Revival
CPU
Intel Xeon W3520 i7
Motherboard
EVGA X58 Classified
Memory
GSkill 6GB DDR3 Pi
Graphics Card
Visiontek 4870 X2
Hard Drive
2x 1TB, 2x 250GB
Sound Card
Azuntech X-Fi Prelude Modded
Power Supply
SilverStone Strider 1000w Modular Power Supply
Case
Lian Li V2000 Plus
CPU cooling
Dtek Fuzion v1
OS
Windows 7 Ultimate 64x
Monitor
SAMSUNG 32" 550 TV
Overclock.net - 2009 Chimp Challenge Champions
OmegaNemesis28 is offline I fold for Overclock.net Overclocked Account OmegaNemesis28's Gallery   Reply With Quote
Old 08-14-08   #8 (permalink)
4.0 GHz
 
CorporalAris's Avatar
 
intel nvidia

Join Date: Jun 2007
Location: Burnsville, MN, USA
Posts: 2,250

Rep: 101 CorporalAris is acknowledged by manyCorporalAris is acknowledged by many
Unique Rep: 88
Trader Rating: 6
Default

I know, I realized that after I posted it. I need to go and change it. It was supposed to be show the effects that I was talking about, but it doesn't quite work right.
__________________
Xbox 360 | EVGA Fanboy.
Team Fortress 2 INCREASED Graphics Config | 4.0GHz = CPU-Z Verified
We are Gr33n Machine: EVGA GTX 260 Core 216 / Galaxy 8400GS
What is PhysX FAQ
I am 61% addicted to Counterstrike. What about you?

System: Current Specs
CPU
Intel E7200 @ 3.8GHz 1.34v
Motherboard
Evga 680i SLi BLACK
Memory
8GB DDR2 Corsair XMS2
Graphics Card
EVGA GTX260/216
Hard Drive
120GB Seagate + 500GB Western Digital
Power Supply
Coolermaster 600W
CPU cooling
Xigmatek Nepartak
GPU cooling
Stock
OS
Windows 7 7100 x64
Monitor
22" Samsung
CorporalAris is offline   Reply With Quote
Old 11-30-08   #9 (permalink)
PC Gamer
 
benfica101's Avatar
 
intel nvidia

Join Date: Oct 2007
Location: Australia Nsw
Posts: 859

Rep: 20 benfica101 is acknowledged by some
Unique Rep: 20
Trader Rating: 0
Default

Nice FAQ ive always wanted to know about Phys-x ever since the Ageia card came out, wanted to know what it did, since i didnt know i never bought it manly cause it was $200, but yeah nice man +REP
__________________
3dmark 06 20,182
Furmark: 7246 score
3dmark Vantage P15,369
Windows Vista Exp: 5.8
System Upgrade 2011

System: My System
CPU
Intel E8400 4.0Ghz 1.41v
Motherboard
NVIDIA XFX 780i Motherboard
Memory
Corsair Dominator PC-8500 (2x2GB) 4GB@ 1100
Graphics Card
NVIDIA Leadtek 9800GTX+ SLI +
Hard Drive
Seagate Barracuda 500GB (7200.12)
Sound Card
Onboard Audio
Power Supply
Silverstone ST1000w
Case
Lian-Li PC-7FW
CPU cooling
Cool-It Domino A.L.C Scythe 1600RPM Fan
GPU cooling
2 Arctic Cooling Accelero Twin Turbo
OS
Windows 7 32-Bit
Monitor
ASUS VK222U 22'' HDMI 1680x1050
benfica101 is offline   Reply With Quote
Old 11-30-08   #10 (permalink)
4.0 GHz
 
CorporalAris's Avatar
 
intel nvidia

Join Date: Jun 2007
Location: Burnsville, MN, USA
Posts: 2,250

Rep: 101 CorporalAris is acknowledged by manyCorporalAris is acknowledged by many
Unique Rep: 88
Trader Rating: 6
Default

Cool, thanks for reading!
__________________
Xbox 360 | EVGA Fanboy.
Team Fortress 2 INCREASED Graphics Config | 4.0GHz = CPU-Z Verified
We are Gr33n Machine: EVGA GTX 260 Core 216 / Galaxy 8400GS
What is PhysX FAQ
I am 61% addicted to Counterstrike. What about you?

System: Current Specs
CPU
Intel E7200 @ 3.8GHz 1.34v
Motherboard
Evga 680i SLi BLACK
Memory
8GB DDR2 Corsair XMS2
Graphics Card
EVGA GTX260/216
Hard Drive
120GB Seagate + 500GB Western Digital
Power Supply
Coolermaster 600W
CPU cooling
Xigmatek Nepartak
GPU cooling
Stock
OS
Windows 7 7100 x64
Monitor
22" Samsung
CorporalAris is offline   Reply With Quote
Reply

Tags
ageia, nvidia, physics, physx, ppu


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools



All times are GMT -4. The time now is 04:30 AM.


Overclock.net is a Carbon Neutral Site Creative Commons License

Terms of Service / Forum Rules | Privacy Policy | DMCA Info | Advertising | Become an Official Vendor
Copyright © 2009 Shogun Interactive Development. Most rights reserved.
Page generated in 0.19105 seconds with 8 queries