Rendering Overview CSE 3541 Matt Boggus. Rendering Algorithmically generating a 2D image from 3D models Raster graphics.

Slides:



Advertisements
Similar presentations
Illumination Lighting and Shading CSE 470/598 Introduction to Computer Graphics Arizona State University Dianne Hansford.
Advertisements

1 Graphics CSCI 343, Fall 2013 Lecture 18 Lighting and Shading.
3D Graphics Rendering and Terrain Modeling
Lighting and Illumination Lighting is the major problem in computer graphics, for either realism or real-time compositions- harder than modeling Consider.
Light Issues in Computer Graphics Presented by Saleema Amershi.
1. What is Lighting? 2 Example 1. Find the cubic polynomial or that passes through the four points and satisfies 1.As a photon Metal Insulator.
Based on slides created by Edward Angel
Illumination Model & Surface-rendering Method 박 경 와.
1 Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009 Shading I.
Computer Graphics - Class 10
IMGD 1001: Illumination by Mark Claypool
CS6500 Adv. Computer Graphics © Chun-Fa Chang, Spring 2003 Object-Order vs. Screen-Order Rendering April 24, 2003.
Computer Graphics (Fall 2005) COMS 4160, Lecture 16: Illumination and Shading 1
Lighting and Shading Wen-Chieh (Steve) Lin
(conventional Cartesian reference system)
Ray Casting Ray-Surface Intersections Barycentric Coordinates Reflection and Transmission [Shirley, Ch.9] Ray Tracing Handouts Ray Casting Ray-Surface.
1 CSCE 641: Computer Graphics Lighting Jinxiang Chai.
Global Illumination May 7, Global Effects translucent surface shadow multiple reflection.
7M836 Animation & Rendering
Objectives Learn to shade objects so their images appear three- dimensional Learn to shade objects so their images appear three- dimensional Introduce.
6.1 Vis_04 Data Visualization Lecture 6 - A Rough Guide to Rendering.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Shading I Ed Angel Professor of Computer Science, Electrical and Computer Engineering,
CS 480/680 Computer Graphics Shading I Dr. Frederick C Harris, Jr.
Lecture 5: 3D Rendering Pipeline (II) Prof. Hsien-Hsin Sean Lee School of Electrical and Computer Engineering Georgia Institute of Technology.
Shading (introduction to rendering). Rendering  We know how to specify the geometry but how is the color calculated.
COMPUTER GRAPHICS CS 482 – FALL 2014 AUGUST 27, 2014 FIXED-FUNCTION 3D GRAPHICS MESH SPECIFICATION LIGHTING SPECIFICATION REFLECTION SHADING HIERARCHICAL.
Computer Graphics Panos Trahanias ΗΥ358 Spring 2009.
Technology and Historical Overview. Introduction to 3d Computer Graphics  3D computer graphics is the science, study, and method of projecting a mathematical.
Computer Graphics An Introduction. What’s this course all about? 06/10/2015 Lecture 1 2 We will cover… Graphics programming and algorithms Graphics data.
CS447/ Realistic Rendering -- Radiosity Methods-- Introduction to 2D and 3D Computer Graphics.
CSC 461: Lecture 3 1 CSC461 Lecture 3: Models and Architectures  Objectives –Learn the basic design of a graphics system –Introduce pipeline architecture.
CS 445 / 645: Introductory Computer Graphics Light.
University of Texas at Austin CS 378 – Game Technology Don Fussell CS 378: Computer Game Technology Basic Rendering Pipeline and Shading Spring 2012.
CSE 381 – Advanced Game Programming GLSL Lighting.
11/04/04© University of Wisconsin, CS559 Fall 2004 Last Time Visibility –Z-Buffer and transparency –A-buffer –Area subdivision –BSP Trees –Exact Cell-Portal.
Illumination and Shading
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Graphics Graphics Korea University cgvr.korea.ac.kr 1 Surface Rendering Methods 고려대학교 컴퓨터 그래픽스 연구실.
CS 445 / 645 Introduction to Computer Graphics Lecture 15 Shading Shading.
Review on Graphics Basics. Outline Polygon rendering pipeline Affine transformations Projective transformations Lighting and shading From vertices to.
Ray Tracing Fall, Introduction Simple idea  Forward Mapping  Natural phenomenon infinite number of rays from light source to object to viewer.
Local Illumination and Shading
CS559: Computer Graphics Final Review Li Zhang Spring 2010.
COMPUTER GRAPHICS CS 482 – FALL 2015 SEPTEMBER 29, 2015 RENDERING RASTERIZATION RAY CASTING PROGRAMMABLE SHADERS.
Illumination and Shading Prof. Lizhuang Ma Shanghai Jiao Tong University.
Where We Stand So far we know how to: –Transform between spaces –Rasterize –Decide what’s in front Next –Deciding its intensity and color.
1 CSCE 441: Computer Graphics Lighting Jinxiang Chai.
CS 445 / 645 Introduction to Computer Graphics Lecture 16 Radiosity Radiosity.
Render methods. Contents Levels of rendering Wireframe Plain shadow Gouraud Phong Comparison Gouraud-Phong.
OpenGL Shading. 2 Objectives Learn to shade objects so their images appear three-dimensional Introduce the types of light-material interactions Build.
Lighting and Reflection Angel Angel: Interactive Computer Graphics5E © Addison-Wesley
CSE 681 Introduction to Ray Tracing. CSE 681 Ray Tracing Shoot a ray through each pixel; Find first object intersected by ray. Image plane Eye Compute.
Viewing and Projection. The topics Interior parameters Projection type Field of view Clipping Frustum… Exterior parameters Camera position Camera orientation.
1 CSCE 441: Computer Graphics Lighting Jinxiang Chai.
CS552: Computer Graphics Lecture 33: Illumination and Shading.
1 CSCE 441: Computer Graphics Lighting Jinxiang Chai.
Computer Graphics Ken-Yi Lee National Taiwan University (the slides are adapted from Bing-Yi Chen and Yung-Yu Chuang)
Computer Graphics (Fall 2006) COMS 4160, Lecture 16: Illumination and Shading 1
Illumination and Shading Prof. Lizhuang Ma Shanghai Jiao Tong University.
© University of Wisconsin, CS559 Spring 2004
3D Graphics Rendering PPT By Ricardo Veguilla.
CS5500 Computer Graphics May 29, 2006
Illumination and Shading
Rendering – Matrix Transformations and the Graphics Pipeline
Illumination Model 고려대학교 컴퓨터 그래픽스 연구실.
Illumination Model 고려대학교 컴퓨터 그래픽스 연구실.
CS 480/680 Computer Graphics Shading.
Introduction to Ray Tracing
Presentation transcript:

Rendering Overview CSE 3541 Matt Boggus

Rendering Algorithmically generating a 2D image from 3D models Raster graphics

CSE OSU rendering courses CSE 5542 Real Time Rendering – Comprehensive list of topics in real-time rendering using OpenGL and GLSL, including coordinate systems, transformations, viewing, illumination, texture mapping, and shader-based algorithms. CSE 5545 Advanced Computer Graphics – Advanced topics in computer graphics; image synthesis, lighting and rendering, sampling and material properties, volume rendering.

Topics Lighting models and shading Viewing transformations Raytracing overview

Lighting and Shading

Physics of light Red lines – single bounce ; local illumination Green lines – multiple bounce ; global illumination

Vectors for light modeling

Point light Emit light in all directionsVector from point to light

Directional light Light vector always the same

Spotlight

Area light Requires sampling – pick point on the light then generate the vector from point on the surface to point on the light

Light scattering on a surface Figure from

Illumination model

Ambient illumination Approximation for global illumination Often set as a constant value, resulting in object having one, flat color L ambient = I ambient * K ambient [Light = Intensity * Material] Notable exceptions: – Ambient occlusion – Radiant flux

Diffuse illumination Diffuse reflection assumes that the light is equally reflected in every direction. In other words, if the light source and the object has fixed positions in the world space, the camera motion doesn’t affect the appearance of the object. The reflection only depends on the incoming direction. It is independent of the outgoing (viewing) direction.

Diffuse illumination L diffuse = I diffuse * K diffuse * cos θ i

Ambient and Diffuse illumination example

Specular illumination Some materials, such as plastic and metal, can have shiny highlight spots. This is due to a glossy mirror-like reflection. Materials have different shininess/glossiness.

Specular reflection R = 2(L ⋅ N)N- L L specular = I specular * K specular * cos n φ n is shininess coefficient φ is the angle between EYE and R

Specular illumination example

Normal of polygon(s)

Normal of vertex Average the normals of the polygons it is used in

Shading model comparison Flat shading – one normal per polygon Gouraud shading – one normal per vertex ; compute color of a point on the polygon by: computing color at each vertex and linearly interpolate colors inside the polygon Phong shading – one normal per vertex ; compute color of a point on the polygon by: linearly interpolate the normal vector, then perform lighting calculation

Viewing and Projection Transformations

Graphics pipeline reminder

Viewing transformation parameters Camera (eye) position (ex,ey,ez) Center of interest (cx, cy, cz) – Or equivalently, a “viewing vector” to specify the direction the camera faces Up vector (Up_x, Up_y, Up_z)

Eye coordinate system Camera (eye) position (ex,ey,ez) View vector : v Up vector : u Third vector (v x u) : w Viewing transform – construct a matrix such that: – Camera is translated to the origin – Camera is rotated so that v is aligned with (0,0,1) or (0,0,-1) u is aligned with (0,1,0)

Projection Transform a point from a high dimensional space to a low‐dimensional space. In 3D, the projection means mapping a 3D point onto a 2D projection plane (or called image plane). There are two basic projection types: – Parallel (orthographic) – Perspective

Orthographic projection

Properties of orthographic projection Not realistic looking Can preserve parallel lines Can preserve ratios Does not preserve angles between lines Mostly used in computer aided design and architectural drawing software

Foreshortening – Pietro Perugino fresco example

Orthographic projection no foreshortening

Perspective projection has foreshortening

Perspective projection viewing volume – frustum

Properties of perspective projection Realistic looking Lines are mapped to lines Parallel lines may not remain parallel Ratios are not preserved Distances cannot be directly measured, as in parallel projection

Another use of perspective Head Tracking for Desktop VR Displays using the WiiRemote Head Tracking for Desktop VR Displays using the WiiRemote

Raytracing

Ray Tracing Algorithm: Shoot a ray through each pixel Find first object intersected by ray Image plane Eye Computation: Compute ray (orthographic or perspective?) Compute ray-object intersections (parametric line equation) Compute shading (use light and normal vectors)

Example

Shade of Object at Point Ambient Diffuse Specular Texture Shadows Reflections Transparency (refraction)

Shadows Determine when light ray is blocked from reaching object. Ray-object intersection calculation For each pixel for each object for each light source for each object

Reflection Eye Image plane

Transparency

Transparency & Refraction Ray changes direction in transition between materials Material properties give ratio of in/out angles

Transparency & Refraction

Recursive Ray Tracing Eye Image plane

Sampling and Aliasing Problem: Representing pixel by a single ray.

Efficiency 1280 x 1024 = 1,310,720  10 6 pixels initial rays reflection rays. Potentially 10 6 refraction rays. 3 x 10 6 shadow rays (3 lights.) Next level: Potentially 4 x 10 6 refraction/reflection rays. 1,000,000 polygons x 10 6 = ray-polygon intersection calculations.

Intersection Data Structures Coarse test to see if a ray could *possibly* intersect object OR Divide space up – sort objects into spatial buckets – trace ray from bucket to bucket

Bounding Boxes

Spatial Subdivision

References Some materials and figures adapted from Huamin Wang’s ( state.edu/~whmin/) real-time rendering noteshttp:// state.edu/~whmin/ Rick Parent’s ( state.edu/~parent/) ray-tracing noteshttp:// state.edu/~parent/