Hank Childs, University of Oregon Unstructured Grids.

Slides:



Advertisements
Similar presentations
Lecture 8 Transparency, Mirroring
Advertisements

Hank Childs, University of Oregon Oct. 22 nd, 2014 CIS 441/541: Introduction to Computer Graphics Lecture 7: Arbitrary Camera Positions.
Graphics Pipeline.
Texture Synthesis on [Arbitrary Manifold] Surfaces Presented by: Sam Z. Glassenberg* * Several slides borrowed from Wei/Levoy presentation.
Visualization Data Representation Ray Gasser SCV Visualization Workshop – Fall 2008.
Hank Childs, University of Oregon November 6 th, 2013 Spatial-Based and Variable-Based Selections.
03/12/02 (c) 2002 University of Wisconsin, CS559 Last Time Some Visibility (Hidden Surface Removal) algorithms –Painter’s Draw in some order Things drawn.
Hank Childs, University of Oregon November 15 th, 2013 Volume Rendering, Part 2.
Hank Childs, University of Oregon December 6 th, 2013 Meshes, Fields, and Interpolation, Part 2.
CSE351/ IT351 Modeling And Simulation Choosing a Mesh Model Dr. Jim Holten.
CSE351/ IT351 Modeling and Simulation
Introduction to Volume Visualization Mengxia Zhu Fall 2007.
Status – Week 231 Victor Moya. Summary Primitive Assembly Primitive Assembly Clipping triangle rejection. Clipping triangle rejection. Rasterization.
1 CS 201 Passing Function as Parameter & Array Debzani Deb.
Sorting and cell compositing for irregular meshes Nelson Max, Peter Williams, Richard Cook, Claudio Silva.
Paper by Alexander Keller
ITUppsala universitet Data representation and fundamental algorithms Filip Malmberg
CS 4731: Computer Graphics Lecture 17: Texturing Emmanuel Agu.
Computer Graphics Inf4/MSc Computer Graphics Lecture 11 Texture Mapping.
Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College.
Hidden Surface Removal
Erdem Alpay Ala Nawaiseh. Why Shadows? Real world has shadows More control of the game’s feel  dramatic effects  spooky effects Without shadows the.
1 Computer Graphics Week13 –Shading Models. Shading Models Flat Shading Model: In this technique, each surface is assumed to have one normal vector (usually.
In the name of God Computer Graphics Modeling1. Today Introduction Modeling Polygon.
COMP 175: Computer Graphics March 24, 2015
3/4/04© University of Wisconsin, CS559 Spring 2004 Last Time Clipping Lines –Cohen-Sutherland: The use of outcodes and early reject/accept tests –Liang-Barsky:
Lecture 3 : Direct Volume Rendering Bong-Soo Sohn School of Computer Science and Engineering Chung-Ang University Acknowledgement : Han-Wei Shen Lecture.
CS 6825: Binary Image Processing – binary blob metrics
Marching Cubes: A High Resolution 3D Surface Construction Algorithm William E. Lorenson Harvey E. Cline General Electric Company Corporate Research and.
Geometry Images Xiang Gu Harvard University Steven J. Gortler Harvard university Hugues Hoppe Microsoft Research Some slides taken from Hugues Hoppe.
Unstructured Volume Rendering Jian Huang, CS 594, Spring 2002 This set of slides reference slides developed by Prof. Torsten Moeller, SFU, Canada.
Hank Childs, University of Oregon October 3, 2014 CIS 441/541: Intro to Computer Graphics Lecture 2: The Scanline Algorithm.
03/24/03© 2003 University of Wisconsin Last Time Image Based Rendering from Sparse Data.
CS-378: Game Technology Lecture #4: Texture and Other Maps Prof. Okan Arikan University of Texas, Austin V Lecture #4: Texture and Other Maps.
2D Output Primitives Points Lines Circles Ellipses Other curves Filling areas Text Patterns Polymarkers.
Hank Childs, University of Oregon Oct. 10, 2014 CIS 441/541: Introduction to Computer Graphics Lecture 4: Interpolating Colors and the Z-buffer.
Hank Childs, University of Oregon Lecture #6 CIS 410/510: Advection (Part 1)
Hank Childs, University of Oregon Lecture #4 Fields, Meshes, and Interpolation (Part 3)
Hank Childs, University of Oregon Lecture #3 Fields, Meshes, and Interpolation (Part 2)
CSE554ContouringSlide 1 CSE 554 Lecture 4: Contouring Fall 2015.
Advanced Computer Graphics Spring 2014 K. H. Ko School of Mechatronics Gwangju Institute of Science and Technology.
Hank Childs, University of Oregon Lecture #10 CIS 410/510: Isosurfacing.
Hank Childs, University of Oregon Lecture #2 Fields, Meshes, and Interpolation (Part 1)
Hank Childs, University of Oregon Lecture #9 CIS 410/510: Advection (Part 4!)
Hank Childs, University of Oregon Isosurfacing (Part 3)
Hank Childs, University of Oregon Volume Rendering, Part 3.
Hank Childs, University of Oregon Large Data Visualization.
Hank Childs, University of Oregon Volume Rendering, pt 1.
Real-Time Relief Mapping on Arbitrary Polygonal Surfaces Fabio Policarpo Manuel M. Oliveira Joao L. D. Comba.
2D Output Primitives Points Lines Circles Ellipses Other curves Filling areas Text Patterns Polymarkers.
What are shaders? In the field of computer graphics, a shader is a computer program that runs on the graphics processing unit(GPU) and is used to do shading.
Shadows David Luebke University of Virginia. Shadows An important visual cue, traditionally hard to do in real-time rendering Outline: –Notation –Planar.
CDS 301 Fall, 2008 Domain-Modeling Techniques Chap. 8 November 04, 2008 Jie Zhang Copyright ©
Solid Modeling Dr. Scott Schaefer.
Computer Graphics Lecture 08 Taqdees A. Siddiqi Computer Graphics Filled Area Primitives I Lecture 08 Taqdees A. Siddiqi
A novel approach to visualizing dark matter simulations
Hank Childs, University of Oregon Oct. 28th, 2016 CIS 441/541: Introduction to Computer Graphics Lecture 16: textures.
Model Optimization Wed Nov 16th 2016 Garrett Morrison.
Visualization Fundamentals
Hank Childs, University of Oregon
Week 2 - Friday CS361.
CIS 410/510: Isosurfacing (pt 2)
Hank Childs, University of Oregon
Hank Childs, University of Oregon
Hank Childs, University of Oregon
Hank Childs, University of Oregon
Lecture 13 Clipping & Scan Conversion
Graphs Part 2 Adjacency Matrix
CS-378: Game Technology Lecture #4: Texture and Other Maps
CIS 441/541: Introduction to Computer Graphics Lecture 15: shaders
Presentation transcript:

Hank Childs, University of Oregon Unstructured Grids

Announcements (1/2) Grading: – 6A, 6B, 7A graded – To do: 5, 7b (both 510 only) Current denominators: – 410: 65 points – 510: 85 points Feedback: fantastic job! – put them on your resumes…

Announcements (2/2) VisIt lecture: posted! Projects: – ~30 hours – Aim for something worthy of your resume Pre-defined project: posted! Schedule: – today: unstructured grids + FAQ on VTK – Weds: large data vis – Fri: Lagrangian flow (research)

Review

Types of Meshes Curvilinear Adaptive Mesh Refinement Unstructured

Curvilinear Mesh Logically rectilinear – Each cell has an (i, j) – Always left, right, bottom, top neighbor (unless on boundary) Points can be anywhere … as long as the cells don’t overlap VTK calls this “vtkStructuredGrid”

Curvilinear Mesh A curvilinear mesh has 5x5 cells and a cell-centered variable stored. Quiz: how many bytes to store this data set if all data is in single precision floating point? 2 ints + 6x6 floats (points) + 5x5 floats (variable) = 2*4+36*4+25*4 = 63*4 = 272 bytes 2 ints + 6x6 floats (points) + 5x5 floats (variable) = 2*4+36*4+25*4 = 63*4 = 272 bytes

Example unstructured mesh Meshes contain: – Cells – Points This mesh contains 3 cells and 13 vertices Pseudonyms: Cell == Element == Zone Point == Vertex == Node

Example unstructured mesh Cell 0: – { (0, 0, 0), // 10 (1, 0, 0), // 11 (1, 1, 0), // 8 (0, 1, 0), // 7 (0, 0, 1), // 4 (1, 0, 1), // 5 (1, 1, 1), // 2 (0, 1, 1) } // 1 If we stored each cell like this, how many bytes would it take? (assume single precision) If we stored each cell like this, how many bytes would it take? (assume single precision) A: 1 int (# cells), 3 ints (# pts per cell), floats = 268 bytes Let’s call this the “explicit” scheme

Example unstructured mesh Pts: – {(0, 1, 1), (1, 1, 1), (2,1,1), (0,0,1), (1,0,1), (2,0,1), (0,1,0), (1,1,0), (2,1,0), (0,0,0), (1,0,0), (2,0,0), (2.5, 0.5, 0.5)} Cells: – 3 cells 1 st cell: hexahedron – (10,11,8,7,4,5,2,1) 2 nd cell: hexahedron – (11,12,9,8,5,6,3,2) 3 rd cell: prism – (13,3,6,12,9) If we stored each cell like this, how many bytes would it take? (assume single precision) If we stored each cell like this, how many bytes would it take? (assume single precision) A: 1 int (# pts), 1 int (# cells), 3 ints (# cell type), 13*3 floats (pts), ints = 260 bytes Let’s call this the “connectivity” scheme

New Material

Comparing unstructured mesh storage schemes Hexahedral meshes: each internal point incident to 8 cells – Explicit scheme: represent that point 8 times: 24 floats for storage – Connectivity scheme: represent that point once in point list, 8 times in connectivity list: 3 floats + 8 ints (takeaway: connectivity wins!) Further benefit to connectivity scheme is in finding exterior faces.

Finding external faces: motivation Interval volume, clip: – Take data set (rectilinear, unstructured, or other) and produce unstructured mesh – When rendering, only want to render the faces on the outside (the inside aren’t visible) Question: what proportion of faces are exterior? Question: how to find exterior faces?

Finding external faces: algorithm For each face, count how many cells are incident. – If “1”, then external – If “2”, then interior Question: why does this work?

Finding exterior faces: algorithm Estimate # of faces (ncells * 6 / 2) Double that number Create a hash table of that size For each cell C – For each face F of C Create hash index for F based on connectivity indices Search hash table – If F already there, remove F from hash – If face not there, add F to hash All faces in hash are exterior

Interpolation for arbitrary cells: tetrahedrons Assume tetrahedron T, point P in T Goal: calculate F(P) P0 P1 P2 P3 P

Interpolation for arbitrary cells: tetrahedrons Assume tetrahedron T, point P in T Goal: calculate F(P) P0 P1 P2 P3 P Set up parametric coordinate system R S T

Interpolation for arbitrary cells: tetrahedrons Assume tetrahedron T, point P in T Goal: calculate F(P) P0 P1 P2 P3 P Calculate parametric coordinates (a,b,c) R S T P = P0+aR+bS+cT This is a 3x3 matrix solve. This matrix is invertible since R,S,T form a basis

Interpolation for arbitrary cells: tetrahedrons Assume tetrahedron T, point P in T Goal: calculate F(P) P0 P1 P2 P3 P Calculate F(P) as weighted sum of vertices R S T P = P0+aR+bS+cT F(P) = sum(Wi*F(Pi)) W0 = 1-a-b-c W1 = a W2 = b W3 = c

General idea Set up parametric coordinate system Calculate parametric coordinates for P Calculate F(P) as Sum(Wi*F(Pi)) – Weights Wi can get pretty tricky. VTK book has weights & good description in Ch. 8.2.

How to do contouring Basically the same: – Iterate over cells – Identify case – Lookup case in table – Create resulting geometry Difference: – New tables for each cell type

How to do ray casting Basically the same: – Cast rays for every pixel on the screen – Sample along rays – Apply transfer function – Composite front to back – Assign color to image Differences: – Sampling gets hard! Which cell contains a sample point? – Need smart data structures …. – …. Or a way to transform data to make it easy

How to do particle advection Basically the same: – Start with a seed location – Evaluate velocity – Displace particle – Repeat until termination criteria reached Differences: – Evaluating velocity different x2: Now a harder proposition: which cell contains particle? Now more math: how to LERP velocity?

Adaptive Mesh Refinement Put resolution where you want it… … but simpler than unstructured (indexing & interpolation) and cheaper (memory) Problems: – Everything great, except at the boundaries….

And now… You know everything I think you should know after having taken a sci-vis class. – Still need unstructured mesh lectures I am proud of this class. Next few lectures should be fun. Projects will hopefully be fun too.

Textures

First OpenGL programs

Visualization use case Why is there purple in this picture?

Textures: a better way to specify a color map There is no purple when we use textures

Textures “Textures” are a mechanism for adding “texture” to surfaces. – Think of texture of a cloth being applied to a surface – Typically used in 2D form Previous examples were 1D.

1D textures: basic idea  Store color map on GPU as a texture  An array of colors  Old color interpolation of fragment on a scanline:  For (int j = 0 ; j < 3 ; j++) RGB[j] = leftRGB[j] + proportion*(rightRGB[j]-leftRGB[j])  New color interpolation of fragment on a scanline:  textureVal = leftTextureVal + proportion*(rightTextureVal-leftTextureVal)  RGB  textureLookup[textureVal]

2D Texture Program What do we expect the output to be?

VTK + Texturing

Anti-aliasing

VTK + Anti-aliasing