Presentation is loading. Please wait.

Presentation is loading. Please wait.

Havok. ©Copyright 2006 Havok.com (or its licensors). All Rights Reserved. HavokFX Next Gen Physics on ATI GPUs Andrew Bowell – Senior Engineer Peter Kipfer.

Similar presentations


Presentation on theme: "Havok. ©Copyright 2006 Havok.com (or its licensors). All Rights Reserved. HavokFX Next Gen Physics on ATI GPUs Andrew Bowell – Senior Engineer Peter Kipfer."— Presentation transcript:

1 Havok. ©Copyright 2006 Havok.com (or its licensors). All Rights Reserved. HavokFX Next Gen Physics on ATI GPUs Andrew Bowell – Senior Engineer Peter Kipfer – Senior Engineer

2 Havok. ©Copyright 2006 Havok.com (or its licensors). All Rights Reserved. Why use physics in games? A brief history of the Havok SDK Havok 1 Large feature set; rigid bodies, cloth, rope, soft bodies, water, particles Havok 2 Rigid body physics for the PS2 generation Havok 3 Ultra realistic physics Havok 4 Next-gen physics

3 Havok. ©Copyright 2006 Havok.com (or its licensors). All Rights Reserved. What is “next gen” physics? Gameplay physics Fx physics Performance Quality Customization Controllability

4 Havok. ©Copyright 2006 Havok.com (or its licensors). All Rights Reserved. What is FX physics? Physics based effects on a massive scale 1,000s to 10,000s of objects –Rigid bodies –Particles –Fluids –Cloth –and more to come Running on PC and consoles (Xbox 360, PS3)

5 Havok. ©Copyright 2006 Havok.com (or its licensors). All Rights Reserved. Why use the GPU? The GPU is a next-gen platform –Can be thought of as a 1000 multiprocessor machine It is unbelievably fast when given the right task –Rendering, for example Huge existing install base of graphics cards capable of running GPU physics

6 Havok. ©Copyright 2006 Havok.com (or its licensors). All Rights Reserved. Havok and ATI Strong partnership Working specifically on HavokFX in the run up to its showcase on ATI at Computex 2006 Best Innovation – Computex 2006 [Hexus]

7 Havok. ©Copyright 2006 Havok.com (or its licensors). All Rights Reserved. How does the GPU work? GPUs are very powerful data parallel processors –1000 simultaneous threads –Very high memory bandwidth –1 cycle latency per instruction –Can execute up to 4 instructions per cycle ATI X1900 XTX –48 pixel processors –Over 350 GFLOPS Issues –Normally only up to 16 float outputs in SM3.0 –Limited inputs too

8 Havok. ©Copyright 2006 Havok.com (or its licensors). All Rights Reserved. Demo Set 1

9 Havok. ©Copyright 2006 Havok.com (or its licensors). All Rights Reserved. Demo (start small) –Teapots (400) Simulating with ATI optimized lib Mouse pick – can interact with sim, data in/out –Small boulders (2000) Lots more, can still be picked

10 Havok. ©Copyright 2006 Havok.com (or its licensors). All Rights Reserved. ATI Comparison X1600 XTX1900 XTX Graphics Bus Tech PCIe x16 Bandwidth to CPU 4000 MB/sec Bandwidth to GPU 3200 MB/sec Memory 512MB Memory Interface 128-bit256-bit Memory Bandwidth 22 GB/sec46.4 GB/sec Memory Speed 690Mhz725Mhz Peak Instructions 25B/sec100B/sec

11 Havok. ©Copyright 2006 Havok.com (or its licensors). All Rights Reserved. Solve Collisions Integrate Collide Ballistic physics refresher course

12 Havok. ©Copyright 2006 Havok.com (or its licensors). All Rights Reserved. Find overlapping pairs Integrate

13 Havok. ©Copyright 2006 Havok.com (or its licensors). All Rights Reserved. Narrow phase collide

14 Havok. ©Copyright 2006 Havok.com (or its licensors). All Rights Reserved. Solve collisions

15 Havok. ©Copyright 2006 Havok.com (or its licensors). All Rights Reserved. Solve Collisions Integrate Collide Is physics a data parallel task? Anatomy of a clock tick

16 Havok. ©Copyright 2006 Havok.com (or its licensors). All Rights Reserved. Is physics a data parallel task? Step Body 1 Step Body 2 Step Body 1000 Integrate New Positions Position & Velocity

17 Havok. ©Copyright 2006 Havok.com (or its licensors). All Rights Reserved. Solve Collisions Integrate Collide Anatomy of a clock tick Is physics a data parallel task?

18 Havok. ©Copyright 2006 Havok.com (or its licensors). All Rights Reserved. Is physics a data parallel task? Find pairs Collide Pair 1 Collide Pair 2 Collide Pair 4000 Collide Contacts New Positions

19 Havok. ©Copyright 2006 Havok.com (or its licensors). All Rights Reserved. Solve Collisions Integrate Collide Anatomy of a clock tick Is physics a data parallel task?

20 Havok. ©Copyright 2006 Havok.com (or its licensors). All Rights Reserved. Is physics a data parallel task? Solve Collisions New Velocities Contacts & Velocities Body 1 Body 2 Body 5 Body 7 Body 6 Body 3 Body 8 Body 4 1 2 3 4 5 6 7 8 9 10 11 12

21 Havok. ©Copyright 2006 Havok.com (or its licensors). All Rights Reserved. Is physics a data parallel task? Solve Collisions New Velocities Contacts & Velocities Body 1 Body 2 Body 5 Body 7 Body 6 Body 3 Body 8 Body 4

22 Havok. ©Copyright 2006 Havok.com (or its licensors). All Rights Reserved. Is physics a data parallel task? Solve Collisions New Velocities Contacts Solve link 1 Solve link 2 Solve link 1200 Solve link 1 Solve link 2 Solve link 1000 Solve link 1 Solve link 2 Solve link 800 Batch 1Batch 2Batch 3

23 Havok. ©Copyright 2006 Havok.com (or its licensors). All Rights Reserved. Solve Collisions Integrate Collide Physics is a data parallel task 100% data parallel 80% data parallel 95% data parallel

24 Havok. ©Copyright 2006 Havok.com (or its licensors). All Rights Reserved. Havok Fx Features Overview FX Rigid Bodies –Convex collision bodies –Simple stable stacking FX Particles –Inelastic particle-particle collisions –Fluid effects –Cloth Lightweight framework Fully integrated with Havok 4.0 –Everything collides with everything else

25 Havok. ©Copyright 2006 Havok.com (or its licensors). All Rights Reserved. FX Particles Particles are like simple rigid bodies Much faster to simulate and render –One vertex per particle (point sprites) Havok FX particle framework gives you –Particle-particle collisions –Particle-rigid body collisions –User-defined behaviours and emitters

26 Havok. ©Copyright 2006 Havok.com (or its licensors). All Rights Reserved. FX Behaviors and Emitters Executed on GPU Uses SM3.0, e.g. HLSL Alter velocities and positions –Wind, gravity Per object user data –for custom properties

27 Havok. ©Copyright 2006 Havok.com (or its licensors). All Rights Reserved. Integrated Toolchain Leverages Havok physics exporters and tools pipeline

28 Havok. ©Copyright 2006 Havok.com (or its licensors). All Rights Reserved. Preview and Pipeline

29 Havok. ©Copyright 2006 Havok.com (or its licensors). All Rights Reserved. Simple behaviors GPU Memory Positions Velocities CPU Memory Readback from GPUWrite back to GPUModify on CPU

30 Havok. ©Copyright 2006 Havok.com (or its licensors). All Rights Reserved. GPU Memory Positions Textures Game play physics interaction CPU Memory Rigid Bodies Collision shapes Velocities Textures Collision Shapes Textures Game play physicsFX physics Once per Simulation Once per Frame

31 Havok. ©Copyright 2006 Havok.com (or its licensors). All Rights Reserved. Demo Set 2

32 Havok. ©Copyright 2006 Havok.com (or its licensors). All Rights Reserved. MORE DEMOS CPU shadowed objects Particles Junkyard Docklands

33 Havok. ©Copyright 2006 Havok.com (or its licensors). All Rights Reserved. Rendering and CrossFire Rendering needs careful consideration! –Most renderers will not render 20K objects well –Must use custom / vendor techniques Havok FX returns handle to vertex buffers –Current rigid body transforms –Current particle positions –Optionally other particle / body state useful for rendering The future is multiple GPUs

34 Havok. ©Copyright 2006 Havok.com (or its licensors). All Rights Reserved. Dual and Triple GPU Physics Second (or third) GPU can be used for graphics or physics simulation, or share the primary card

35 Havok. ©Copyright 2006 Havok.com (or its licensors). All Rights Reserved. FX Rigid Bodies again We said the GPU was fast…

36 Havok. ©Copyright 2006 Havok.com (or its licensors). All Rights Reserved. Future of Havok FX Distributing physics across multiple GPUs –e.g. 2 GPUs for physics, 2 for rendering Brittle fracture Advanced smoke/cloud rendering –Volumetric shadowing Advanced fluids –Smoothed particle hydrodynamics –Isosurface extraction using DirectX 10 Geometry Shader

37 Havok. ©Copyright 2006 Havok.com (or its licensors). All Rights Reserved. Last Slide


Download ppt "Havok. ©Copyright 2006 Havok.com (or its licensors). All Rights Reserved. HavokFX Next Gen Physics on ATI GPUs Andrew Bowell – Senior Engineer Peter Kipfer."

Similar presentations


Ads by Google