Introduction to 3D Graphics

Similar documents
CS 354R: Computer Game Technology

CHAPTER 1 Graphics Systems and Models 3

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

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

CS451Real-time Rendering Pipeline

Interactive Methods in Scientific Visualization

0. Introduction: What is Computer Graphics? 1. Basics of scan conversion (line drawing) 2. Representing 2D curves

Topics and things to know about them:

Clipping. CSC 7443: Scientific Information Visualization

Adaptive Point Cloud Rendering

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

CS 4620 Program 3: Pipeline

Hardware Accelerated Volume Visualization. Leonid I. Dimitrov & Milos Sramek GMI Austrian Academy of Sciences

3D Programming. 3D Programming Concepts. Outline. 3D Concepts. 3D Concepts -- Coordinate Systems. 3D Concepts Displaying 3D Models

CS 130 Final. Fall 2015

- Rasterization. Geometry. Scan Conversion. Rasterization

Pipeline Operations. CS 4620 Lecture 14

EF432. Introduction to spagetti and meatballs

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

Scalable multi-gpu cloud raytracing with OpenGL

Topic 0. Introduction: What Is Computer Graphics? CSC 418/2504: Computer Graphics EF432. Today s Topics. What is Computer Graphics?

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

Computer Graphics I Lecture 11

Spring 2009 Prof. Hyesoon Kim

Display. Introduction page 67 2D Images page 68. All Orientations page 69 Single Image page 70 3D Images page 71

Department of Computer Engineering 3D Graphics in Games and Movies

Game Architecture. 2/19/16: Rasterization

CS230 : Computer Graphics Lecture 4. Tamar Shinar Computer Science & Engineering UC Riverside

For each question, indicate whether the statement is true or false by circling T or F, respectively.

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

Graphics Shaders. Theory and Practice. Second Edition. Mike Bailey. Steve Cunningham. CRC Press. Taylor&FnincIs Croup tootutor London New York

Photorealism: Ray Tracing

3D GRAPHICS. design. animate. render

Institutionen för systemteknik

Volume Graphics Introduction

lecture 18 - ray tracing - environment mapping - refraction

Direct Rendering of Trimmed NURBS Surfaces

Rasterization Overview

Spring 2011 Prof. Hyesoon Kim

EF432. Introduction to spagetti and meatballs

Com S 336 Final Project Ideas

Today. Texture mapping in OpenGL. Texture mapping. Basic shaders for texturing. Today. Computergrafik

Computergrafik. Matthias Zwicker Universität Bern Herbst 2016

Advanced Lighting Techniques Due: Monday November 2 at 10pm

CS GAME PROGRAMMING Question bank

Lets assume each object has a defined colour. Hence our illumination model is looks unrealistic.

CS 130 Exam I. Fall 2015

Graphics for VEs. Ruth Aylett

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

Computer Graphics. Lecture 9 Environment mapping, Mirroring

CIS 467/602-01: Data Visualization

Point Cloud Filtering using Ray Casting by Eric Jensen 2012 The Basic Methodology

Volume Illumination, Contouring

Project 1, 467. (Note: This is not a graphics class. It is ok if your rendering has some flaws, like those gaps in the teapot image above ;-)

3D Rasterization II COS 426

CSE528 Computer Graphics: Theory, Algorithms, and Applications

Texture. Texture Mapping. Texture Mapping. CS 475 / CS 675 Computer Graphics. Lecture 11 : Texture

CS 475 / CS 675 Computer Graphics. Lecture 11 : Texture

Graphics Hardware. Instructor Stephen J. Guy

The Graphics Pipeline

Scalar Visualization

Computergrafik. Matthias Zwicker. Herbst 2010

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

6.837 Introduction to Computer Graphics Final Exam Tuesday, December 20, :05-12pm Two hand-written sheet of notes (4 pages) allowed 1 SSD [ /17]

Last Time. Why are Shadows Important? Today. Graphics Pipeline. Clipping. Rasterization. Why are Shadows Important?

The Traditional Graphics Pipeline

Computer Graphics CS 543 Lecture 13a Curves, Tesselation/Geometry Shaders & Level of Detail

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

Texturing Theory. Overview. All it takes is for the rendered image to look right. -Jim Blinn 11/10/2018

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

Data Visualization (CIS/DSC 468)

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

CS 464 Review. Review of Computer Graphics for Final Exam

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

Deferred Rendering Due: Wednesday November 15 at 10pm

Scanline Rendering 2 1/42

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

Visualization. CSCI 420 Computer Graphics Lecture 26

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

Graphics Hardware and Display Devices

Volume Illumination & Vector Field Visualisation

CSCD18: Computer Graphics. Instructor: Leonid Sigal

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

Height Fields and Contours Scalar Fields Volume Rendering Vector Fields [Angel Ch. 12] April 23, 2002 Frank Pfenning Carnegie Mellon University

Spring 2012 Final. CS184 - Foundations of Computer Graphics. University of California at Berkeley

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

Chapter 7 - Light, Materials, Appearance

Computer Graphics (CS 563) Lecture 4: Advanced Computer Graphics Image Based Effects: Part 2. Prof Emmanuel Agu

CMSC427 Final Practice v2 Fall 2017

CS2401 COMPUTER GRAPHICS ANNA UNIV QUESTION BANK

The Rendering Pipeline (1)

Contours & Implicit Modelling 4

Rasterization and Graphics Hardware. Not just about fancy 3D! Rendering/Rasterization. The simplest case: Points. When do we care?

Data Visualization (DSC 530/CIS )

Graphics for VEs. Ruth Aylett

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

AGDC Per-Pixel Shading. Sim Dietrich

Implicit Surfaces & Solid Representations COS 426

Visualizer An implicit surface rendering application

Hands-On Workshop: 3D Automotive Graphics on Connected Radios Using Rayleigh and OpenGL ES 2.0

Transcription:

Graphics Without Polygons Volume Rendering May 11, 2010

So Far Volumetric Rendering Techniques Misc.

So Far Extended the Fixed Function Pipeline with a Programmable Pipeline Programming the pipeline is done using vertex and fragment programs written in Cg Shaders loaded and compiled in one go, or commmand-line Loaded onto graphics card Pipeline values usable through binding sematics enable and disable shaders similar to enabling and disabling textures Examples given which shows how to do per-pixel calculations using vectors from different spaces (phong lighting, projective textures, fake bump, tangent bump, toon shading, shadow maps) Introduced OpenGL extensions and GLEW Examples of point size calculations, point sprites and off screen rendering given. Reading Material CgUsersManual, CgReferenceManual, the GPU Gems Series (html), OpenGL Extension Registry

Volumetric Rendering Volumetric Rendering

Volumetric Rendering Why Volumetric Rendering Data not always polygons Data can be fields, intensities etc... Scalar values in (multi dimensional) arrays Point-clouds Converting to polygons looses information... or creates lots of surfaces! Polygonizing a scalar field can be done by marching cubes algorithm Still need rendering

Volumetric Rendering Example Sets

Techniques Pointbased Surfaces represented as many points. Renders point-wise: billboarded splat - always orthogonal to camera 3D primitive not widely used Volume Textures Raytracing/raymarching photorealism slower Slices-based fast! approximates photorealism.

Techniques Pointbased Splatting Point based splatting: Surface represented by a large set of points Render a splat instead of a point square, opaque/fuzzy circle. Use subsequent filter to smooth out gaps between points

Techniques QSplat - Example Interactive: High Quality: 8 Frames Per Second 8 Seconds Per Frame Closeup Closeup

Techniques Pointbased Splatting - cont. Point based hierarchy: Surface represented by a large set of points Points ordered in a (spherical) hierarcy Size of splat determined from size of sphere Filter paramater varies with density of points on the surface and the density of points on screen.

Techniques Hierarchy example

Volume Textures: Uses a 3D image as data Intensities - Medical Data Distances - Iso-Surfaces Proxy Geometry: Image is encapsulated in 3D Geometry Represent the volume containing the data. Analoguous to 2D texture mapping. The Box: 3D scans are cubic (cubic datasets) convex easier maths In OpenGL GL TEXTURE 3D

Raymarching March through proxy geometry along ray One ray for each pixel on screen Collect information at all points Pros: Cons: Calculate color based on this information. Fairly easy math. Can capture internal light very good Expensive Lots of sample points - multiplies pre lightsource. Doesn t fit directly onto graphics hardware

Raymarching Example Virtual Ear Simulator:

Raymarching Example Virtual Ear Simulator:

Slice Based Volume Rendering Use primitives instead of rays Cheaper, and much faster Fits better to rendering pipeline Samples a lot of points at once, a ray only samples one. Easy math: Clipping of proxy-geometry and primitive Photorealism harder. Example: Planes as primitive and proxy geometry is a box: Sampling, number of planes increases through a, b and c.

Clipping the Geometry A plane is described by equation ax + by + cz + d = 0, d is shortest distance from center to surface. A line between points p 1,p 2 is described by: l = p 1 + (p 2 p 1 )t, 0 t 1 Coordinates: l x = p 1x + (p 2x p 1x )t = p 1x + it l y = p 1y + (p 2y p 1y )t = p 1y + jt l z = p 1z + (p 2z p 1z )t = p 1z + kt Insert lx,ly and lz for x,y,z in plane eq. Solve for t: t = (ap 1x + bp 1y + cp 1z + d) (ai + bj + ck) Special cases: denominator = 0: line is parallel to plane denominator and nominator = 0: line is contained in plane. NB: t is the same for calculating texture coordinates.

Drawing the geometry Need the rotated coords of proxy geometry: get transformation from top of OpenGL matrix stack implement rotations Cut from back to front eliminates the need for sorting explicitly Cleaning up the cut geometry Remove duplicates Sort according to rotational order calculate angles using inverse tan. We now have a polygon contained in the cut-plane. Both 3d-coordinates and texture-coordinates have been calculated. The coords are sorted, so we just use glbegin(gl POLYGON).

Blending Use an additive blend. uniform opacity, A, for the slices Opacity correction: A = 1 (1 A0) (s0/s), A0 and s0 are determined from dataset s is the sampling rate, ie. number of primitives. usually (s0/s) and number of slices can be determined via user interface.

Example Example

Transfer Function Transfer function: Purpose: Emphasize features in the dataset by mapping values to optical properties. Often implemented by using a Look-Up Table (LUT). Can be multidimensional, using gradients etc. Can be implemented on GPU.

Transfer Function Pick Iso-value:

Transfer Function Gradient of low intensities

Transfer Function Transfer functions per color component:

Advanced Features Advanced Features:... possible extensions in a project. 2D - LUT Lighting Procedural Renderings adding noise to low-res datasets calculating the dataset Calculating intersection on GPU Etc...

Misc. Exercises Monday and Friday this week But, no code handed out! Monday in week 21 is a holiday. Exercises: Continue working on previous exercises Make sure you get an understanding of working with vector in different spaces Animating Point Sprites 3D texture? Look into ClipPlanes Decide on project

Misc. References Realtime Rendering Qsplat http://graphics.stanford.edu/software/qsplat/ GPU Gems I, Chapter 39 http://http.developer.nvidia.com/gpugems/gpugems_ch39.html Virtual Ear Simulator http://www.jespermosegaard.dk/projects