Visualizer An implicit surface rendering application

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

CHAPTER 1 Graphics Systems and Models 3

Volume Illumination, Contouring

Interactive Computer Graphics A TOP-DOWN APPROACH WITH SHADER-BASED OPENGL

Previously... contour or image rendering in 2D

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

Computer Graphics Ray Casting. Matthias Teschner

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

Topics and things to know about them:

Volume Illumination & Vector Field Visualisation

Ray Tracing. Kjetil Babington

Scalar Algorithms: Contouring

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

Graphics for VEs. Ruth Aylett

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

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

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

Recollection. Models Pixels. Model transformation Viewport transformation Clipping Rasterization Texturing + Lights & shadows

Computer Graphics I Lecture 11

Introduction to Visualization and Computer Graphics

Isosurface Rendering. CSC 7443: Scientific Information Visualization

SAMPLING AND NOISE. Increasing the number of samples per pixel gives an anti-aliased image which better represents the actual scene.

CS 130 Exam I. Fall 2015

Applications of Explicit Early-Z Culling

Computer Graphics Lecture 11

BCC Sphere Transition

Rasterization Overview

Pipeline Operations. CS 4620 Lecture 10

CS 130 Final. Fall 2015

Texture-Mapping Tricks. How Bad Does it Look? We've Seen this Sort of Thing Before. Sampling Texture Maps

Topic 12: Texture Mapping. Motivation Sources of texture Texture coordinates Bump mapping, mip-mapping & env mapping

Topic 11: Texture Mapping 11/13/2017. Texture sources: Solid textures. Texture sources: Synthesized

CS 4620 Midterm, March 21, 2017

Interpolation using scanline algorithm

Introduction to 3D Graphics

Pipeline Operations. CS 4620 Lecture Steve Marschner. Cornell CS4620 Spring 2018 Lecture 11

Computer Graphics. Si Lu. Fall uter_graphics.htm 11/22/2017

Computer Graphics. Lecture 13. Global Illumination 1: Ray Tracing and Radiosity. Taku Komura

Opaque. Flowmap Generator 3

Topic 11: Texture Mapping 10/21/2015. Photographs. Solid textures. Procedural

Indirect Volume Rendering

CPSC GLOBAL ILLUMINATION

Deferred Rendering Due: Wednesday November 15 at 10pm

Efficient Rendering of Glossy Reflection Using Graphics Hardware

Pipeline Operations. CS 4620 Lecture 14

Data Visualization (CIS/DSC 468)

Graphics for VEs. Ruth Aylett

INTERACTIVE ENVIRONMENT FOR INTUITIVE UNDERSTANDING OF 4D DATA. M. Murata and S. Hashimoto Humanoid Robotics Institute, Waseda University, Japan

Data Representation in Visualisation

CS 130 Exam I. Fall 2015

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

Virtual Environments

Course Review. Computer Animation and Visualisation. Taku Komura

CIS 467/602-01: Data Visualization

COMP environment mapping Mar. 12, r = 2n(n v) v

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

Lighting. To do. Course Outline. This Lecture. Continue to work on ray programming assignment Start thinking about final project

Fog and Cloud Effects. Karl Smeltzer Alice Cao John Comstock

Ray Tracing. Foley & Van Dam, Chapters 15 and 16

CS5620 Intro to Computer Graphics

Models and Architectures

Ray Tracing. CSCI 420 Computer Graphics Lecture 15. Ray Casting Shadow Rays Reflection and Transmission [Ch ]

Visualization Computer Graphics I Lecture 20

Ray Tracing Foley & Van Dam, Chapters 15 and 16

Photorealism: Ray Tracing

Scalar Visualization

GLOBAL EDITION. Interactive Computer Graphics. A Top-Down Approach with WebGL SEVENTH EDITION. Edward Angel Dave Shreiner

Data Visualization (DSC 530/CIS )

Computer Graphics: Programming, Problem Solving, and Visual Communication

Other Rendering Techniques CSE 872 Fall Intro You have seen Scanline converter (+z-buffer) Painter s algorithm Radiosity CSE 872 Fall

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

Models and Architectures. Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico

Overview. A real-time shadow approach for an Augmented Reality application using shadow volumes. Augmented Reality.

Recursion and Data Structures in Computer Graphics. Ray Tracing

03 RENDERING PART TWO

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

Interactive Methods in Scientific Visualization

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.

Adaptive Point Cloud Rendering

Computer Graphics. - Texturing Methods -

Data Visualization (DSC 530/CIS )

COMP371 COMPUTER GRAPHICS

So far, we have considered only local models of illumination; they only account for incident light coming directly from the light sources.

CSE528 Computer Graphics: Theory, Algorithms, and Applications

Real-Time Shadows. Computer Graphics. MIT EECS Durand 1

Intersection Acceleration

Introduction Ray tracing basics Advanced topics (shading) Advanced topics (geometry) Graphics 2010/2011, 4th quarter. Lecture 11: Ray tracing

Image Morphing. The user is responsible for defining correspondences between features Very popular technique. since Michael Jackson s clips

Local Illumination. CMPT 361 Introduction to Computer Graphics Torsten Möller. Machiraju/Zhang/Möller

The Traditional Graphics Pipeline

Ray tracing. Computer Graphics COMP 770 (236) Spring Instructor: Brandon Lloyd 3/19/07 1

Ray Tracing. CS334 Fall Daniel G. Aliaga Department of Computer Science Purdue University

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

CS-184: Computer Graphics. Administrative

Advanced Ray Tracing

Shadow Rendering EDA101 Advanced Shading and Rendering

Rendering. Illumination Model. Wireframe rendering simple, ambiguous Color filling flat without any 3D information

Photorealistic 3D Rendering for VW in Mobile Devices

Definitions. Modeling. Primitives. Creating a model of an object, usually out of a collection of simpler primitives

Transcription:

June 01, 2004 Visualizer An implicit surface rendering application Derek Gerstmann - C1405511 MSc Computer Animation NCCA Bournemouth University

OVERVIEW OF APPLICATION Visualizer is an interactive application capable of rendering implicit models, including both surfaces and volumes. There are two polygonizing methods (marching cubes, and marching tetrahedrons) which can be used to construct a geometric representation, in addition to a scanline raytracer, and a renderer for hypertextures. FIGURE 1 Visualizer running in marching tetrahedral polygonizatoin mode (DG). The following sections detail the various aspects of the application, including insights into it's design and the development, as well as the fundamentals behind the algorithms used.

FIGURE 2 Visualizer running in hypertexture visualization mode (DG). FEATURES AND USAGE Visualizer was designed as a simple graphical application, and uses a single window as the basis for it's interaction. After loading, the application selects a random implicit function and enters into the marching tetrahedron visualization mode. At this point, the application generates a geometric model, and shades it with standard specular shading. The default state is animated, and the geometric model will be continually re-polygonized at new positions in space. This mode can be toggled by hitting the 'm' key.

FIGURE 3 Visualizer running in ray traced visualization mode (errors due to undersampling!) (DG). The view within the main window can also be modified, allowing the user to rotate about the object and reveal a different section by rotating the object about it's primary axes. This is enabled by clicking in the main window and dragging the mouse. In additon, the default orthographic project can be switched to a fixed perspective view with a 45 degree fov by hitting the 'p' key. In this mode, the camera can be moved closer or farther away from the discretized volume by hitting the 'w' and 's' keys, respectively. In addition to the mouse movements, a set of keyboard shortcuts provide the user with access to other commands. These are outline in

the table below. Keyboard Shortcut Command 'i' Toggle info display on/off (HUD) 'b' Toggle Bounding Box on/off 'j' Toggle Hypertexture spherical fadeout. This has the effect of diminishing the density of the volume as it approaches a fixed radius, thus fading it out. 'k' Toggle Hypertexture keep in view. This will restrict the evaluation of the hypertexture to a spherical region located directly in front of the camera. '+/-' Increase/Decrease the resolution. The effect of the resolution varies depending on the visualization. For polygonizers, it increases the cell count for discretization, for ray tracing, it increases the sample rays, and for hypertexture, it descreases the step size for ray marching. 'e' Toggle Hypertextue visualization mode. 'r' Toggle RayTraced visualization mode. 't' Toggle Marching Tetrahedron polygonization and visualization mode. 'y' Toggle Marching Cubes polygonization and visualization mode. '[' ']' Scale the visualization up/down. 'n' Toggle color by normals, or standard opengl shading. 'l' Toggle wireframe rendering mode. 'f' Select a new random implicit function. Note that the implicit functions for polygonization and raytracing differ from the density functions for hypertexture. 'w' Increase the camera's position in Z. 's' Decrease the camera's position in Z. 'm' Toggle animation.

Keyboard Shortcut Command PAGE UP/PAGE DOWN Increase/Decrease IsoSurface level. Only applicable for polygonization. HOME/END Increase/Decrease Function Offset in Z. UP/DOWN Increase/Decrease Function Offset in Y. LEFT/RIGHT Increase/Decrease Function Offset in X. FEATURES AND USAGE To maintain platform independence, the application was designed modularly and with a general focus on abstract layers which allowed specific platform implementations to be written for various modules as needed. The core algorithms were based on existing work, with major contributions from Jules Bloomenthal and Paul Bourke for the polygonization, and Ken Perlin and Eric Heffert, as well as Larry Gritz for the ray tracing and raymarching. Additional influences for the design were based on the software engineering elements presented by David Eberly. The entire application was written in C++, and relies upon the OpenGL Utility Toolkit (GLUT) for the user interface. This reliance is only particular for this implementation, and the system was designed such that a different rendering component could be used. POLYGONIZATION The basic Marching Cubes polygonization relies on using precomputed look up tables to discretise a grid of values, based on their intersections with unit sized cubes.

Each possible state for every slice of a polygon can be determined by the whether a set of vertices pass through an edge. This information can in turn be used to index into a geometry table describing the connections of a cube to perform the reconstruction. FIGURE 4 Basic indexing convention for cube marching an iso-surface (Bourke). The tetrahedral polygonization is performed in exactly the same manner, except it splits a single cube into six tetrahedrons, and then uses the vertex positions and their relationship with the edges on a tetrahedron to determine index coordinates to create geometry.

FIGURE 5 Tetrahedral decomposition of a unit cell and corresponding indexing convention (Bourke). RAYTRACING AND HYPERTEXTURE Since by definition hypertexture is a volumetric phenomena, it requires a volumetric rendering algorithm, which is a computationally expensive process. Visualizer uses a ray marching ray tracer, which steps from front to back along each ray from the eye until total opacity is reached or the ray reaches a far clipping plane (Ebert et al, pg 349). The basic algorithm is outlined in the following table. This volumetric algorithm was then simplified to produce a standard ray traced visibility determination of an implicit. The surface was reconstructed by doing a simple bisection of the evaluation space and determining points of intersection.

The basic ray marching algorithm: Calculate a starting position Determine a starting segment to ray trace through While( current position is less than end position ) Calculate the density at current position Calculate the light intersection point Calculate the opacity and color at current position Accumulate the current opacity and color Increment current position and setup for next iteration End Assign the final color from accumulated color and opacity FIGURE 4 Basic ray marching algorithm (Apodaca, pg 416). The first step to starting the ray march is calculating a starting position. The initial camera direction is used to fire a ray into the volume starting from the near clip plane and determine points of intersection within a bounding sphere, if they exist. Once an initial intersection point is determined, a ray march can begin along the viewing direction. FIGURE 5 Determining intersection points along an incident ray (DG).

This is the technique employed by Perlin and Heffert, who used a fixed increment for stepping along the ray segment. In practice, this can lead to artifacts and aliasing due to undersampling if the step size is too small. This is minimized by jittering the initial step size for the ray march with a random offset, allowing small step sizes to be used without drastically reducing the quality of the visual texture. As the ray is traversed, the DMF is sampled and tested. If the value falls within the range 0 < x < 1, the current position lies within the soft region of the hypertexture volume and can be shaded. A base color for the current position can be calculated by either using the density value itself, or using it as a variable to a function which determines an appropriate color value. Other methods for coloring include techniques which are based on position, or normalized surface directions. If shading is required, a gradient direction can be calculated by sampling the DMF at three perpendicular locations within a small epsilon range to determine a normalized surface direction, or normal vector. If shading is not required, the base color can be used. Once a normal vector is determined, it can be used for calculating diffuse and/or specular shading, as well as reflection and refraction within the volume. Typical shading functions include Lambertian (ideal diffuse), and Phong (empirical plastic-like). In order to establish visibility, the opacity of the current position must be determined. This can be calculated using an approximation to atmospheric scattering. Perlin and Heffert derived a volume based function which was dependent on both density and step size. This

also maintains the visual characteristics of the hypertexture when rendered with different step sizes. This is the approach used by Visualizer. The resulting opacity is then applied to the current color value and accumulated. This is applied using traditional compositing methods by using additive blending. Once the accumulation is complete, the final color contribution can be saved along with the alpha transparency, forming the final rendered image. KNOWN ISSUES As of this release, Visualizer has not been rigorously tested. This implies a certain level of instability, and in addition, there are several known issues. Most notably, there are some discrepancies in the camera interpolation, and there are noticeable problems when the camera's near clipping plane gets too close to an object. This only applies to the ray traced and ray marched hypertexture renderers. Additional issues include the inability to cancel a computation once a render has started, as well as some problems with hypertexture saturation.

REFERENCES APODACA, A. A., 2000. Advanced Renderman: Creating CGI for Motion Pictures. Academic Press. BOURKE. P. 2004. Polygonizing iso-surfaces. Available from: http://astronomy.swin.edu.au/~pbourke/modelling [Accessed 1 May 2004]. BLOOMENTHAL J. 1988. Polygonisation of Implicit Surfaces. Computer-Aided Geometric Design, 594) 341-355 EBERT, D., F. K. MUSGRAVE, D. PEACHEY, K. PERLIN, S. WORLEY, W. R. MARK, J. C. HART, 2002. Texturing & Modeling: A Procedural Approach, Third Edition. Morgan Kaufmann. GUEZIEC, A., HUMMEL. 1995. Exploiting Triangulated Surface Extraction using Tetrahedral Decomposition. IEEE Transactions on Visualisation and Computer Graphics, 1 (4) 328-342 LORENSEN, W., CLINE H. 1987. Marching Cubes: A High Resolution 3D Surface Construction Algorithm. Computer Graphics, 21 (4): 163-169 PERLIN, K., HOFFERT E. 1989. Hypertexture, Computer Graphics (proceedings of ACM SIGGRAPH Conference); Vol. 23 No. 3.