Clipping. CSC 7443: Scientific Information Visualization

Similar documents
An Efficient Approach for Emphasizing Regions of Interest in Ray-Casting based Volume Rendering

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

A SYSTEMATIC APPROACH TO MULTIPLE DATASETS VISUALIZATION OF SCALAR VOLUME DATA

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

Visualization. CSCI 420 Computer Graphics Lecture 26

CS452/552; EE465/505. Clipping & Scan Conversion

First Steps in Hardware Two-Level Volume Rendering

2D rendering takes a photo of the 2D scene with a virtual camera that selects an axis aligned rectangle from the scene. The photograph is placed into

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

CS GPU and GPGPU Programming Lecture 2: Introduction; GPU Architecture 1. Markus Hadwiger, KAUST

C P S C 314 S H A D E R S, O P E N G L, & J S RENDERING PIPELINE. Mikhail Bessmeltsev

Introduction to 3D Graphics

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

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

Applications of Explicit Early-Z Culling

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

Rasterization Overview

Chapter 5. Projections and Rendering

Real-Time Non- Photorealistic Rendering

Scalar Data. CMPT 467/767 Visualization Torsten Möller. Weiskopf/Machiraju/Möller

FROM VERTICES TO FRAGMENTS. Lecture 5 Comp3080 Computer Graphics HKBU

Lecture notes: Object modeling

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

Ray Casting on Programmable Graphics Hardware. Martin Kraus PURPL group, Purdue University

9. Three Dimensional Object Representations

CS 354R: Computer Game Technology

Practical Shadow Mapping

Direct Rendering of Trimmed NURBS Surfaces

Werner Purgathofer

Computer Graphics Ray Casting. Matthias Teschner

CHAPTER 1 Graphics Systems and Models 3

Interpolation using scanline algorithm

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

CIS 467/602-01: Data Visualization

Chapter 24. Creating Surfaces for Displaying and Reporting Data

Models and The Viewing Pipeline. Jian Huang CS456

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

Triangle Rasterization

Real Time Reflections Han-Wei Shen

Graphics and Interaction Rendering pipeline & object modelling

CEng 477 Introduction to Computer Graphics Fall 2007

Shadow Algorithms. CSE 781 Winter Han-Wei Shen

Realtime 3D Computer Graphics Virtual Reality

COMPUTER GRAPHICS COURSE. Rendering Pipelines

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

Visualization Computer Graphics I Lecture 20

Overview. Pipeline implementation I. Overview. Required Tasks. Preliminaries Clipping. Hidden Surface removal

Computergrafik. Matthias Zwicker. Herbst 2010

From Vertices To Fragments-1

Overview. By end of the week:

Deferred Rendering Due: Wednesday November 15 at 10pm

Data Visualization (CIS/DSC 468)

Isosurface Rendering. CSC 7443: Scientific Information Visualization

4.5 VISIBLE SURFACE DETECTION METHODES

Hidden Surface Removal

9. Visible-Surface Detection Methods

Data Visualization (DSC 530/CIS )

Topics and things to know about them:

Rendering If we have a precise computer representation of the 3D world, how realistic are the 2D images we can generate? What are the best way to mode

Clipping. Angel and Shreiner: Interactive Computer Graphics 7E Addison-Wesley 2015

3D Graphics for Game Programming (J. Han) Chapter II Vertex Processing

Data Visualization (DSC 530/CIS )

CS 381 Computer Graphics, Fall 2012 Midterm Exam Solutions. The Midterm Exam was given in class on Tuesday, October 16, 2012.

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

Advanced 3D-Data Structures

Previously... contour or image rendering in 2D

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

CS4620/5620: Lecture 14 Pipeline

Scientific Visualization. CSC 7443: Scientific Information Visualization

Notes on Assignment. Notes on Assignment. Notes on Assignment. Notes on Assignment

Perspective Mappings. Contents

Lecture 4. Viewing, Projection and Viewport Transformations

Adaptive Point Cloud Rendering

Sculpting 3D Models. Glossary

Graphics for VEs. Ruth Aylett

Volume Rendering with libmini Stefan Roettger, April 2007

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

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

CS602 MCQ,s for midterm paper with reference solved by Shahid

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

3D Object Representation

8. Hidden Surface Elimination

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

3/29/2016. Applications: Geology. Appliations: Medicine. Applications: Archeology. Applications: Klaus Engel Markus Hadwiger Christof Rezk Salama

INF3320 Computer Graphics and Discrete Geometry

Computer Graphics (CS 543) Lecture 10: Soft Shadows (Maps and Volumes), Normal and Bump Mapping

Spring 2009 Prof. Hyesoon Kim

Orthogonal Projection Matrices. Angel and Shreiner: Interactive Computer Graphics 7E Addison-Wesley 2015

CSE528 Computer Graphics: Theory, Algorithms, and Applications

Advanced Lighting Techniques Due: Monday November 2 at 10pm

Three Main Themes of Computer Graphics

CS451Real-time Rendering Pipeline

TSBK03 Screen-Space Ambient Occlusion

Einführung in Visual Computing

Scalar Algorithms: Contouring

Chapter IV Fragment Processing and Output Merging. 3D Graphics for Game Programming

1.2.3 The Graphics Hardware Pipeline

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

CS 130 Final. Fall 2015

Transcription:

Clipping

Clipping to See Inside Obscuring critical information contained in a volume data Contour displays show only exterior visible surfaces Isosurfaces can hide other isosurfaces Other displays can become crowded and complicated Clipping: remove a part of a volume to observe the rest of its contents cut away part of a volume to see what is behind it intersection between a slicing plane and a volume dataset also intersection of any surface with a volume dataset Different approaches: Planar clipping Interactive clipping Volume clipping

Planar Clipping A 3D model is cut by a clip or slicing plane It is performed by evaluating each volume element against the boundary of the half-space If inside the half-space, display the element If outside the half-space, discard the element If partially contained in the half-space, check and display the face of the element If a face is partially contained in the half-space, test for subpolygons

Clipping with Caping Clip the model with a display of the scalar result on the clip surface The caped surfaces are produced by generating additional display polygons for each volume element in the cutting region Clipping alone can be performed in graphics hardware Polygon clipping on a polygon-by-polygon basis in hardware Capping must be performed in the software Requires knowledge of the entire volume element to interpolate vertex values to form the capping polygon and its scalar values

Sampling Planes Combining two or more volume slicing operations with a wire-frame outline of the model Allows a simultaneous display of scalar results at multiple locations within the volume z y x Variation along y-axis

Interactive Clipping A planar clipping used in an interactive manner Once the clip plane is defined, it s position and orientation can be changed in real time in order to cut away the given volume at any orientation and any position. Clip plane equation = Ax + By + Cz + D = 0 All points with eye coordinates (x e, y e, z e, w e ) that satisfy (A B C D)M -1 (x e, y e, z e, w e ) T >= 0 lie in the half-space defined by the plane, where M is the current model-view matrix. All points not in this half-space are clipped away. Initial plane is parallel to the z-axis: A = y 2 - y 1 ; B = -(x 2 x 1 ); C = 0; D = 0 Coefficients A, B and C control rotation of the clip plane in a 3D space whereas the coefficient D controls translation.

Best-View Mode Dynamic manipulation of the clip plane Small effective visible area of the clipped surface Done in low-resolution mode for interactivity Bringing to the best-view mode Clipped surface at its maximum exposure Rendering at high resolution Automated option for best-view mode Tracking all transformations the clip plane has gone through Simple case of initial xy plane setting: First rotation about z-axis Second rotation about the vector which is defined by the intersection of the clip and xy planes.

Rendering Texture-based volume rendering A stack of 2D textures (generated form the input data or images) Multi-resolution rendering High-resolution (HR) mode The original fine grid of the input data or the original resolution of the input images Low-resolution (LR) mode The re-sample data at a lower resolution than the original resolution Rendering speed LR gives a much better frame rate but HR retains complete information contained in the data. Interactivity Navigate through the volume data in LR and switch to HR for quality

Flow Diagram

Charge Density Quantum mechanical simulations MgO system 64 atoms and 864 electrons Data defined on 512 3 regular grid HR rendering (bottom) 512 textures each with 512x512 pixel; 4 frames per seconds clipped surface LR rendering (top) 128 textures at 128x128 resolution 35 frames per second Electrons are depleted from blue regions whereas electrons are deposited in red regions due to a vacancy defect located at the center of the system.

Confocal Data Confocal data: Tissues of a plant stem A series of tiff images HR rendering (bottom) 200 textures each with 512x512 pixel; 0.6 frames per seconds clipped surface LR rendering (top) 50 textures at 128x128 resolution 28 frames per second Twenty-five images (each with 512 x 512 pixels) were replicated to generate 200 images used in HR.

Volume Clipping Using complex geometries for volume clipping Cutting a cube-shaped opening into a volume Segmentation information used for defining curved clip geometries Isosurface as clip object Surface of a body in fluid dynamics Clipping tailored to texture-based rendering on graphics hardware Use per-fragment operations Give interactivity (high frame rates) Two clipping techniques Depth-based clipping Voxelized clip object

Depth-Based Clipping Depth structure of a clip object Clip geometry represented as a tessellated boundary surface in the form of triangular meshes Graphics hardware allows manipulation of depth values To clip away unwanted parts of the volume Produces high-quality images Uses 2D textures with texels having a one-to-one correspondence to pixels Clipping is performed with per-pixel accuracy

Building Depth Structure Define depth structure (1 D representation) of a clip object for a single pixel in the frame buffer Consider a single ray from eye point to the scene Apply operations on those fragments that correspond to the respective position of the pixel in the frame buffer Build the depth structure per pixel basis Stores the depth values for each boundary between object and background space Classify intervals as inside or as outside of the clip object and specify them as visible or invisible Rendering of each fragment of a volume slice has to check to which class of interval the fragment belongs Based on visibility property, the fragment is blended into the frame buffer or clipped away.

Implementation Issues Depth structure stored on a per-pixel basis Exploits the depth buffer to store interval boundaries Only a single boundary can be implemented because only one depth value can be stored per pixel Depth test to decide the visibility property of a fragment less - clip away the volume behind the geometry greater - clip away the volume in front of the clip geometry Implementation with OpenGL How to handle multiple depth values corresponding to a pixel

Volume Probing Depth structure with two boundaries (for convex clip geometry) Depth tests, depth clipping, and depth computations in the fragment-operations unit Volume probing: Leaves visible only the volume inside the clip object Basic algorithm Determine z front by rendering the front faces of the clip geometry into the depth buffer The contents of the depth buffer are stored in a texture and are later used to shift the depth values of all fragments in the following rendering passes by - z front The depth buffer is cleared and the backside of the clip geometry is rendered into the depth buffer (with depth shift enabled) to build the secondary boundary. Slices through the volume data set are rendered and blended into the frame buffer. Depth shift and depth testing are enabled, but the depth buffer is not modified.

Probe Depth Function How the depth of a fragment determines its visibility Define a boolean function to determine whether a fragment f (with depth value z f ) passes depth clipping and depth testing: d f (z f ) = d clip (z f ) (z f op z b ) Where d clip (z f ) = (z f 0) (z f 1) defines depth clipping against the bounds 0 and 1 of the view frustum. z b is the current entry in the depth buffer. With shift of -z front applied to all subsequent depth values d f (z f ) = d probe (z f ) (z f 1+ z front ) where d probe (z f ) = (z f z front ) (z f z back ) represents the logical operation for displaying the volume only in the interval [z front, z back ]

Shader Program Render frontfaces of the clip geometry to get z front depth values Transform the contents of the depth buffer to main memory as 32 bit unsigned integers per depth value z front Define HILO texture object (a 2D texture consisting of two 16 bit unsigned integers per pixel) Enable a texture shader program to replace z value of a fragment by z-z front DotProductDepthReplace fragment operation Perform a texture look up in HILO texture Compute dot products, Z and W, between respective texture coordinates and previously fetched values from HILO Replace the current fragment s depth by Z/W

Volume Cutting Only the volume outside the clip object remains visible Invert the role of visibility property Logical operation for volume cutting: d cutting (z f ) = (z f z front ) (z f z back ) Inverse depth function: g(z) = 1 2 z scale z z mid + 1 2 z scale = z back z front 2 z mid = z back + z front 2 Karki, Spring 2004

Clipping Based on Volumetric Textures Clip object is voxelized and represented by an additional volume data Uses a second volumetric texture to specify clipping voxels of the real volume any arbitrary objects (convex or concave) Store voxelized clip geometry as a binary volume Voxel inside (1) or outside (0) the clip geometry Rendering maps a texture slice of the data set and a slice of the clip texture onto the same slice polygon Two textures are combined using a per-component multiplication All voxels to be clipped are multiplied by zero and completely discarded The clip object can be rotated or translated by applying any affine transformation to texture coordinates. A change in volume probing and volume cutting by applying a per-fragment invert mapping to the clipping textures.

Clipped Volume Images (size = 128 3 ) Frame rates: 24.1 (no clipping), 15.8 (voxelized clip) and 8.2 (depth-based clip) foe window display size of 512 2. a, e: NN sampling b,f: trilinear interpolation c,g: depth-based

References G. Khanduja and B.B. Karki, Visualization of 3D scientific datasets based on interactive clipping, The 13th Int l. Conf. on Central Europe in Computer Graphics, Visualization and Computer Vision (WSCG 05), ISBN 80-903100-9-5, pp. 34 37, 2005. M. Weiler, R. Westermann, C. Hansen, K. Zimmerman, and T.Erl. Level-of-detail volume rendering via 3D textures. In Proceedings of IEEE Volume Visualization 2000, pp. 7-13, 2000. D. Weiskopf, K. Engel and T. Ertl. Volume clipping via per-fragment operations in texture-based volume visualization, IEEE Visualization 2002 Proceedings, pp. 93-100, ACM Press, 2002 D. Weiskopf, K. Engel, and T. Ertl Interactive clipping techniques for texture-based volume visualization and volume shading. IEEE Trans. on Visualization and Computer Graphics, 9, 298-312 2003.