+ All Categories
Home > Documents > Dealing with Computational Load in Multi-user Scalable City with OpenCL Assets and Dynamics...

Dealing with Computational Load in Multi-user Scalable City with OpenCL Assets and Dynamics...

Date post: 19-Dec-2015
Category:
View: 221 times
Download: 0 times
Share this document with a friend
Popular Tags:
26
Dealing with Computational Load in Multi-user Scalable City with OpenCL Assets and Dynamics Computation for Virtual Worlds
Transcript
Page 1: Dealing with Computational Load in Multi-user Scalable City with OpenCL Assets and Dynamics Computation for Virtual Worlds.

Dealing with Computational Load in Multi-user Scalable City

with OpenCL

Assets and Dynamics Computation for Virtual

Worlds

Assets and Dynamics Computation for Virtual

Worlds

Page 2: Dealing with Computational Load in Multi-user Scalable City with OpenCL Assets and Dynamics Computation for Virtual Worlds.

Focus on OpenCL

• Leveraging OpenCL allows targeting and testing various parallel compute resources for each workload: Core i7, Cell, Tesla, GPU

• Using a combination of compute accelerators allows us to alter configuration and mappings between software and hardware more easily.

• Vendors continue to optimize OpenCL drivers while we optimize our use of OpenCL: free development!

Page 3: Dealing with Computational Load in Multi-user Scalable City with OpenCL Assets and Dynamics Computation for Virtual Worlds.

Multi-User Load Challenges• Communications

• Graphics Rendering– Geometry Processing

– Shaders

– Rendering Techniques

• Dynamics Computation– Physics

– AI or other application specific behaviors

– Animation

Page 4: Dealing with Computational Load in Multi-user Scalable City with OpenCL Assets and Dynamics Computation for Virtual Worlds.

Particle Systems

• Each player is represented by a cloud of particles in the shape of a cyclone.

• Particle systems are client-side only: no effect upon environment, no need for synchronizing.

• With many players per city, each player processes many times more particles.

• Causing scalability and performance problems on the client with multiple players visible.

Page 5: Dealing with Computational Load in Multi-user Scalable City with OpenCL Assets and Dynamics Computation for Virtual Worlds.

Particle Systems: Now

• CPU computes new positions & texture coordinates

• New info must be sent to the card each frame.

• More CPU & bandwidth used as players increase.

Page 6: Dealing with Computational Load in Multi-user Scalable City with OpenCL Assets and Dynamics Computation for Virtual Worlds.

Particle Systems: Solution

• Utilize OpenCL to compute particle updates on the GPU.

• Particle system is an ideal GPU workload.

• Use OpenGL/DirectX interoperability to keep all data on the card: primary reason for GPU supremacy for this task!

• Expect an order of magnitude or more performance improvement on this system.

Page 7: Dealing with Computational Load in Multi-user Scalable City with OpenCL Assets and Dynamics Computation for Virtual Worlds.

Server Physics

Page 8: Dealing with Computational Load in Multi-user Scalable City with OpenCL Assets and Dynamics Computation for Virtual Worlds.

Effect of Multi-User On Physics

• Multi-user Scalable City will:– Scale total interactivity occurring at once

– Shift focus more towards parallel computation

– Impose greater demands on the state of the art in parallel computation

– Consequently expand upon the state of the art in parallel computation

– Utilize both incremental and parallel methods• Reduce work as much as possible

• Parallelize all work that must be done

Page 9: Dealing with Computational Load in Multi-user Scalable City with OpenCL Assets and Dynamics Computation for Virtual Worlds.

Utilizing Parallel Hardware• Next step: offloading physics from z10

– Xeon blades running Scalable Engine

– Cell BE blades running Bullet for Cell

– Distribute heavy computational stages

• Collision Detection on broad phase pair output

• Constraint solving/Integration on contact groups

• Then: OpenCL plan

– Develop physics system using algorithms well-suited to OpenCL parallelization

Page 10: Dealing with Computational Load in Multi-user Scalable City with OpenCL Assets and Dynamics Computation for Virtual Worlds.

Server Physics: Parallelization

• Physics is difficult to parallelize well:

– Each stage has vastly different properties

• If stages map to different devices, large data buffer transmissions must synchronize compute accelerators.

– Computationally heavy stages

• Collision detection is coarse-grained

• Independent contact groups can be large, unbalanced

• Constraint solving difficult to break down

– Traditional systems that solve all constraints simultaneously (e.g. using Gauss-Seidel) parallelize in limited ways.

Page 11: Dealing with Computational Load in Multi-user Scalable City with OpenCL Assets and Dynamics Computation for Virtual Worlds.

Server Physics: Goals

• Produce a new physics processing pipeline based as much as possible on OpenCL

• Minimize buffer transmission to/from OpenCL devices by keeping most all stages in OpenCL

• Specialize physics algorithms to highly parallel hardware

• Scale to as much activity as possible in real time as we scale hardware resources

Page 12: Dealing with Computational Load in Multi-user Scalable City with OpenCL Assets and Dynamics Computation for Virtual Worlds.

Server Physics: Approach• Present efforts for OpenCL physics focus upon

traditional algorithms and pipeline

– These methods have “won out” in single-core era

– Physics programmers most familiar with these methods and their trade-offs

– Ex: AMD-funded OpenCL port of Bullet

• We choose techniques better suited to massively parallel computation!

– Greater potential, more exploration to perform

Page 13: Dealing with Computational Load in Multi-user Scalable City with OpenCL Assets and Dynamics Computation for Virtual Worlds.

“Advanced Character Physics” – Jakobsen GDC 2001

• History

– Developed for speed and simplicity

– Not yet implemented in a parallel system

• Features

– All physics operates on solely on particles

– There is no large, global set of constraints to solve• Ever

Page 14: Dealing with Computational Load in Multi-user Scalable City with OpenCL Assets and Dynamics Computation for Virtual Worlds.

Jakobsen: Key Features

• Objects represented as a set of particles and stick constraints rather than geometric shapes

• All constraints solved individually, w/o reference to other constraints

• Collision response by simple projection

• Velocity-less Verlet integration method (often used in molecular dynamics)

Page 15: Dealing with Computational Load in Multi-user Scalable City with OpenCL Assets and Dynamics Computation for Virtual Worlds.

Jakobsen: Key Features

• Objects represented as a set of particles and stick constraints rather than geometric shapes

• All constraints solved individually, w/o reference to other constraints

• Collision response by simple projection

• Velocity-less Verlet integration method (often used in molecular dynamics)

Page 16: Dealing with Computational Load in Multi-user Scalable City with OpenCL Assets and Dynamics Computation for Virtual Worlds.

Rigid Bodies from Particles

• Cube as set of particles and stick constraints

– Corners are particles

– Stick constraints placed for edges

– Stick constraints placed to prevent collapse

• A stick constraint requires that the distance between two points be a constant value

Page 17: Dealing with Computational Load in Multi-user Scalable City with OpenCL Assets and Dynamics Computation for Virtual Worlds.

Jakobsen: Key Features

• Objects represented as a set of particles and stick constraints rather than geometric shapes

• All constraints solved individually, w/o reference to other constraints

• Collision response by simple projection

• Velocity-less Verlet integration method (often used in molecular dynamics)

Page 18: Dealing with Computational Load in Multi-user Scalable City with OpenCL Assets and Dynamics Computation for Virtual Worlds.

Constraint Solving• Normally, all constraints upon a body are

solved simultaneously– Solution to large set of equations and unknowns– Produces a transform that does not violate any

constraints

• Jakobsen method solves each constraint individually– Solving one constraint violates another– Iteratively solving constraints approaches solution– Fewer iterations can be used when warranted

Page 19: Dealing with Computational Load in Multi-user Scalable City with OpenCL Assets and Dynamics Computation for Virtual Worlds.

Jakobsen: Key Features

• Objects represented as a set of particles and stick constraints rather than geometric shapes

• All constraints solved individually, w/o reference to other constraints

• Collision response by simple projection

• Velocity-less Verlet integration method (often used in molecular dynamics)

Page 20: Dealing with Computational Load in Multi-user Scalable City with OpenCL Assets and Dynamics Computation for Virtual Worlds.

Jakobsen: Key Features• Verlet Integration– Replace use of ‘velocity’ with ‘previous position’

• Projection– Simply move particle out of collision with face!

• Combination of features results in very stable simulation– Velocity & acceleration never get out of control

• Retaining OpenCL buffers on device– Last cycle’s result array binds to ‘previous position’

Page 21: Dealing with Computational Load in Multi-user Scalable City with OpenCL Assets and Dynamics Computation for Virtual Worlds.

Jakobsen: The Good• Physics processing tends toward large number of

simpler, evenly divided computations!– Collision detection and constraints operate on particles– All constraints are solved independently

• Can reduce buffer transfers to half!– No contact graph generation stage– Allows parallel computation across collision detection,

constraint generation, constraint solving, integration

Contact GraphColl. Det. Integration

Coll. Det. Integration

Page 22: Dealing with Computational Load in Multi-user Scalable City with OpenCL Assets and Dynamics Computation for Virtual Worlds.

Jakobsen: The Bad

• Constraints can be violated temporarily

– Solving one constraint can re-violate another

– ~10 constraint solving passes produces rigid body-like behavior: fewer passes produce cloth->plant behavior

• Body transforms must be computed based upon particle configuration in post-processing for display purposes

• Additional behaviors require re-engineering (friction model, bouncing, inverse kinematics, etc) in light of Verlet & particle scheme (see paper)

Page 23: Dealing with Computational Load in Multi-user Scalable City with OpenCL Assets and Dynamics Computation for Virtual Worlds.

Progress

• Work is just beginning

OpenCL particle system with Verlet integration

Complex forces, texture animation for cyclones

Particle/height-map collision detection

Collision response by projection

Rigid bodies as set of particles + stick constraints

Multi-pass relaxation solver

Page 24: Dealing with Computational Load in Multi-user Scalable City with OpenCL Assets and Dynamics Computation for Virtual Worlds.

Progress

Page 25: Dealing with Computational Load in Multi-user Scalable City with OpenCL Assets and Dynamics Computation for Virtual Worlds.

Further Out

• Distribute responsibility for dynamics among qualified clients

– Increases world asynchronicity

– Develop operational semantics to indicate synchronous status

– Server gathers, correlates, and distributes updates to world

Page 26: Dealing with Computational Load in Multi-user Scalable City with OpenCL Assets and Dynamics Computation for Virtual Worlds.

Conclusion

• OpenCL at front and center of efforts to alleviate performance problems on both server and client in our multi-user systems.

• Focus is on algorithms to– Reduce buffer communication to/from OpenCL– Increase parallelism by breaking up problems into

smaller pieces


Recommended