Scalar Algorithms: Contouring

Similar documents
Volume Illumination, Contouring

Isosurface Rendering. CSC 7443: Scientific Information Visualization

Contours & Implicit Modelling 4

Contours & Implicit Modelling 1

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

Scalar Visualization

Previously... contour or image rendering in 2D

CIS 467/602-01: Data Visualization

Data Visualization (DSC 530/CIS )

Indirect Volume Rendering

Processing 3D Surface Data

Data Representation in Visualisation

Processing 3D Surface Data

Volume Illumination & Vector Field Visualisation

Contouring and Isosurfaces. Ronald Peikert SciVis Contouring 2-1

Data Visualization (DSC 530/CIS )

CIS 4930/ SCIENTIFICVISUALIZATION

Volume Illumination and Segmentation

CSC Computer Graphics

Scientific Visualization. CSC 7443: Scientific Information Visualization

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

Scalar Visualization

Geometric Representations. Stelian Coros

Data Visualization (CIS/DSC 468)

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

Visualization. CSCI 420 Computer Graphics Lecture 26

Processing 3D Surface Data

Volume Rendering. Computer Animation and Visualisation Lecture 9. Taku Komura. Institute for Perception, Action & Behaviour School of Informatics

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

Volume Illumination. Visualisation Lecture 11. Taku Komura. Institute for Perception, Action & Behaviour School of Informatics

Scalar Algorithms -- surfaces

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

Scalar Field Visualization I

Visualization Computer Graphics I Lecture 20

Iso-surface cell search. Iso-surface Cells. Efficient Searching. Efficient search methods. Efficient iso-surface cell search. Problem statement:

SURFACE CONSTRUCTION USING TRICOLOR MARCHING CUBES

Scalar Field Visualization I

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

Polygonization of Implicit Surfaces

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

03 - Reconstruction. Acknowledgements: Olga Sorkine-Hornung. CSCI-GA Geometric Modeling - Spring 17 - Daniele Panozzo

Level Set Extraction from Gridded 2D and 3D Data

Topology Preserving Tetrahedral Decomposition of Trilinear Cell

Scientific Visualization Example exam questions with commented answers

Special Topics in Visualization

Approximation of Isosurface in the Marching Cube: Ambiguity Problem.

Fundamental Algorithms and Advanced Data Representations

A Survey of Volumetric Visualization Techniques for Medical Images

Vector Field Visualisation

coding of various parts showing different features, the possibility of rotation or of hiding covering parts of the object's surface to gain an insight

5. Volume Visualization

Solid Modeling. Michael Kazhdan ( /657) HB , FvDFH 12.1, 12.2, 12.6, 12.7 Marching Cubes, Lorensen et al.

Lecture notes: Object modeling

Project Updates Short lecture Volumetric Modeling +2 papers

Scalar Data. Visualization Torsten Möller. Weiskopf/Machiraju/Möller

3D Volume Mesh Generation of Human Organs Using Surface Geometries Created from the Visible Human Data Set

Kent Academic Repository

A type-merging algorithm for extracting an isosurface from volumetric data

MARCHING CUBES AND VARIANTS

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

Mesh Decimation Using VTK

Visualizer An implicit surface rendering application

Introduction to volume rendering. Paul Bourke

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.

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

LAPLACIAN MESH SMOOTHING FOR TETRAHEDRA BASED VOLUME VISUALIZATION 1. INTRODUCTION

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

11/1/13. Polygon Meshes and Implicit Surfaces. Shape Representations. Polygon Models in OpenGL. Modeling Complex Shapes

Computer Graphics Ray Casting. Matthias Teschner

Flow Visualisation 1

Efficient Representation and Extraction of 2-Manifold Isosurfaces Using kd-trees

Polygon Meshes and Implicit Surfaces

Polygon Meshes and Implicit Surfaces

Open Topology: A Toolkit for Brain Isosurface Correction

Course Review. Computer Animation and Visualisation. Taku Komura

Level of Details in Computer Rendering

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

Scalar Data. Alark Joshi

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

9. Three Dimensional Object Representations

Clipping. CSC 7443: Scientific Information Visualization

: Mesh Processing. Chapter 8

Point based Rendering

Optimal Iso-Surfaces

Implicit Surfaces & Solid Representations COS 426

MULTI-RESOLUTION DUAL CONTOURING FROM VOLUMETRIC DATA

GPU-based Volume Rendering. Michal Červeňanský

Volume Visualization. Part 1 (out of 3) Volume Data. Where do the data come from? 3D Data Space How are volume data organized?

lecture 21 volume rendering - blending N layers - OpenGL fog (not on final exam) - transfer functions - rendering level surfaces

Applications. Oversampled 3D scan data. ~150k triangles ~80k triangles

Isosurface Visualization of Data with Nonparametric Models for Uncertainty

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

Surface Modeling. Polygon Tables. Types: Generating models: Polygon Surfaces. Polygon surfaces Curved surfaces Volumes. Interactive Procedural

Dual Marching Cubes. Gregory M. Nielson. Arizona State University

arxiv: v1 [math.na] 2 Aug 2013

Comparative Study of Marching Cubes Algorithms for the Conversion of 2D image to 3D

Volume Visualization

Edge Groups: An Approach to Understanding the Mesh Quality of Marching Methods

COMPUTER GRAPHICS COURSE. Rendering Pipelines

Transcription:

Scalar Algorithms: Contouring Computer Animation and Visualisation Lecture tkomura@inf.ed.ac.uk Institute for Perception, Action & Behaviour School of Informatics Contouring Scaler Data

Last Lecture... Colour mapping Designing the colour lookup table / transfer function Interpolating in various colour spaces HSV, RGB, greyscale Contouring Scaler Data

Contouring Contours explicitly construct the boundary between regions with values Boundaries correspond to: lines in D surfaces in D (known as isosurfaces) of constant scalar value Contouring Scaler Data

Example : contours lines of constant pressure on a weather map (isobars) surfaces of constant density in medical scan (isosurface) iso roughly means equal / similar / same as Contouring Scaler Data 4

Overview Contouring - Problem statement - Tracking - Marching squares - Ambiguity problems - Marching cubes - Dividing squares Volume rendering Contouring Scaler Data 5

Contours Contours are boundaries between regions they DO NOT just connect points of equal value they DO also indicate a TRANSITION from a value below the contour to a value above the contour Contouring Scaler Data 6

D contours Data : D structured grid of scalar values 0 6 6 9 8 6 4 Difficult to visualise transitions in data use contour at specific scalar value to highlight transition What is the contour of 5? Contouring Scaler Data

Methods of Contour Line Generation Approach : Tracking find contour intersection with an edge track it through the cell boundaries if it enters a cell then it must exit via one of the boundaries track until it connects back onto itself or exits dataset boundary If it is known to be only one contour, stop otherwise Check every edge Approach : Marching Squares Algorithm Contouring Scaler Data 8

Marching Squares Algorithm Focus : intersection of contour and cell edges how the contour passes through the cell Assumption: a contour can pass through a cell in only a finite number of ways A vertex is inside contour if scalar value > contour outside contour if scalar value < contour 4 vertices, states (in or out) Contouring Scaler Data 9

Marching Squares No intersection. Ambiguous case. 4 = 6 possible cases for each square Contour intersects edge(s) small number so just treat each one separately Contouring Scaler Data 0

MS Algorithm Overview Main algorithm?. Select a cell. Calculate inside/outside state for each vertex. Look up topological state of cell in state table determine which edge must be intersected (i.e. which of the 6 cases) 4. Calculate contour location for each intersected edge 5. Move (or march) onto next cell until all cells are visited GOTO Contouring Scaler Data

MS Algorithm - notes Intersections for each cell must be merged to form a complete contour cells processed independently further merging computation required disadvantage over tracking (continuous tracked contour) Easy to implement (also to extend to D) Easy to parallelise Contouring Scaler Data

MS : Dealing with ambiguity? Split Ambiguous case. Join Choice independent of other choices either valid : both give continuous and closed contour Contouring Scaler Data

Example : Contour Line Generation 0 No intersection. Contour intersects edge Contour intersects edges 6 6 9 8 6 4 Ambiguous case. main steps for each cell here using simplified summary model of cases Contouring Scaler Data 4

Step : classify vertices 0 No intersection. Contour intersects edge Contour intersects edges 6 6 9 8 6 4 Contour value =5 Ambiguous case. Decide whether each vertex is inside or outside contour Contouring Scaler Data 5

Step : identify cases No intersection. Contour intersects edge Contour intersects edges 0 6 6 9 8 6 4 Ambiguous case. Contour value =5 Classify each cell as one of the cases Contouring Scaler Data 6

Step : interpolate contour intersections 0 No intersection. Contour intersects edge Contour intersects edges 6 6 9 8 6 4 Ambiguous case. Split Determine the edges that are intersected compute contour intersection with each of these edges Contouring Scaler Data

Ambiguous contour No intersection. Contour intersects edge Contour intersects edges 0 6 6 9 8 6 4 Ambiguous case. Join Finally : resolve any ambiguity here choosing join (example only) Contouring Scaler Data 8

MS : Dealing with ambiguity? One solution Calculate the value at the middle of the square by interpolation Check if it is under or above the threshold value Choose the pattern that matches Contouring Scaler Data 9

Ambiguous contour No intersection. Contour intersects edge Contour intersects edges 0 6 6 9 8 6 4? Ambiguous case. Finally : resolve any ambiguity here choosing join (example only) Contouring Scaler Data 0

D : Example contour A slice through the head A Quadric function. (with colour mapping added) Contouring Scaler Data

D surfaces : marching cubes Extension of Marching Squares to D data : D regular grid of scalar values result : D surface boundary instead of D line boundary D cube has 8 vertices 8 = 56 cases to consider use symmetry to reduce to 5 Problem : ambiguous cases cannot simply choose arbitrarily as choice is determined by neighbours poor choice may leave hole artefact in surface Contouring Scaler Data

Marching Cubes - cases Ambiguous cases,6,0,, split or join? Contouring Scaler Data

Example of bad choices The dark dots are the interior There are edges which are not shared by both cubes Need to make sure there is no contradiction with the neighbors Contouring Scaler Data 4

Cracks eliminated Contouring Scaler Data 5

Other two possible triangulations Need to decide how the faces are intersected by the contours Contouring Scaler Data 6

Adding more patterns Adding more patterns for,6,0,, [Neilson '9] Compute the values at the middle of the faces and the cubes Selecting the pattern that matches Contouring Scaler Data

Results : isosurfaces examples isosurface of Electron potential isosurface of flow density white outline shows bounds of D data grid surface = D contour (i.e. isosurface) through grid method : Marching Cubes Contouring Scaler Data 8

Rendering Metaballs The marching cubes algorithm is useful for rendering metaballs (implicit functions) D ( x, y, z)= b i exp(ai r i ) i r i= ( x xi ) +( y y i ) +( zz i ) ( x i, y i, z i ): the center of the particle i F ( x, y, z )=D ( x, y, z)t Rendering the surface where F(x,y,z) = 0 Contouring Scaler Data 9

Marching Cubes by CUDA http://www.youtube.com/watch?v=y5urxpx8q8u Contouring Scaler Data 0

Problems with Marching Cubes Generates lots of polygons -4 triangles per cell intersected many unnecessary e.g. co-planar triangles Increases the cost of rendering As with marching squares separate merging required Contouring Scaler Data

Dividing Cubes Algorithm Marching cubes often produces more polygons than pixels for given rendering scale Problem : causes high rendering overhead Solution : Dividing Cubes Algorithm draw points instead of polygons (faster rendering) Need : efficient method to find points on surface : method to shade points Contouring Scaler Data

Example : D divided squares for D lines Find pixels that intersect contour - Subdivide them Contouring Scaler Data

D divided squares for lines Find pixels that intersect line Subdivide them ( usually in x) Repeat recursively Contouring Scaler Data 4

D divided squares for lines Find pixels that intersect line Subdivide them Repeat recursively until screen resolution reached Fill in the pixel with the color of the line Contouring Scaler Data 5

Extension to D Find voxels which intersect surface Recursively subdivide the voxels that intersect the contour Until the voxel fits within a pixel Calculate mid-points of voxels Calculate the color of the pixel by shading Contouring Scaler Data 6

Drawing divided cubes surfaces surface normal for lighting calculations interpolate from voxel corner points problem with camera zoom ideally dynamically re-calculate points not always computationally possible Contouring Scaler Data

Dividing Cubes : Example 50,000 points when sampling less than screen resolution structure of surface can be seen Contouring Scaler Data 8

Viewing the volume data Originally we had the volume data Contouring: visualisation via surface shading volumetric data geometric primitives screen pixels Only watching the objects at the threshold value What if we want to watch other parts? Contouring Scaler Data 9

Volume Rendering Shaded iso-surface surface based rendering Volume Rendering voxel based rendering Data : D dense volume; structured D grid of voxels regular geometry and topology Contouring Scaler Data 40

Volume Rendering display the information inside the volume direct display : volumetric data screen pixels use transparency (seeing through volumes) Volview (now opensource) Contouring Scaler Data 4

Summary Contouring Theory D : Marching Squares Algorithm D : Marching Cubes Algorithm [Lorensen '8] marching tetrahedra, ambiguity resolution limited to regular structured grids D Rendering : Dividing Cubes Algorithm [Cline '88] - Volume Rendering Readings G.M. Nielson, B Hamann, The Asymptotic Decider: Resolving the Ambiguity in Marching Cubes W.E. Lorensen, H.E. Cline, Marching Cubes: A high resolution D surface construction algorithm H.E. Cline, W.E. Lorensen and S. Ludke, Two algorithms for the threedimensional reconstruction of tomograms Contouring Scaler Data 4