Mark Nelson Rendering algorithms Fall 2013

Slides:



Advertisements
Similar presentations
Computer Graphics - Rasterization -
Advertisements

CS 352: Computer Graphics Chapter 7: The Rendering Pipeline.
3D Graphics Rendering and Terrain Modeling
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.
Lecture Fall 2001 Visibility Back-Face Culling Painter’s Algorithm.
Hidden Surface Removal CSE 581. Visibility Assumption: All polygons are opaque What polygons are visible with respect to your view frustum?  Outside:
CAP4730: Computational Structures in Computer Graphics Visible Surface Determination.
Visibility in Computer Graphics Toni Sellarès Unversitat de Girona
Computer Graphics Visible Surface Determination. Goal of Visible Surface Determination To draw only the surfaces (triangles) that are visible, given a.
Part I: Basics of Computer Graphics
Introduction to 3D Graphics Lecture 5: From Realism to Real-Time Anthony Steed University College London.
Implementation Dr. Amy Zhang. Reading 2  Hill, Chapters  Hill, Chapter 10.
Chapter 6: Vertices to Fragments Part 2 E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley Mohan Sridharan Based on Slides.
Vertices and Fragments I CS4395: Computer Graphics 1 Mohan Sridharan Based on slides created by Edward Angel.
CS 4731: Computer Graphics Lecture 18: Hidden Surface Removal Emmanuel Agu.
Clipping & Scan Conversion
Graphics Programming: Polygon Filling
Hidden Surface Elimination Wen-Chieh (Steve) Lin Institute of Multimedia Engineering I-Chen Lin’ CG Slides, Rich Riesenfeld’s CG Slides, Shirley, Fundamentals.
Now Playing: Big Bird Eddie Floyd from The Complete Stax-Volt Singles Volume 1 ( ) Released April 30, 1991.
Vertices and Fragments III Mohan Sridharan Based on slides created by Edward Angel 1 CS4395: Computer Graphics.
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics1 Other Rendering Techniques Types of rendering – Wireframe techniques – Scan-line conversion – Reyes.
Introduction to 3D Graphics John E. Laird. Basic Issues u Given a internal model of a 3D world, with textures and light sources how do you project it.
Hidden Surface Removal
Polygon Scan Conversion and Z-Buffering
Basics of Rendering Pipeline Based Rendering –Objects in the scene are rendered in a sequence of steps that form the Rendering Pipeline. Ray-Tracing –A.
Technology and Historical Overview. Introduction to 3d Computer Graphics  3D computer graphics is the science, study, and method of projecting a mathematical.
CS 325 Introduction to Computer Graphics 03 / 08 / 2010 Instructor: Michael Eckmann.
Computer Graphics 2 Lecture 8: Visibility Benjamin Mora 1 University of Wales Swansea Pr. Min Chen Dr. Benjamin Mora.
Advanced Computer Graphics Depth & Stencil Buffers / Rendering to Textures CO2409 Computer Graphics Week 19.
Visible-Surface Detection Jehee Lee Seoul National University.
CAP4730: Computational Structures in Computer Graphics 3D Transformations.
Hidden Surface Removal 1.  Suppose that we have the polyhedron which has 3 totally visible surfaces, 4 totally invisible/hidden surfaces, and 1 partially.
2 COEN Computer Graphics I Evening’s Goals n Discuss application bottleneck determination n Discuss various optimizations for making programs execute.
3/23/04© University of Wisconsin, CS559 Spring 2004 Last Time Antialiasing –Area-weighted sampling Visibility –Painters algorithm –Depth buffer (Z-buffer)
1Computer Graphics Implementation II Lecture 16 John Shearer Culture Lab – space 2
Implementation II Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico.
CS 325 Introduction to Computer Graphics 03 / 22 / 2010 Instructor: Michael Eckmann.
CS 376 Introduction to Computer Graphics 03 / 21 / 2007 Instructor: Michael Eckmann.
Hidden Surface Removal
Implementation II.
Computer Graphics Zhen Jiang West Chester University.
Mark Nelson 3d projections Fall 2013
CS 325 Introduction to Computer Graphics 03 / 29 / 2010 Instructor: Michael Eckmann.
CS123 | INTRODUCTION TO COMPUTER GRAPHICS Andries van Dam © Visible Surface Determination (VSD) To render or not to render, that is the question… 1 of.
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Graphic pipeline  Scan-conversion algorithm (high level)  Pixels.
Computer Graphics I, Fall 2010 Implementation II.
Honours Graphics 2008 Session 5. Today’s focus Rasterization Visibility determination Coarse / fine visibility determination.
1 CSCE 441: Computer Graphics Hidden Surface Removal Jinxiang Chai.
Hierarchical Occlusion Map Zhang et al SIGGRAPH 98.
Computer Graphics Inf4/MSc 1 Computer Graphics Lecture 5 Hidden Surface Removal and Rasterization Taku Komura.
COMPUTER GRAPHICS CS 482 – FALL 2015 NOVEMBER 10, 2015 VISIBILITY CULLING HIDDEN SURFACES ANTIALIASING HALFTONING.
Visible-Surface Detection Methods. To identify those parts of a scene that are visible from a chosen viewing position. Surfaces which are obscured by.
Computer Graphics Lecture 08 Taqdees A. Siddiqi Computer Graphics Filled Area Primitives I Lecture 08 Taqdees A. Siddiqi
Visible Surface Detection
Rendering Pipeline Fall, 2015.
Computer Graphics Implementation II
Hidden Surface Removal
CSC418 Computer Graphics Back Faces Visibility Algorithms.
Polygons.
Intro to 3D Graphics.
CSC461: Lecture 20 Parallel Projections in OpenGL
3D Graphics Rendering PPT By Ricardo Veguilla.
CSCE 441: Computer Graphics Hidden Surface Removal
3D Rendering Pipeline Hidden Surface Removal 3D Primitives
Implementation II Ed Angel Professor Emeritus of Computer Science
Visibility (hidden surface removal)
Introduction to Computer Graphics with WebGL
Implementation II Ed Angel Professor Emeritus of Computer Science
Presentation transcript:

Mark Nelson Rendering algorithms Fall

Last lecture: Wireframe projection

Wireframe -> opaque  Starts the same  Transform vertices to (x,y) coordinates  But instead of connecting the 3 vertices, flood-fill it with a color  But, how to deal with overlapping triangles?

Occlusion  Wireframes have no occlusion  Front and back side of objects are visible  If surfaces are opaque, that won’t do  How do we draw only visible surfaces?

Painter’s algorithm  Simplest solution  Sort triangles from back to front by center z-coord  Draw in order  Further-front triangles overwrite further-back ones

Painter’s algorithm

Painter’s algorithm downsides  Wasted drawing effort  Triangles are drawn only to be overwritten  Possible artifacts since it only sorts by triangle centers

Scanline algorithm  Line by line  Find all triangle edges that intersect this line  Start scanning left to right  When we encounter an edge:  Add triangle to stack if it’s not on it (starting edge)  Remove triangle if it was already on the stack (closing edge)  Draw pixel that corresponds to nearest triangle on stack

Simple ray-casting  From viewport, draw a ray from each pixel until it hits the first surface  Render that pixel  Simple but inefficient

Z-buffering  Render triangle to (x,y) framebuffer but also save the z’s  Z buffer: current z-depth of every pixel  Don’t write a pixel to the framebuffer if z > zbuffer  Optimization: draw front to back to minimize overwrites

Z-buffering / scanline  Generally combined  Proceed in scanline order  Z-buffer for occlusion test  Why not stack-based scanline algorithm?  Z-buffer correctly handles each pixel

Hierarchical z-buffer

Optimizations  Z-buffering stops us from rendering some unnecessary pixels  Can we avoid entire unnecessary triangles?

Frustum culling  Exclude triangles outside the frustum  Clip triangles on the edges to the edge  Can be done either in view space or clip space

Occlusion culling  Fast-fail completely invisible triangles  E.g. ”early z test”  Potentially visible set algorithms

Some alternative perspectives  Isometric graphics  Parallel projection, tiled, fixed viewing angle  Graphics can therefore be predrawn to fake 3d  The angle is the one where axes have the same scale  Rotated 45 degrees around vertical, around horizontal  In pixel art, approximated with a 2:1 ratio  Oblique projection  Fake 3d  Draw a 2d front view of the object, and then a skewed 2 side view  Depth often foreshortened (e.g. 0.5)

Isometric (Age of Empires 2)