Terrain Rendering Research for Games. Jonathan Blow Bolt Action Software

Similar documents
Subdivision Of Triangular Terrain Mesh Breckon, Chenney, Hobbs, Hoppe, Watts

Scene Management. Video Game Technologies 11498: MSc in Computer Science and Engineering 11156: MSc in Game Design and Development

Announcements. Written Assignment2 is out, due March 8 Graded Programming Assignment2 next Tuesday

Page 1. Area-Subdivision Algorithms z-buffer Algorithm List Priority Algorithms BSP (Binary Space Partitioning Tree) Scan-line Algorithms

Many rendering scenarios, such as battle scenes or urban environments, require rendering of large numbers of autonomous characters.

Computer Graphics. Lecture 9 Hidden Surface Removal. Taku Komura

Spatial Data Structures

Computer Graphics. Bing-Yu Chen National Taiwan University The University of Tokyo

Computer Graphics. Bing-Yu Chen National Taiwan University

Spatial Data Structures

Speeding up your game

Hidden surface removal. Computer Graphics

LOD and Occlusion Christian Miller CS Fall 2011

Spatial Data Structures

Spatial Data Structures

Real-Time Rendering (Echtzeitgraphik) Dr. Michael Wimmer

Visible-Surface Detection Methods. Chapter? Intro. to Computer Graphics Spring 2008, Y. G. Shin

Hello, Thanks for the introduction

Determination (Penentuan Permukaan Tampak)

Rendering. Converting a 3D scene to a 2D image. Camera. Light. Rendering. View Plane

The Terrain Rendering Pipeline. Stefan Roettger, Ingo Frick. VIS Group, University of Stuttgart. Massive Development, Mannheim

9. Visible-Surface Detection Methods

Illumination and Geometry Techniques. Karljohan Lundin Palmerius

Spatial Data Structures

Computing Visibility. Backface Culling for General Visibility. One More Trick with Planes. BSP Trees Ray Casting Depth Buffering Quiz

3/1/2010. Acceleration Techniques V1.2. Goals. Overview. Based on slides from Celine Loscos (v1.0)

VIII. Visibility algorithms (II)

Point based global illumination is now a standard tool for film quality renderers. Since it started out as a real time technique it is only natural

Graphics and Interaction Rendering pipeline & object modelling

CS 465 Program 4: Modeller

INFOGR Computer Graphics. J. Bikker - April-July Lecture 11: Acceleration. Welcome!

Terrain Rendering. (Asirvatham& Hoppe, 2005)

Render-To-Texture Caching. D. Sim Dietrich Jr.

Building scalable 3D applications. Ville Miettinen Hybrid Graphics

Hidden Surface Elimination Raytracing. Pre-lecture business. Outline for today. Review Quiz. Image-Space vs. Object-Space

Real-Time Graphics Architecture

Table of Contents. Questions or problems?

Computer Graphics 1. Chapter 2 (May 19th, 2011, 2-4pm): 3D Modeling. LMU München Medieninformatik Andreas Butz Computergraphik 1 SS2011

Spatial Data Structures for Computer Graphics

Who has worked on a voxel engine before? Who wants to? My goal is to give the talk I wish I would have had before I started on our procedural engine.

A Real-time Micropolygon Rendering Pipeline. Kayvon Fatahalian Stanford University

GUERRILLA DEVELOP CONFERENCE JULY 07 BRIGHTON

INFOGR Computer Graphics. J. Bikker - April-July Lecture 11: Visibility. Welcome!

Comparison of hierarchies for occlusion culling based on occlusion queries

CS 563 Advanced Topics in Computer Graphics QSplat. by Matt Maziarz

Isosurface Rendering. CSC 7443: Scientific Information Visualization

Here s the general problem we want to solve efficiently: Given a light and a set of pixels in view space, resolve occlusion between each pixel and

Streaming Massive Environments From Zero to 200MPH

View-dependent fast real-time generating algorithm for large-scale terrain

Overview of Quadtree-based Terrain Triangulation and Visualization

Rendering Grass Terrains in Real-Time with Dynamic Lighting. Kévin Boulanger, Sumanta Pattanaik, Kadi Bouatouch August 1st 2006

Per-pixel Rendering of Terrain Data

Hardware Displacement Mapping

Terrain rendering (cont.) Terrain rendering. Terrain rendering (cont.) Terrain rendering (cont.)

EECE 478. Learning Objectives. Learning Objectives. Rasterization & Scenes. Rasterization. Compositing

Shadow Techniques. Sim Dietrich NVIDIA Corporation

Computer Graphics CS 543 Lecture 13a Curves, Tesselation/Geometry Shaders & Level of Detail

Shadows for Many Lights sounds like it might mean something, but In fact it can mean very different things, that require very different solutions.

Point Cloud Filtering using Ray Casting by Eric Jensen 2012 The Basic Methodology

Identifying those parts of a scene that are visible from a chosen viewing position, and only process (scan convert) those parts

Spatial Data Structures and Speed-Up Techniques. Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology

How to Work on Next Gen Effects Now: Bridging DX10 and DX9. Guennadi Riguer ATI Technologies

CS535 Fall Department of Computer Science Purdue University

Visibility: Z Buffering

Computer Graphics (CS 543) Lecture 13b Ray Tracing (Part 1) Prof Emmanuel Agu. Computer Science Dept. Worcester Polytechnic Institute (WPI)

Clipping & Culling. Lecture 11 Spring Trivial Rejection Outcode Clipping Plane-at-a-time Clipping Backface Culling

Topics. Ray Tracing II. Intersecting transformed objects. Transforming objects

Scalar Algorithms: Contouring

A Developer s Survey of Polygonal Simplification algorithms. CS 563 Advanced Topics in Computer Graphics Fan Wu Mar. 31, 2005

Universiteit Leiden Computer Science

Adaptive Tessellation for Trimmed NURBS Surface

Real-Time Reyes: Programmable Pipelines and Research Challenges. Anjul Patney University of California, Davis

Deferred Splatting. Gaël GUENNEBAUD Loïc BARTHE Mathias PAULIN IRIT UPS CNRS TOULOUSE FRANCE.

CSE 167: Lecture #5: Rasterization. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012

Visibility and Occlusion Culling

CMSC427 Advanced shading getting global illumination by local methods. Credit: slides Prof. Zwicker

COMP 175: Computer Graphics April 11, 2018

Lecture 25 of 41. Spatial Sorting: Binary Space Partitioning Quadtrees & Octrees

Last Time: Acceleration Data Structures for Ray Tracing. Schedule. Today. Shadows & Light Sources. Shadows

Physically-Based Laser Simulation

Specialized Acceleration Structures for Ray-Tracing. Warren Hunt

ICS RESEARCH TECHNICAL TALK DRAKE TETREAULT, ICS H197 FALL 2013

Lecture 4: Geometry Processing. Kayvon Fatahalian CMU : Graphics and Imaging Architectures (Fall 2011)

Rendering Very Large, Very Detailed Terrains. 26th April 2005

Ray Tracing Acceleration. CS 4620 Lecture 20

Lecture 13: Reyes Architecture and Implementation. Kayvon Fatahalian CMU : Graphics and Imaging Architectures (Fall 2011)

Computer Graphics. - Ray-Tracing II - Hendrik Lensch. Computer Graphics WS07/08 Ray Tracing II

Multiresolution model generation of. texture-geometry for the real-time rendering 1

Spatial Data Structures and Acceleration Algorithms

Ray Tracing. Cornell CS4620/5620 Fall 2012 Lecture Kavita Bala 1 (with previous instructors James/Marschner)

Ray Genealogy. Raytracing: Performance. Bounding Volumes. Bounding Volume. Acceleration Classification. Acceleration Classification

Graphics 2009/2010, period 1. Lecture 8: ray tracing

Ray Tracing Acceleration Data Structures

Visualization Concepts

QLOD: A Data Structure for Interative Terrain Visualization

Optimisation. CS7GV3 Real-time Rendering

Ray Tracing: Intersection

S U N G - E U I YO O N, K A I S T R E N D E R I N G F R E E LY A VA I L A B L E O N T H E I N T E R N E T

Spatial Data Structures. Steve Rotenberg CSE168: Rendering Algorithms UCSD, Spring 2017

Let s start with occluding contours (or interior and exterior silhouettes), and look at image-space algorithms. A very simple technique is to render

Transcription:

Terrain Rendering Research for Games Jonathan Blow Bolt Action Software jon@bolt-action.com

Lecture Agenda Introduction to the problem Survey of established algorithms Problems with established algorithms How we solved these problems Future work

Gameplay goals for a terrain engine Large enough to travel around for hours Detailed when seen at a human scale Dynamic modification of terrain data Runs at high, stable frame rates Need fast rotation of viewpoint

Technical goals to support gameplay Level-of-detail management (static or continuous?) A lot of polygons (2 31 in un-reduced terrain, 70,000+ in a given tessellation) Rendered polygons economically represent the terrain Near-field detail

Chief terrain CLOD papers: Lindstrom-Koller (SIGGRAPH 96) ROAM (M. Duchaineau et al, IEEE Visualization 97) Rottger et al

Geometry management Our previous games used variants of Lindstrom- Koller We wanted to switch to ROAM for increased versatility and efficiency. We ll now survey both of these systems.

Lindstrom-Koller and ROAM both use a binary triangle tree.

Lindstrom-Koller algorithm Operates bottom-up on a height field. Considers vertex-removal error projected to the viewport. If the projection is small, we can remove the vertex.

Lindstrom-Koller: frame coherence Vertices are grouped into blocks, sorted by error value. Reduces the number of vertices evaluated each frame.

ROAM algorithm Operates top-down on bounding volumes. Considers the projection of each bounding volume to the screen. If the projection is large, we subdivide the volume.

ROAM: frame coherence Two priority queues: split queue, merge queue Highest-priority wedges are split and merged to maintain equilibrium triangle count. Priorities modified according to viewpoint motion.

Why we were so excited about ROAM Because it s topdown, it does not dictate the form of your terrain data. We could use terrain consisting of Bezier patches with displacement maps.

The binary triangle tree is an excellent tessellator for curved surface terrain. Most people who work on Bezier surface terrain use rectangular subdivision. BTTs provide easier crack fixing and tighter resolution adaptation. The height map guys and the Bezier patch guys just don t talk to each other?

We implemented ROAM It ran slowly -- didn t scale. Spent a long time trying to optimize it. Other game developers have had similar problems. Games that use ROAM-style algorithms usually throw away the frame-coherence portions. This results in split-only ROAM.

The Evil Feedback Loop The longer you take to simulate a frame, the further the viewpoint moves in that frame. Thus the algorithm has to do more work next frame: longer simulation time. There s a catastrophe point where you can no longer keep up with real time: frame rate plummets toward 0.

Minor improvements to increase ROAM tessellation accuracy Separate wedge ascent and descent Child-volume bounding versus containedvertex bounding We were able to decrease polygon output by 40% for our data set.

The problem with top-down terrain rendering systems The bounding volumes hide information about the position of the maximal error. In making pessimistic assumptions about the projection, they sacrifice tess. efficiency. viewpoint viewpoint

In an LOD d scene, polygons tend to be roughly the same size in screen pixels.

A large percentage of polygons are small and close (50%? 60%?)

ROAM hindered by the basic nature of LOD We cannot get good priority bounds on polygons that are nearby. Polygons that are nearby comprise 50% of our tessellation. This hurts.

ROAM s running time The ROAM paper states it s O(n), n = number of LOD operations per frame. ROAM priority queues perform sorting. ROAM is actually O(mlogm), m = number of triangles in tessellation.

ROAM s lack of directionality is a problem. We don t know where wedges are relative to the viewpoint; only how distant they are. Priorities of all wedges decrement at the same rate even wedges you are moving away from. Distance d Distance d

General problem with established CLOD algorithms: Weak correlation The algorithms use 1-dimensional correlation between vertices to gain speed (within-block sorting in LK, sorted priority queues in ROAM) They spend CPU resolving ambiguities in this 1D ordering. We could do better correlating in 3D.

F n (v) = p n p n < p thresh? F maps the 3-dimensional argument v into the one-dimensional result p There are 3 dimensions worth of information in F but we see only the 1D shadow of that in p. Every point in p represents an infinite number of points in F aliased together.

Changing the way we think about the projected error. Rather than evaluating F n (v), we look at F n itself. The set of points for which F n (v) = p thresh forms a boundary surface in 3D space. This is an isosurface of the implicit function F. F(v) = p thresh F(v) < p thresh

Isosurface LOD testing When the viewpoint crosses into an isosurface, enable the vertex. When the viewpoint crosses back out, disable the vertex.

How we gain efficiency If B is contained in A, the viewpoint cannot enter B without first crossing A. A B

How we gain efficiency We store the isosurfaces in a tree. We only descend into nodes when the viewpoint crosses an isosurface. Statistically, terrains will exhibit a lot of natural hierarchy. Split tree, merge tree

Clustering At the root level of the isosurface tree we will have thousands of intersecting surfaces. We introduce extra bounding volumes to cluster these nodes together.

Clustering At the root level of the isosurface tree we will have thousands of intersecting surfaces. We introduce extra bounding volumes to cluster these nodes together.

Performance The number of node traversals is O() the number of LOD operations required that frame, with a slight overhead for cluster nodes. You only pay for what you get (mostly). To make things extra speedy, we use spherical isosurfaces. However, the basic algorithm works with surfaces of any shape.

Lindstrom-Koller isosurface

Performance 2 31 triangles, 50k in tessellation, 12k in frustum Quickly moving viewpoint. ROAM gave us 1fps, unstable performance. Lindstrom better at 8fps, moderately stable. Isosurfaces fastest at 30+fps, very stable.

Tessellation improvement 640x480 rendering, 3-pixel error ROAM-style wedges: 86284 triangles Direct isosurfaces: 56234 triangles

Tessellation improvement How low an error bound can we hit with a budget of 100,000 triangles? ROAM-style wedges: Direct isosurfaces: 2.75 pixels 2.17 pixels

Vertex buffers Pack vertices into an array that gets shipped off to the card. Expensive to create or modify; cheap to render. Difficult to use vertex buffers with dynamic LOD.

Using the isosurfaces to predict mean-time-to-modification We can make vertex buffers out of isosurfaces that don t come very close to the viewpoint. We cluster these vertex buffers spatially so we can do reasonable frustum culling. Software buffers to take care of The Other 50%.

Changing the basic rendering method Now to render the scene, we begin at the root of the isosurface tree and work our way downward. We no longer use the binary triangle tree for rendering; so we phase it out entirely.

Future work

Future work: The binary triangle tree? The binary triangle tree causes extra triangle splits to fix cracks. How much overhead does this produce? Some algorithms like Rottger s and Ulrich s triangulate quadtree blocks instead. They have differing crack fixing policies. What is the relationship between crack fixing policy, tessellation density, and scene quality?

Future work: A better error metric? Lindstrom-Koller uses vertical displacement to measure error. Garland/Heckbert use normal displacement. Is linear displacement even a good error metric? What are other (non-ad-hoc) options? We need a metric that judges the algorithm s final output. (cf. PSNR)

Future work: Batched LOD operations? Our LOD decision-making is fast enough now to be negligible for our target detail levels. However our algorithm still suffers a catastrophe at high viewpoint speeds due to the aggregate cost of all the split/merge operations per frame. Some way to perform many splits/merges at once would be good.

Terrain Rendering Research for Games Jonathan Blow Bolt Action Software jon@bolt-action.com