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.

Similar documents
Isosurface Rendering. CSC 7443: Scientific Information Visualization

Topics and things to know about them:

CIS 4930/ SCIENTIFICVISUALIZATION

Scalar Field Visualization. Some slices used by Prof. Mike Bailey

Mesh Simplification. Mesh Simplification. Mesh Simplification Goals. Mesh Simplification Motivation. Vertex Clustering. Mesh Simplification Overview

Lecture notes: Object modeling

Geometric Representations. Stelian Coros

Scalar Algorithms: Contouring

Marching Squares Algorithm. Can you summarize the marching squares algorithm based on what we just discussed?

Contouring and Isosurfaces. Ronald Peikert SciVis Contouring 2-1

Point based Rendering

Computer Graphics Prof. Sukhendu Das Dept. of Computer Science and Engineering Indian Institute of Technology, Madras Lecture - 24 Solid Modelling

CSG obj. oper3. obj1 obj2 obj3. obj5. obj4

L1 - Introduction. Contents. Introduction of CAD/CAM system Components of CAD/CAM systems Basic concepts of graphics programming

Real-Time Shadows. Last Time? Textures can Alias. Schedule. Questions? Quiz 1: Tuesday October 26 th, in class (1 week from today!

CS 4620 Midterm, March 21, 2017

Volume Illumination, Contouring

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

CMSC427 Final Practice v2 Fall 2017

Volume visualization. Volume visualization. Volume visualization methods. Sources of volume visualization. Sources of volume visualization

Visualization Computer Graphics I Lecture 20

Advanced 3D-Data Structures

CGAL. Mesh Simplification. (Slides from Tom Funkhouser, Adam Finkelstein)

Bonus Ch. 1. Subdivisional Modeling. Understanding Sub-Ds

Drawing in 3D (viewing, projection, and the rest of the pipeline)

Polygonization of Implicit Surfaces

TSBK03 Screen-Space Ambient Occlusion

A simple problem that has a solution that is far deeper than expected!

Low Poly Animals FIMA

Visualization. Images are used to aid in understanding of data. Height Fields and Contours Scalar Fields Volume Rendering Vector Fields [chapter 26]

11/1/13. Visualization. Scientific Visualization. Types of Data. Height Field. Contour Curves. Meshes

Visualization. CSCI 420 Computer Graphics Lecture 26

Implicit Surfaces & Solid Representations COS 426

Visualization Computer Graphics I Lecture 20

Height Fields and Contours Scalar Fields Volume Rendering Vector Fields [Angel Ch. 12] April 23, 2002 Frank Pfenning Carnegie Mellon University

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

9. Three Dimensional Object Representations

CIS 467/602-01: Data Visualization

For each question, indicate whether the statement is true or false by circling T or F, respectively.

Data Visualization (DSC 530/CIS )

Occluder Simplification using Planar Sections

Solid Modeling. Ron Goldman Department of Computer Science Rice University

Chapter 4-3D Modeling

Subdivision Surfaces

You can select polygons that use per-poly UVs by choosing the Select by Polymap command ( View > Selection > Maps > Select by Polygon Map).

Data Visualization (DSC 530/CIS )

CSC Computer Graphics

The exam begins at 2:40pm and ends at 4:00pm. You must turn your exam in when time is announced or risk not having it accepted.

After the release of Maxwell in September last year, a number of press articles appeared that describe VXGI simply as a technology to improve

Drawing in 3D (viewing, projection, and the rest of the pipeline)

How to model a car body in T-Splines

Textures and UV Mapping in Blender

Scientific Visualization Example exam questions with commented answers

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

The Traditional Graphics Pipeline

The Ball-Pivoting Algorithm for Surface Reconstruction

Scalar Visualization

Spatial Data Structures

Lecture overview. Visualisatie BMT. Fundamental algorithms. Visualization pipeline. Structural classification - 1. Structural classification - 2

All the Polygons You Can Eat. Doug Rogers Developer Relations

Alex Li 11/20/2009. Chris Wojtan, Nils Thurey, Markus Gross, Greg Turk

Real-Time Shadows. Last Time? Schedule. Questions? Today. Why are Shadows Important?

Specialized Acceleration Structures for Ray-Tracing. Warren Hunt

Lets assume each object has a defined colour. Hence our illumination model is looks unrealistic.

The Traditional Graphics Pipeline

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

Real-Time Shadows. MIT EECS 6.837, Durand and Cutler

Graphics Hardware and Display Devices

The Traditional Graphics Pipeline

Ray Tracing Acceleration Data Structures

Real-Time Shadows. Last Time? Today. Why are Shadows Important? Shadows as a Depth Cue. For Intuition about Scene Lighting

Enhancing Traditional Rasterization Graphics with Ray Tracing. March 2015

Multi-View Matching & Mesh Generation. Qixing Huang Feb. 13 th 2017

Minecraft Due: Mar. 1, 2015

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

Com S 336 Final Project Ideas

Transformation, tessellation and symmetry line symmetry

Indirect Volume Rendering

Spatial Data Structures

CS-184: Computer Graphics

Spatial Data Structures

An Approach to Content Creation for Trainz

Grade 7/8 Math Circles November 3/4, M.C. Escher and Tessellations

Meshes and Manifolds. Computer Graphics CMU /15-662

For Intuition about Scene Lighting. Today. Limitations of Planar Shadows. Cast Shadows on Planar Surfaces. Shadow/View Duality.

Scalar Visualization

Voxels. Tech Team - Johnny Mercado, Michael Matonis, Glen Giffey, John Jackson

Lecture 17: Solid Modeling.... a cubit on the one side, and a cubit on the other side Exodus 26:13

Normal Maps and Cube Maps. What are they and what do they mean?

Images from 3D Creative Magazine. 3D Modelling Systems

Terrain Rendering Research for Games. Jonathan Blow Bolt Action Software

Drawing in 3D (viewing, projection, and the rest of the pipeline)

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

Example Examination 2IV

Introduction to Computer Graphics. Modeling (3) April 27, 2017 Kenshi Takayama

CS248. Game Mechanics

CS451Real-time Rendering Pipeline

CSE528 Computer Graphics: Theory, Algorithms, and Applications

Atmospheric Reentry Geometry Shader

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

Transcription:

1

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. Three parts to this talk. A lot of content, so I ll move fast, but my goal is to give a background on what to look up (that was the biggest problem I ran into when first approaching this subject). You have to KNOW that you should look up contour indicator functions for instance. 2

Procedural geometry is useful for far more than just dynamic worlds as people first think- really all 3d art creation requires it. While we normally don t deal with this as engineers, knowing the methods and having a rich toolset can help us make better games. 3

4

Everyone knows Quaternions are good for working with rotations, and Matrices have problems. The issue I want to call attention to is that matrices are overspecified. There are lots of things that matrices can represent that aren t normalized orthogonal basis sets, whereas that s all quats can represent. If I fill a quaternion randomly with data, it s good. If I fill a matrix randomly, it s not good. 5

Surface representations have the same problem matrices do. They are subject to euler s identity and manifold issues, exacerbated by floating point error. It s very hard to make a left right plane test that s 100% robust to floating point error. You WILL hit problems if you roll your own surface rep CSG. Validation + Repair can be very complicated 6

Function can be ANYTHING, no robustness problems- it s strictly a sampling problem. No verify and fix step. Programming without worrying about edge cases, just provide a function. Each point in space has a very concrete in or out and it s based on a continuous function, so it s manifold. 7

Or more complicated interpolation works 8

Density is much easier to work with (changes are local), but you lose out on some useful operations on the distance field (ability to expand/shrink volume and higher quality gradient calculations) You can treat density as a distance field with a clamped distance of approximately one sampling grid cell. Note: the level set / surface for both these methods is almost identical (mid grey in the bitmaps) 9

Ray tracing evaluate function along ray, looking for 0 crossings Convert to surface is what I m going to talk more about because it fits better in the full volume of video game rendering knowledge we have now 10

We used density fields because they are more dynamically updatable 11

12

Low intercell dependencies if we want to be dynamic (remember, density fields over distance fields) Reduced triangle count ideally large flat areas aren t an array of polygons Preserve sharp features (trilinear filter is a blur). We can t represent anything over the nyquist frequency of two grid cells. 13

The nice thing is we only have polies on the surface, so it s pretty efficient 14

15

If you only look at the sign of the corners of each grid cell, there are only 15 topologies to choose from. You can slide the points along the edges based on relative weights if you have more than -1/1 16

17

Transvoxel is a method to allow marching cubes to span different LOD levels. 71 total topologies to handle a tessellation of any combination of sides 18

19

Dual contouring is a method to both spawn LOD levels and preserve sharp features. It s a dual method, so instead of create vertices on the edges of the grid, we create vertices inside the cells and connect them 20

21

This extension realizes that marching cubes can be ran on the dual of an octree itself. Fit the grid to the data. Minimizing slivers is a proposed extension. 22

23

Cubical marching squares treats each side as an independent problem, subdivides to match adjacent octree nodes or fit geometry better. Triangulation can use any method once you reassemble the box and extract the curves 24

25

Windborne was a voxel game we worked on, mostly in 2013-2014. Chunks are just regions of space (16x16x16 for instance) that help manage vertex buffers, visibility, and streaming. Basic operation is Here s a chunk, give me back the density grid (and materials) 26

Voxel game, regular grid because we found it was much easier for users to understand and interact with. It s interesting as well that you need a lot more detail and variation when you go smooth terrain; we initially started with something like MC source and it was very boring once the high frequency of individual voxels was removed. 27

This was what worked best. Min/max/etc didn t for various reasons (dealing with surfaces that were almost aligned) 28

29

Storing solid sides with our MC solution was pretty simple, and it meant we could draw them when there was a gap (to avoid seams), while ignoring them if the densities of neighboring voxels lined up 30

Note that for each voxel, we store the densities of all the corners. This is redundant, but important from a user perspective independence was VERY important don t edit one thing and then have something neighboring change. 31

Raise terrain under features to line up density field / nondensity-field features 32

MC underrepresents volumes for instance if a single corner has a density of 1 and the other 7 have a density of 0, you d expect about an eighth of the voxel to be filled in. Instead of that though, the traditional algorithm basically slices off a corner half way down three of the edges, whose volume is 1/6 th of what it should be. With some simple math we can correct for this, and it mitigates the ridges that you will otherwise see. 33

Grids are very good for dynamic lighting- many modern lighting techniques simulate light flow over a grid, and we additionally have densities along each edge and materials. For our placed objects, we actually made a uniform model of density and material to unify lighting across everything. 34

Because we had a well structured grid, we built an octree for occlusion queries- we could keep track of whether everything in the octree node was solid or transparent, and make some simplifying assumptions for rendering as a result. 35

Exposing the parameters of the voxelization algorithm allowed for some great effects to minimize some of the poor features of the algorithm (Marching cubes lack of high frequency features for instance). We let the normal smoothing parameter vary across materials and it really helps with varying the character of what you see. 36

Remember the 2 voxel nyquist frequency- well we had redundancy which gave us the ability to represent higher frequencies, if we used it. We were able to build terracing into our generation algorithm. 37

38