Computer Graphics and Multimedia Systems, University of Siegen, Germany 1 GPU-Based Responsive Grass...

17
Computer Graphics and Multimedia Systems, University of Siegen, Germany 1 GPU-Based Responsive Grass GPU-Based Responsive Grass Jens Orthmann, Christof Rezk-Salama, Andreas Kolb

Transcript of Computer Graphics and Multimedia Systems, University of Siegen, Germany 1 GPU-Based Responsive Grass...

Page 1: Computer Graphics and Multimedia Systems, University of Siegen, Germany 1 GPU-Based Responsive Grass Jens Orthmann, Christof Rezk-Salama, Andreas Kolb.

Computer Graphics and Multimedia Systems, University of Siegen, Germany

1

GPU-Based Responsive GrassGPU-Based Responsive GrassJens Orthmann, Christof Rezk-Salama, Andreas Kolb

Page 2: Computer Graphics and Multimedia Systems, University of Siegen, Germany 1 GPU-Based Responsive Grass Jens Orthmann, Christof Rezk-Salama, Andreas Kolb.

Computer Graphics and Multimedia Systems, University of Siegen, Germany

2OverviewOverview

Motivation

Grass Representation

Collision Handling

Rendering

Results

Future Work

Page 3: Computer Graphics and Multimedia Systems, University of Siegen, Germany 1 GPU-Based Responsive Grass Jens Orthmann, Christof Rezk-Salama, Andreas Kolb.

Computer Graphics and Multimedia Systems, University of Siegen, Germany

3MotivationMotivation

Physically correct reacting environment improves immersion for players

Until now: research has been focused on the animation and rendering

Modern graphics cards shift the workload to the GPU

Page 4: Computer Graphics and Multimedia Systems, University of Siegen, Germany 1 GPU-Based Responsive Grass Jens Orthmann, Christof Rezk-Salama, Andreas Kolb.

Computer Graphics and Multimedia Systems, University of Siegen, Germany

4Grass BillboardsGrass Billboards

Usually: Clumps of grass are approximated by billboards quad with a semi-transparent texture

Crossed billboards produce a more volumetric impression

Page 5: Computer Graphics and Multimedia Systems, University of Siegen, Germany 1 GPU-Based Responsive Grass Jens Orthmann, Christof Rezk-Salama, Andreas Kolb.

Computer Graphics and Multimedia Systems, University of Siegen, Germany

5CPU-Based PredecisionCPU-Based Predecision

The grass layer is organized in an octree

A lookup into the octree brings up colliding nodes

Affected billboards will be handled on the GPU

Page 6: Computer Graphics and Multimedia Systems, University of Siegen, Germany 1 GPU-Based Responsive Grass Jens Orthmann, Christof Rezk-Salama, Andreas Kolb.

Computer Graphics and Multimedia Systems, University of Siegen, Germany

6GPU-Based CollisionhandlingGPU-Based Collisionhandling

Collision detection and reaction requires a more detailed mesh

Collisions are detected and resolved per vertex

Mass-spring system preserves the shape

Performance stability via recovering

Animation +Refinement

Collision-detection

Collision-reaction

Recovering Simplification

Page 7: Computer Graphics and Multimedia Systems, University of Siegen, Germany 1 GPU-Based Responsive Grass Jens Orthmann, Christof Rezk-Salama, Andreas Kolb.

Computer Graphics and Multimedia Systems, University of Siegen, Germany

7Depth CubesDepth Cubes

Objects are implictly represented by depth-cubes

The mesh is projected to each face

Each face stores the distance to the surface and the normal information

Page 8: Computer Graphics and Multimedia Systems, University of Siegen, Germany 1 GPU-Based Responsive Grass Jens Orthmann, Christof Rezk-Salama, Andreas Kolb.

Computer Graphics and Multimedia Systems, University of Siegen, Germany

8Collision DetectionCollision Detection

Vertex collides if it is occluded by all six faces of the depth cube

Occlusion is determined by a lookup within the depth cube

The accuracy of the detection depends on the resolution of the depth cube

Page 9: Computer Graphics and Multimedia Systems, University of Siegen, Germany 1 GPU-Based Responsive Grass Jens Orthmann, Christof Rezk-Salama, Andreas Kolb.

Computer Graphics and Multimedia Systems, University of Siegen, Germany

9Collision ReactionCollision Reaction

The normal vector within the depth cube defines the reaction‘s direction

The vertex then is moved along the normal out of the object

As each vertex is handled separately unrealistic distortions may occur

Page 10: Computer Graphics and Multimedia Systems, University of Siegen, Germany 1 GPU-Based Responsive Grass Jens Orthmann, Christof Rezk-Salama, Andreas Kolb.

Computer Graphics and Multimedia Systems, University of Siegen, Germany

10Shape PreservationShape Preservation

Spring model preserves the overall shape

Topology information is required

Length constraints correct adjacent vertices

Page 11: Computer Graphics and Multimedia Systems, University of Siegen, Germany 1 GPU-Based Responsive Grass Jens Orthmann, Christof Rezk-Salama, Andreas Kolb.

Computer Graphics and Multimedia Systems, University of Siegen, Germany

11RecoveringRecovering

Previously collided billboards will regenerate

Interpolation between deformed and undeformed shape

Billboards will be simplified after regeneration

deformedundeformed

Page 12: Computer Graphics and Multimedia Systems, University of Siegen, Germany 1 GPU-Based Responsive Grass Jens Orthmann, Christof Rezk-Salama, Andreas Kolb.

Computer Graphics and Multimedia Systems, University of Siegen, Germany

12Irradiance InformationIrradiance Information

Ambient occlusion: How much light reaches a point and from which direction?

Amount and mean-direction are determined by using shadow maps

Sampling an environment map results in the irradiance

Page 13: Computer Graphics and Multimedia Systems, University of Siegen, Germany 1 GPU-Based Responsive Grass Jens Orthmann, Christof Rezk-Salama, Andreas Kolb.

Computer Graphics and Multimedia Systems, University of Siegen, Germany

13RenderingRendering

Irradiance information is precomputed for the complete grass layer

During runtime: tri-linear interpolation within the volume results in the irradiance

Page 14: Computer Graphics and Multimedia Systems, University of Siegen, Germany 1 GPU-Based Responsive Grass Jens Orthmann, Christof Rezk-Salama, Andreas Kolb.

Computer Graphics and Multimedia Systems, University of Siegen, Germany

14Alpha-To-CoverageAlpha-To-Coverage

The transparency of a pixel determines how much sub-samples are colored

The final color is calculated during the multi-sample resolve phase

Quality depends on the multi-sampling resolution

Page 15: Computer Graphics and Multimedia Systems, University of Siegen, Germany 1 GPU-Based Responsive Grass Jens Orthmann, Christof Rezk-Salama, Andreas Kolb.

Computer Graphics and Multimedia Systems, University of Siegen, Germany

15ResultsResults

Video

Page 16: Computer Graphics and Multimedia Systems, University of Siegen, Germany 1 GPU-Based Responsive Grass Jens Orthmann, Christof Rezk-Salama, Andreas Kolb.

Computer Graphics and Multimedia Systems, University of Siegen, Germany

16Future WorkFuture Work

Take dynamic environments one step further

Enables integration of new game elements and extends game logics

Apply responsive grass algorithm to small plants like bushes, shrubs…

Improvement of visual results by dynamic sub-divisions

Page 17: Computer Graphics and Multimedia Systems, University of Siegen, Germany 1 GPU-Based Responsive Grass Jens Orthmann, Christof Rezk-Salama, Andreas Kolb.

Computer Graphics and Multimedia Systems, University of Siegen, Germany

Thank YouThank You

Thank you for your attention

17