Visualization and Nonphotorealistic Rendering Adrien Treuille Carnegie Mellon Universtiy Saturday, February 27, 2010
Outline • Visualization • Non-photorealistic Rendering • Cutaway Illustration • Contour Drawing • Good photographs. • Map Drawing • Painting Saturday, February 27, 2010
Outline • Visualization • Non-photorealistic Rendering • Cutaway Illustration • Contour Drawing • Good photographs. • Map Drawing • Painting Saturday, February 27, 2010
Visualization • Goal: Use computer graphics to understand data. • For virtual every data type there is a corresponding visualization. • The importance of graphics! http://medvis.vrvis.at/fileadmin/hvr/images/headlarge.jpg Saturday, February 27, 2010
Numerical Data http://www.manifold.net/news/fly_through.jpg Saturday, February 27, 2010
Graphs http://www.wandora.org/wandora/wiki/images/Tree_graph_example.gif Saturday, February 27, 2010
Graphs http://www.designinginteractions.com/chapters/7 Saturday, February 27, 2010
Geographic Data http://flowingdata.com/wp-content/plugins/yet-another-photoblog/cache/g_econ.6zhzwniskpgcwwgs00okoco4s.7dm680981og04ocskgcsckco4.th.jpeg Saturday, February 27, 2010
Flow Visualization http://www.faculty.iu-bremen.de/llinsen/publications/ParkYuHotzKreylosLinsenHamann06.jpg Saturday, February 27, 2010
3D Volume Data http://medvis.vrvis.at/fileadmin/hvr/images/headlarge.jpg Saturday, February 27, 2010
Example Saturday, February 27, 2010
Volume Rendering • Visualize Large dataset for scienti fi c / medical application. • Generally do not start with a 3D model. INPUT CT Scan - White means higher radiodensity. OUTPUT Saturday, February 27, 2010
Data Format • A cube of density values. Saturday, February 27, 2010
Large Datasets INPUT CT Scan - White means higher radiodensity. OUTPUT : I R M B M r 0 o 5 • T ≈ C 0 0 2 × 2 1 5 × 2 1 5 • . g . e : n a m u H e B l M b • i 3 s 3 i V 4 ≈ 4 3 7 1 × 2 1 5 × 2 • 1 5 Saturday, February 27, 2010
Two Options • Surface Rendering • Volume Rendering Saturday, February 27, 2010
Two Options • Surface Rendering • Volume Rendering Saturday, February 27, 2010
Surface Rendering • Threshold volume data. • Then run our favorite algorithm.... • Hint: rhymes with “starching dudes” Saturday, February 27, 2010
Two Options • Surface Rendering • Volume Rendering Saturday, February 27, 2010
Two Options • Surface Rendering • Volume Rendering Saturday, February 27, 2010
Volume Rendering • Some data better visualized as a volume, not a surface. • Idea: Use voxels and transparency. Raytraced Volume Isosurface Rendering Saturday, February 27, 2010
Volume Rendering Pipeline Volume Rendering Pipeline • Data volumes come in all types: tissue density (CT), wind speed, pressure, temperature, value of implicit function. • Data volumes are used as input to a transfer function, which produces a sample volume of colors and opacities as output. – Typical might be a 256x256x64 CT scan • That volume is rendered to produce a final image. Transfer function Rendering Data sets Sample Volume Image Saturday, February 27, 2010
Transfer Functions Transfer Functions • Transform scalar data values to RGBA values • Apply to every voxel in volume • Highly application dependent • Start from data histogram Saturday, February 27, 2010
Transfer Function Example Transfer Function Example Mantle Convection Scientific Computing and Imaging (SCI) University of Utah Saturday, February 27, 2010
Three Options • Ray Casting • Splatting • 3D Textures Draw back to front Saturday, February 27, 2010
Three Options • Ray Casting • Splatting • 3D Textures Draw back to front Saturday, February 27, 2010
Volume Ray Casting Volume Ray Casting • Ray Casting – Integrate color and opacity along the ray – Simplest scheme just takes equal steps along ray, sampling opacity and color – Grids make it easy to find the next cell Saturday, February 27, 2010
Trilinear Interpolation Trilinear Interpolation • Interpolate to compute RGBA away from grid • Nearest neighbor yields blocky images • Use trilinear interpolation • 3D generalization of bilinear interpolation Nearest neighbor Trilinear interpolation Saturday, February 27, 2010
Trilinear Interpolation Trilinear Interpolation Bilinear interpolation Trilinear interpolation Saturday, February 27, 2010
Three Options • Ray Casting • Splatting • 3D Textures Draw back to front Saturday, February 27, 2010
Three Options • Ray Casting • Splatting • 3D Textures Draw back to front Saturday, February 27, 2010
Splatting Splatting • Alternative to ray tracing • Assign shape to each voxel (e.g., sphere or Gaussian) • Project onto image plane (splat) • Draw voxels back-to-front • Composite (a-blend) Saturday, February 27, 2010
Example Saturday, February 27, 2010
Three Options • Ray Casting • Splatting • 3D Textures Draw back to front Saturday, February 27, 2010
Three Options • Ray Casting • Splatting • 3D Textures Draw back to front Saturday, February 27, 2010
3D Textures 3D Textures • Alternative to ray tracing, splatting • Build a 3D texture (including opacity) • Draw a stack of polygons, back-to-front • Efficient if supported in graphics hardware • Few polygons, much texture memory 3D RGBA texture Viewpoint Draw back to front Saturday, February 27, 2010
Three Options • Ray Casting • Splatting • 3D Textures Draw back to front Saturday, February 27, 2010
Three Options • Ray Casting • Splatting • 3D Textures Draw back to front Saturday, February 27, 2010
Two Options • Surface Rendering • Volume Rendering Saturday, February 27, 2010
Two Options • Surface Rendering • Volume Rendering Saturday, February 27, 2010
Visualization Saturday, February 27, 2010
Outline • Visualization • Non-photorealistic Rendering • Cutaway Illustration • Contour Drawing • Good photographs. • Map Drawing • Painting Saturday, February 27, 2010
Basic Idea • Which best conveys “reality?” Photograph. Painting. Computer Graphics A Rough Sea at a Jetty, 1650. Duncan Brinsmead Jacob van Ruysdael. source: Jos Stam. Photography changes what we think “reality” looks like. Saturday, February 27, 2010
Reality A Rough Sea at a Jetty, 1650. - Jacob van Ruysdael. • This instance in time never happened! • Perhaps a better match of “subjective reality.” • Better illustration of “what was going on.” Saturday, February 27, 2010
NPR Text • Perhaps we can do better graphics... • By doing non-photorealistic graphics ! A Rough Sea at a Jetty, 1650. - Jacob van Ruysdael. • This instance in time never happened! • Perhaps a better match of “subjective reality.” • Better illustration of “what was going on.” Saturday, February 27, 2010
NPR Pipeline • NPR Research often follows this pipeline... parameter space model space model space cutting volume w cutting volume cutting volume max extents max extents u 1 (a) Object- aligned 0 v’ box cut 1 w’ u’ parameter space 1 cutting volume u’ v u (b) 1 Transverse tube cut 0 w v’ u u’ (c) 1 Wedge tube cut w’ 0 1 2 ! u’ v u (d) 1 Freeform window cut 0 u (b) Thorax 1 (e) v’ 0 Four-sided window cut 1 u’ v http://www.ohsu.edu/library/hom/exhibits/exhimages/200706anatomy/bEf1a5.jpg Parameter space Model space (1) Study Existing (2) Extract General (3) “Algorithmicize” Rendering or Aesthetic Rules These Rules Illustration Technique Saturday, February 27, 2010
Outline • Visualization • Non-photorealistic Rendering • Cutaway Illustration • Contour Drawing • Good photographs. • Map Drawing • Painting Saturday, February 27, 2010
Goal Saturday, February 27, 2010
Box Cut Saturday, February 27, 2010
Box Cut Saturday, February 27, 2010
Window Cut Saturday, February 27, 2010
Window Cut Saturday, February 27, 2010
Wedge Cut Saturday, February 27, 2010
Wedge Cut Saturday, February 27, 2010
Transverse Tube Cut Saturday, February 27, 2010
Transverse Tube Cut Saturday, February 27, 2010
Cut Taxonomy parameter space model space model space cutting volume w cutting volume cutting volume max extents max extents u 1 (a) Object- aligned v’ 0 box cut 1 w’ u’ parameter space 1 cutting volume u’ v u (b) 1 Transverse tube cut 0 w v’ u u’ (c) 1 Wedge tube cut w’ 0 1 2 ! u’ v u (d) 1 Freeform window cut 0 u 1 (e) v’ 0 Four-sided window cut 1 u’ v Parameter space Model space Saturday, February 27, 2010
Results (Source: Li et al. InteractiveCutawayIllustrationsofComplex3DModels) Saturday, February 27, 2010
Outline • Visualization • Non-photorealistic Rendering • Cutaway Illustration • Contour Drawing • Good photographs. • Map Drawing • Painting Saturday, February 27, 2010
Recommend
More recommend