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 4 Weeks Ago   #1 (permalink)
Console Gamer
 
CorporalAris's Avatar
 
intel nvidia

Join Date: Jun 2007
Location: Burnsville, MN, USA
Posts: 1,232

Rep: 46 CorporalAris is acknowledged by some
Unique Rep: 40
Trader Rating: 1
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.
__________________
Games Currently Playing: Team Fortress 2 (PC), Unreal Tournament III (PC), World of Warcraft (PC)[Burning Legion/Arïs]
Xbox 360 Fanboy. Get used to it.
4.0GHz = CPU-Z Verified
We are Gr33n Machine: GeForce 9600GSO
What is PhysX FAQ

ಠ_ಠOCN goes down so often, I'm beginning to chafe.

System: Current Specs
CPU
Intel E7200
Motherboard
Evga e-7150/630i
Memory
2x2GB DDR2 Corsair 800
Graphics Card
Evga 9600 GSO
Hard Drive
WD 7200 160GB SATA
Sound Card
Realtek Builtin
Power Supply
Coolermaster 600W
CPU cooling
Stock/SMART Fan
GPU cooling
Stock/100%
OS
Windows Vista Ultimate SP1
Monitor
19" Mag Flatscreen

Last edited by CorporalAris : 3 Weeks Ago at 11:47 PM.
CorporalAris is offline   Reply With Quote
Old 4 Weeks Ago   #2 (permalink)
PC Gamer
 
JTD92's Avatar
 
intel nvidia

Join Date: Sep 2006
Location: Portland, Oregon
Posts: 1,928

Rep: 138 JTD92 is acknowledged by manyJTD92 is acknowledged by many
Unique Rep: 116
Trader Rating: 12
Default

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


Quote:
BF2 in Ultra High audio quality plus your 5.1s, your neighbors will think Al Qeada just landed.

System: Gaming Rig
CPU
Intel Core 2 Duo E6400
Motherboard
Gigabyte GA-P965-DS3
Memory
2GB (2 x 1GB) G.Skill DDR2 800
Graphics Card
XFX 8800GS 384MB (G92)
Hard Drive
Western Digital Cavier 160GB
Sound Card
Sound Blaster Audigy 2 ZS
Power Supply
Antec Earthwatt 430W
Case
Cooler Master Centurion 5
CPU cooling
AC Freezer 7 Pro
GPU cooling
ZeroTherm GX810
OS
Windows XP Professional SP3
Monitor
Acer 22" Widescreen LCD
JTD92 is offline JTD92's Gallery   Reply With Quote
Old 4 Weeks Ago   #3 (permalink)
Console Gamer
 
CorporalAris's Avatar
 
intel nvidia

Join Date: Jun 2007
Location: Burnsville, MN, USA
Posts: 1,232

Rep: 46 CorporalAris is acknowledged by some
Unique Rep: 40
Trader Rating: 1
Default

I will. Either tonight or tomorrow. Thanks!
__________________
Games Currently Playing: Team Fortress 2 (PC), Unreal Tournament III (PC), World of Warcraft (PC)[Burning Legion/Arïs]
Xbox 360 Fanboy. Get used to it.
4.0GHz = CPU-Z Verified
We are Gr33n Machine: GeForce 9600GSO
What is PhysX FAQ

ಠ_ಠOCN goes down so often, I'm beginning to chafe.

System: Current Specs
CPU
Intel E7200
Motherboard
Evga e-7150/630i
Memory
2x2GB DDR2 Corsair 800
Graphics Card
Evga 9600 GSO
Hard Drive
WD 7200 160GB SATA
Sound Card
Realtek Builtin
Power Supply
Coolermaster 600W
CPU cooling
Stock/SMART Fan
GPU cooling
Stock/100%
OS
Windows Vista Ultimate SP1
Monitor
19" Mag Flatscreen
CorporalAris is offline   Reply With Quote
Old 4 Weeks Ago   #4 (permalink)
4.0 GHz
 
zaeric19's Avatar
 
intel nvidia

Join Date: Jun 2008
Location: Madison, WI
Posts: 326

Rep: 40 zaeric19 is acknowledged by some
Unique Rep: 37
Trader Rating: 0
Default

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

System: Archetype
CPU
4.0 GHz E8400 1.264v
Motherboard
Gigabyte GA-X38-DS4
Memory
2x2GB G.Skill PC2 8000
Graphics Card
eVGA 8800GTS(G92) 512MB
Hard Drive
Raptor X, 250&500GB Seagates
Sound Card
Onboard (optical)
Power Supply
FSP FX600-GLN
Case
Antec P182B
CPU cooling
Fuzion v2 > D5 > GTX360
GPU cooling
Stock @ 45%
OS
Windows XP x64
Monitor
22" WS Westy & 19" BenQ
zaeric19 is offline   Reply With Quote
Old 4 Weeks Ago   #5 (permalink)
Console Gamer
 
CorporalAris's Avatar
 
intel nvidia

Join Date: Jun 2007
Location: Burnsville, MN, USA
Posts: 1,232

Rep: 46 CorporalAris is acknowledged by some
Unique Rep: 40
Trader Rating: 1
Default

Ugh, thanks. I feel like sleeping now.
__________________
Games Currently Playing: Team Fortress 2 (PC), Unreal Tournament III (PC), World of Warcraft (PC)[Burning Legion/Arïs]
Xbox 360 Fanboy. Get used to it.
4.0GHz = CPU-Z Verified
We are Gr33n Machine: GeForce 9600GSO
What is PhysX FAQ

ಠ_ಠOCN goes down so often, I'm beginning to chafe.

System: Current Specs
CPU
Intel E7200
Motherboard
Evga e-7150/630i
Memory
2x2GB DDR2 Corsair 800
Graphics Card
Evga 9600 GSO
Hard Drive
WD 7200 160GB SATA
Sound Card
Realtek Builtin
Power Supply
Coolermaster 600W
CPU cooling
Stock/SMART Fan
GPU cooling
Stock/100%
OS
Windows Vista Ultimate SP1
Monitor
19" Mag Flatscreen
CorporalAris is offline   Reply With Quote
Old 3 Weeks Ago   #6 (permalink)
New to Overclock.net
 
intel nvidia

Join Date: Feb 2008
Posts: 224

Rep: 13 Lukeatluke Unknown
Unique Rep: 13
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!!!
Quote:
Originally Posted by Lukeatluka
Having new hardware is like first love; but when you mod, measure, picture it; than it's right by you, sitting closely, gentley pushing some air in your face, saying: I love you

System: My System
CPU
q6600@3.0 334*9
Motherboard
Asus P5Kc
Memory
OCZ GOLD PC6400 @ max. 922 Mhz
Graphics Card
Gainward 8800 GT(max. 821/2112)
Hard Drive
WesternDigital WD3200AAKS
Sound Card
7.1 Realtek
Power Supply
LCD 6550 Green solution
Case
Home made case :cool:
CPU cooling
Xigmatek HDT-s-1283
GPU cooling
dualslot cooler by Gainward
OS
Windows Vista ultimate 32bit
Monitor
LG L226 WT SF 22"
Lukeatluke is offline   Reply With Quote
Old 3 Weeks Ago   #7 (permalink)
Bioweapon
 
OmegaNemesis28's Avatar
 
intel nvidia

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

Rep: 303 OmegaNemesis28 is a proven memberOmegaNemesis28 is a proven memberOmegaNemesis28 is a proven memberOmegaNemesis28 is a proven member
Unique Rep: 196
Folding Team Rank: 254
Team Name: Nemesis
Hardware Reviews: 20
Trader Rating: 1
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
__________________

System: Nemesis Revived
CPU
Intel Q6700
Motherboard
EVGA 680i A1
Memory
4GB GSkill DDR2 1000
Graphics Card
2x EVGA GeForce 8800 GTX SLI
Hard Drive
4x 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
GPU cooling
2x Dtek Fuzions and Unisinks
OS
Windows XP Pro x32 & Vista Home Prem x64
Monitor
SAMSUNG 226BW Black 22" 2 ms (S Model)
OmegaNemesis28 is offline I fold for Overclock.net Overclocked Account OmegaNemesis28's Gallery   Reply With Quote
Old 3 Weeks Ago   #8 (permalink)
Console Gamer
 
CorporalAris's Avatar
 
intel nvidia

Join Date: Jun 2007
Location: Burnsville, MN, USA
Posts: 1,232

Rep: 46 CorporalAris is acknowledged by some
Unique Rep: 40
Trader Rating: 1
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.
__________________
Games Currently Playing: Team Fortress 2 (PC), Unreal Tournament III (PC), World of Warcraft (PC)[Burning Legion/Arïs]
Xbox 360 Fanboy. Get used to it.
4.0GHz = CPU-Z Verified
We are Gr33n Machine: GeForce 9600GSO
What is PhysX FAQ

ಠ_ಠOCN goes down so often, I'm beginning to chafe.

System: Current Specs
CPU
Intel E7200
Motherboard
Evga e-7150/630i
Memory
2x2GB DDR2 Corsair 800
Graphics Card
Evga 9600 GSO
Hard Drive
WD 7200 160GB SATA
Sound Card
Realtek Builtin
Power Supply
Coolermaster 600W
CPU cooling
Stock/SMART Fan
GPU cooling
Stock/100%
OS
Windows Vista Ultimate SP1
Monitor
19" Mag Flatscreen
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 02:09 AM.


Overclock.net is a Carbon Neutral Site Creative Commons License Internet Security By ControlScan

Terms of Service / Forum Rules | Privacy Policy | Advertising | Become an Official Vendor
Copyright © 2008 Shogun Interactive Development. Most rights reserved.
Page generated in 0.18077 seconds with 9 queries