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

Similar documents
Terrain Rendering Research for Games. Jonathan Blow Bolt Action Software

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

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

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

LOD and Occlusion Christian Miller CS Fall 2011

Spatial Data Structures

Computer Graphics. Prof. Feng Liu. Fall /21/2016

Spatial Data Structures

Spatial Data Structures

Spatial Data Structures

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

Spatial Data Structures

Computer Graphics Fundamentals. Jon Macey

Overview of Quadtree-based Terrain Triangulation and Visualization

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

Terrain Rendering using Multiple Optimally Adapting Meshes (MOAM)

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

Parallel Physically Based Path-tracing and Shading Part 3 of 2. CIS565 Fall 2012 University of Pennsylvania by Yining Karl Li

Spatial Data Structures for Computer Graphics

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

CSE 167: Introduction to Computer Graphics Lecture #10: View Frustum Culling

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

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

COMP 175: Computer Graphics April 11, 2018

Computer Graphics. - Texturing Methods -

View-dependent Polygonal Simplification

Ray Tracing III. Wen-Chieh (Steve) Lin National Chiao-Tung University

CS535 Fall Department of Computer Science Purdue University

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

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

Speeding up your game

Advanced 3D-Data Structures

CSE 167: Introduction to Computer Graphics Lecture #11: Visibility Culling

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

MODELING AND HIERARCHY

Computer Graphics. Bing-Yu Chen National Taiwan University

Algorithms for GIS:! Quadtrees

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

Computergrafik. Matthias Zwicker Universität Bern Herbst 2016

Georgios Tziritas Computer Science Department

Illumination and Geometry Techniques. Karljohan Lundin Palmerius

7. Stochastic Fractals

A Real-time Rendering Method Based on Precomputed Hierarchical Levels of Detail in Huge Dataset

Curves and Surfaces 2

Per-pixel Rendering of Terrain Data

improving raytracing speed

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

NATIONWIDE POINT CLOUDS AND 3D GEO- INFORMATION: CREATION AND MAINTENANCE GEORGE VOSSELMAN

Character Modeling COPYRIGHTED MATERIAL

Subdivision Surfaces

ABSTRACT. Abstract III

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

Computer Graphics I Lecture 11

Boston College Computer Science Department

Z-Buffer hold pixel's distance from camera. Z buffer

CS 465 Program 4: Modeller

Spatial Data Structures and Acceleration Algorithms

Geometric Modeling. Bing-Yu Chen National Taiwan University The University of Tokyo

Homework 1: Implicit Surfaces, Collision Detection, & Volumetric Data Structures. Loop Subdivision. Loop Subdivision. Questions/Comments?

Anti-aliased and accelerated ray tracing. University of Texas at Austin CS384G - Computer Graphics Fall 2010 Don Fussell

Procedural modeling and shadow mapping. Computer Graphics CSE 167 Lecture 15

Near-Optimum Adaptive Tessellation of General Catmull-Clark Subdivision Surfaces

Adaptive Tessellation for Trimmed NURBS Surface

Advanced Computer Graphics

Point Location in Delaunay Triangulations

Images from 3D Creative Magazine. 3D Modelling Systems

Geometric Representations. Stelian Coros

REAL-TIME RENDERING OF LARGE TERRAIN ON MOBILE DEVICE

Out-of-core Multi-resolution Terrain Modeling

Intersection Acceleration

Interactive Ray Tracing: Higher Memory Coherence

9. Three Dimensional Object Representations

CSE528 Computer Graphics: Theory, Algorithms, and Applications

Subdivision overview

Isosurface Rendering. CSC 7443: Scientific Information Visualization

Genetic Selection of Parametric Scenes Rendering

Real-time rendering of large terrains using algorithms for continuous level of detail (HS-IDA-EA )

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

Terrain Rendering (Part 1) Due: Thursday November 30 at 10pm

1. Introduction. 2. Parametrization of General CCSSs. 3. One-Piece through Interpolation. 4. One-Piece through Boolean Operations

Ray Tracing Acceleration Data Structures

Real-time Extendible-resolution Display of On-line Dynamic Terrain

11 - Spatial Data Structures

Simulation in Computer Graphics Space Subdivision. Matthias Teschner

Ray Tracing: Intersection

TDA362/DIT223 Computer Graphics EXAM (Same exam for both CTH- and GU students)

CSE 167: Introduction to Computer Graphics Lecture 11: Scene Graph 2. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2013

Computergrafik. Matthias Zwicker. Herbst 2010

Sparse Terrain Pyramids

Cross-Parameterization and Compatible Remeshing of 3D Models

Subdivision Surfaces. Homework 1: Questions on Homework? Last Time? Today. Tensor Product. What s an illegal edge collapse?

Solid Modeling. Thomas Funkhouser Princeton University C0S 426, Fall Represent solid interiors of objects

DiFi: Distance Fields - Fast Computation Using Graphics Hardware

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

REYES REYES REYES. Goals of REYES. REYES Design Principles

Sign up for crits! Announcments

MSBVH: An Efficient Acceleration Data Structure for Ray Traced Motion Blur

Shape Representation Basic problem We make pictures of things How do we describe those things? Many of those things are shapes Other things include

Topics and things to know about them:

Determination (Penentuan Permukaan Tampak)

Transcription:

Subdivision Of Triangular Terrain Mesh Breckon, Chenney, Hobbs, Hoppe, Watts MSc Computer Games and Entertainment Maths & Graphics II 2013 Lecturer(s): FFL (with Gareth Edwards)

Fractal Terrain Based on subdivision of a course polygon mesh Each subdivision adds detail to the mesh in a carefully controlled random way Algorithm (starting with a triangular mesh): Split each edge, and shift the new vertex up or down by a random amount Subdivide the triangles using the new vertices Repeat There are also algorithms for quadrilateral meshes

Subdivision Method 1 Works on any triangular mesh - does not have to be regular or have equal sized triangles.

Subdivision Method 2 Generates a triangle bintree from the top down Useful for LOD Ideally, works for right-angled isosceles triangles

Subdivision Method 3 Assume quadrilateral meshes

Rendering Terrain Coarser Finer

Rendering Terrain Bilinear Patch Adaptive Representation

Rendering Terrain T-Junction Adaptive Representation

Triangle Binary Trees (Bintree) Bintrees in which: Each node represents a right-angled isosceles triangle Each node has two children formed by splitting from the right angle vertex to the midpoint of the baseline The leaf nodes use vertices from the original height field Another way is to build a spatial partitioning tree, but particularly well suited to simplification algorithms: Easy to maintain neighbor information Easy to avoid T-vertices

Triangle Bintree Example 2 1 6 3 5 4 1 3 4 5 6 2 13 8 7 10 7 8 9 10 11 12 13 14 14 11 12 9

Bintree Data Structure Parent and child pointers Neighbors: A left neighbor, a right neighbor, and a base neighbor Note that the base and right angle give us a way to orient the triangle Neighbors are not necessarily at your own level Later, error bounds that say how much variation in height there is in your children

Neighbours 6 8 7 5 10 9 5: left neighbor 6, right neighbor 9 6: left neighbor 8, right neighbor 5 7: left neighbor 8, base neighbor 10 8: base neighbor 6, right neighbor 7 9: base neighbor 5, left neighbor 10 10: base neighbor 7, right neighbor 9 Note that 8 is 6 s left neighbor but 6 is 8 s base neighbor If you are someone s left/right/base neighbor they are not always your right/left/base neighbor In other words, neighbors need not come from the same level in the tree

Cuts 2 1 6 3 5 4 1 3 4 5 6 2 8 7 10 7 8 9 10 11 12 13 14 9

Cuts are not always equal! 2 1 6 3 5 4 1 3 4 5 6 2 8 7 10 7 8 9 10 11 12 13 14 9 Note the T-vertex - causes cracks in rendering

Generating Cuts Cuts are generated by a sequence of split or merge steps: Split: Drop the cut below to include your children Merge: Lift the cut up above two children To avoid T-vertices, some splits lead to other, forced, splits An LOD algorithm chooses which steps to apply to generate a particular triangle count or error rate

A Split A split cuts a triangle in two by splitting its base edge: If the base edge is on a boundary, just split, as shown If the base edge is shared, additional splits are forced Add a new triangle to the mesh 1 2 6 3 4 5 6 7 8 9 10 11 12 13 14

Forced Splits Triangles are always split along their base Hence, must also be able to split the base neighbor Requires neighbors to be mutual base neighbors If they are not base neighbors, even more splits are needed Simple recursive formulation

Merges A diamond is a merge candidate if the children of it s members are in the triangulation: The children of the 7-10 diamond below are candidates Look for parents of sibling leaf nodes that are base neighbors or have no base neighbors (do not introduce T-junctions..) Reduces the triangle count 1 2 8 7 10 9 3 4 5 6 7 8 9 10 11 12 13 14

Refinement LOD Algorithm Start with the base mesh Repeatedly split triangles until done: Stop when a specific triangle count is reached, or Stop when error is below some amount To guide the split order, assign priorities to each split and always do the one with the highest priority After each split, update priorities of affected triangles Sample priority: High priority to splits that will reduce big errors What is the complexity of this? A similar algorithm works by simplifying the mesh through merge operations. Why choose one over the other?

Fractal Terrain Details The original mesh vertices don t move, so it defines the overall shape of the terrain (mountains, valleys, etc) There are options for choosing where to move the new vertices Uniform random offset Normally distributed offset small motions more likely Procedural rule eg Perlin noise making patterns from pseudo-random numbers If desired, boundary vertices can be left unmoved, to maintain the boundary edge

Fractal Terrains Very jagged terrain

Populating Terrain Coloring terrain: Paint texture maps Base color on height (with some randomness) Trees: Paint densities, or randomly set density Then place trees randomly within regions according to density Rivers (and lakes): Trace local minima, and estimate catchment areas (more later ) Media: Terrain Paint v3.0

Terrain Generation Trade-Offs Control versus Automation: Painting gives most control Fractal terrain next best control because you can always specify more points Random methods give little control - generate lots and choose the one you like Generate on-the-fly: Random points and fractal terrain could be generated on the fly, but fractal terrain generation is quite slow Tiling s can also be generated on the fly Media: Unity 3D Terrain with Forest by NS Design

Static LOD Depending on the roughness of the terrain and the application, 5%-50% of the vertices and triangles can be removed: Consider: with 536,805,378 triangles MAYBE more than 200,000,000 triangles to draw in best case (rough surface). Frustum culling further reduces number of triangles to draw In most cases we still draw the terrain at full resolution near the far plane

View Dependent Dynamic LOD Dynamic simplification of visible part of the terrain A mountain observed from a distance of 10 km requires a higher tessellation than when observed from a distance of 100 km The quality of the tessellation can be changed at run time to achieve constant frame rates Terrains can be altered at run time

Terrain LOD Terrain poses problems for static LOD methods: Must have high resolution in the near field, and low resolution in the distance, all in one model Dynamic LOD methods are the answer: All based on the idea of cuts through a tree of potential simplifications ROAM algorithm is a good example: Other continuous LOD algorithms are similar in style An alternative is to create fixed LODs for sub-regions and figure out how to join them together

Terrain LOD Algorithms Triangle bintree based ROAMing Terrain: Real-time Optimally Adapting Meshes Duchaineau et al. Quad tree based e.g. Real-Time, Continuous Level of Detail Rendering of Height Fields Lindstrom et al. Progressive mesh based e.g. Smooth View-Dependent Level-of-Detail Control and its Application to Terrain Rendering Hoppe Geo Mip-mapping Fast Terrain Rendering Using Geometrical MipMapping de Boer

Rendering Fractal Landscape Alternative methods: Polygon rendering using graphics hardware Tesselate the height field Draw each triangle separately or Perform adaptive level-of-detail rendering Ray-tracing A) Tesselate the height field and trace the triangle mesh B) Directly trace the fractal (QEAB)

Rendering Fractal Landscapes Polygon rendering Tesselation is given implicitely or can be generated A height field over a rectangular domain, values are given at discrete sample points

Rendering Fractal Landscapes Rendering lit and textured triangles Vertices, colors, texture coords, normals Textured only Textured and shaded

Rendering Fractal Landscape Rendering triangles using graphics hardware Render triangle strips: v 0,v X,v 1,v X+1,v 2,v X+1,... V X V X+1 V X+2 V X+3... V 0 V 1 V 2 V 3 o Triangle defined by new point and previous two points o Each vertex is rendered only once... V X-1 Still have to send every vertex even in smooth regions Popping artefacts where triangles below pixel size

Rendering Fractal Landscapes LOD-Rendering Adaptively refine the mesh with regard to the current view

Rendering Fractal Landscapes LOD-Rendering: Top-down or bottom-up approach Hierarchically partition the mesh Start with coarse resolution and adaptively refine until desired level-of-detail is reached Start with original mesh and successively merge triangles Consider world space and/or screen space deviation Re-build mesh for every frame

Rendering Fractal Landscapes ROAM: Real-Time Optimally Adapting Meshes Exploits triangle bintree structure: split along base edge Valid triangulation has to be guaranteed o Two triangles have no overlap o Overlap at common vertex/common edge Critical case

Rendering Fractal Landscapes The recursive split operation Triangle to be split has coarser base neighbor o Force split of base neighbor first o Recursively force further splits until diamond is found o Diamond can be split without further splits

Rendering Fractal Landscapes Error criterion for split operation: Deviation in world space o Difference between height value at center vertex and average of left and right vertex o Recursively pull deviation values from bottom to top Deviation in screen space o Determine upper bound for screen space length of world space difference vector (0,d,0)

Rendering Fractal Landscapes Ray-Tracing Ray-tracing triangle meshes o Trace rays until a triangle is hit o Implicit occlusion culling

Rendering Fractal Landscapes Ray-Tracing - performance issues Mesh data structure has to be stored Hierarchical representation necessary for improved intersection test o Octree or kd-tree max/min(h) max/min(h) max/min(h) Store max/min heights within subregion Skip regions below minimal height of ray Employ ray coherences

Rendering Fractal Landscapes Rendering polygonal models analysis Aliasing due to undersampling of small features No exploitation of the fractal lod-nature Images K. Musgrave

Other Issues Terrain Texturing Terrain Lighting Camera Animation and Fly-through SkyBox Terrain following (a form of collision) Maintaining characters and objects on top of Terrain

Big Picture The creation, population, management, movement within (and on) and rendering of triangle based terrains is one of the most important issues in real-time graphics. Media: Virtual Worlds Scotland Terrain Mesh

End