X86 and 3D graphics. Quick Intro to 3D Graphics Glossary: –Vertex – point in 3D space –Triangle – 3 connected vertices –Object – list of triangles that.

Slides:



Advertisements
Similar presentations
Virtual Realism TEXTURE MAPPING. The Quest for Visual Realism.
Advertisements

Graphics Pipeline.
3D Graphics Rendering and Terrain Modeling
1 Computer Graphics Chapter 9 Rendering. [9]-2RM Rendering Three dimensional object rendering is the set of collective processes which make the object.
HCI 530 : Seminar (HCI) Damian Schofield.
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
IN4151 Introduction 3D graphics 1 Introduction 3D Computer Graphics part 1 Projective display Viewing pipeline Graphics hardware Image-based rendering.
(conventional Cartesian reference system)
CS6500 Adv. Computer Graphics © Chun-Fa Chang, Spring 2003 Adv. Computer Graphics CS6500, Spring 2003.
IN4151 Introduction 3D graphics 1 Introduction to 3D computer graphics part 2 Viewing pipeline Multi-processor implementation GPU architecture GPU algorithms.
Status – Week 277 Victor Moya.
Global Illumination May 7, Global Effects translucent surface shadow multiple reflection.
6.1 Vis_04 Data Visualization Lecture 6 - A Rough Guide to Rendering.
©Larry F. Hodges (modified by Amos Johnson) 1 Shading Models.
Coordinate Systems X Y Z (conventional Cartesian reference system) X Y Z.
University of British Columbia CPSC 414 Computer Graphics © Tamara Munzner 1 Shading Week 5, Wed 1 Oct 2003 recap: lighting shading.
Part I: Basics of Computer Graphics Rendering Polygonal Objects (Read Chapter 1 of Advanced Animation and Rendering Techniques) Chapter
02/04/03 Page 1 Rendering Visibility Lighting Texturing.
Computer Graphics Inf4/MSc Computer Graphics Lecture 11 Texture Mapping.
Under the Hood: 3D Pipeline. Motherboard & Chipset PCI Express x16.
Computer Graphics An Introduction. Computer Graphics 26/9/2008Lecture 12 What’s this course all about? We will cover… Graphics programming and algorithms.
1 Computer Graphics Week13 –Shading Models. Shading Models Flat Shading Model: In this technique, each surface is assumed to have one normal vector (usually.
Polygon Shading. Assigning color to a shape to make graphical scenes look realistic, or artistic, or whatever effect we’re attempting to achieve But first.
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.
University of Illinois at Chicago Electronic Visualization Laboratory (EVL) CS 426 Intro to 3D Computer Graphics © 2003, 2004, 2005 Jason Leigh Electronic.
COMPUTER GRAPHICS CS 482 – FALL 2014 AUGUST 27, 2014 FIXED-FUNCTION 3D GRAPHICS MESH SPECIFICATION LIGHTING SPECIFICATION REFLECTION SHADING HIERARCHICAL.
Technology and Historical Overview. Introduction to 3d Computer Graphics  3D computer graphics is the science, study, and method of projecting a mathematical.
COLLEGE OF ENGINEERING UNIVERSITY OF PORTO COMPUTER GRAPHICS AND INTERFACES / GRAPHICS SYSTEMS JGB / AAS 1 Shading (Shading) & Smooth Shading Graphics.
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.
Shading & Texture. Shading Flat Shading The process of assigning colors to pixels. Smooth Shading Gouraud ShadingPhong Shading Shading.
09/11/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Graphics Pipeline Texturing Overview Cubic Environment Mapping.
CSC 461: Lecture 3 1 CSC461 Lecture 3: Models and Architectures  Objectives –Learn the basic design of a graphics system –Introduce pipeline architecture.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
1Computer Graphics Lecture 4 - Models and Architectures John Shearer Culture Lab – space 2
Advanced Computer Graphics Advanced Shaders CO2409 Computer Graphics Week 16.
University of Texas at Austin CS 378 – Game Technology Don Fussell CS 378: Computer Game Technology Basic Rendering Pipeline and Shading Spring 2012.
Programming 3D Applications CE Displaying Computer Graphics Week 3 Lecture 5 Bob Hobbs Faculty of Computing, Engineering and Technology Staffordshire.
Computer Graphics Chapter 6 Andreas Savva. 2 Interactive Graphics Graphics provides one of the most natural means of communicating with a computer. Interactive.
Advanced Computer Graphics Spring 2014 K. H. Ko School of Mechatronics Gwangju Institute of Science and Technology.
CS 325 Introduction to Computer Graphics 03 / 29 / 2010 Instructor: Michael Eckmann.
High detail models, depth of field, soft shadows, reflective surfaces. (Image created by Toxic Studios using Brazil R/S)
RENDERING Introduction to Shading models – Flat and Smooth shading – Adding texture to faces – Adding shadows of objects – Building a camera in a program.
Computing & Information Sciences Kansas State University Lecture 12 of 42CIS 636/736: (Introduction to) Computer Graphics CIS 636/736 Computer Graphics.
11/5/2002 (c) University of Wisconsin, CS 559 Last Time Local Shading –Diffuse term –Specular term –All together –OpenGL brief overview.
Local Illumination and Shading
COMPUTER GRAPHICS CS 482 – FALL 2015 SEPTEMBER 29, 2015 RENDERING RASTERIZATION RAY CASTING PROGRAMMABLE SHADERS.
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.
Render methods. Contents Levels of rendering Wireframe Plain shadow Gouraud Phong Comparison Gouraud-Phong.
Schedule Update GP 4 – Tesselation/Cg GDS 4 – Subdiv Surf. GP 5 – Object Modeling Lab: Mini-proj Setup GDS 5 – Maya Modeling MCG 6 – Intersections GP 6.
CS 376 Introduction to Computer Graphics 04 / 13 / 2007 Instructor: Michael Eckmann.
Applications and Rendering pipeline
Computer Graphics (Fall 2006) COMS 4160, Lecture 16: Illumination and Shading 1
- Introduction - Graphics Pipeline
Photorealistic Rendering vs. Interactive 3D Graphics
Computer Graphics Chapter 9 Rendering.
Chapter 10 Computer Graphics
3D Graphics Rendering PPT By Ricardo Veguilla.
Models and Architectures
Chapter 14 Shading Models.
CSC461: Lecture 23 Shading Computation
© University of Wisconsin, CS559 Fall 2004
Introduction to Meshes
CS5500 Computer Graphics May 29, 2006
Illumination and Shading
Computer Graphics (Fall 2003)
Chapter 14 Shading Models.
Adding Surface Detail 고려대학교 컴퓨터 그래픽스 연구실.
Adding Surface Detail 고려대학교 컴퓨터 그래픽스 연구실.
Introduction to Meshes
Presentation transcript:

x86 and 3D graphics

Quick Intro to 3D Graphics Glossary: –Vertex – point in 3D space –Triangle – 3 connected vertices –Object – list of triangles that have the same material properties (AKA Mesh) –Texture – a 2D image that is wrapped on the surface of a Mesh

For Each Triangle... Geometry –transform each vertex (FP) Lighting –compute lighting from light sources and surface properties (FP) Rasterization –setup triangle for rasterization (FP) –perform shading & texture mapping during triangle fill (INT)

Rendering Process light source objects viewing plane X Y Z incident light perspective projection Mathematical models for light, objects & viewer create a 2D image via a 3D process

Coordinate Systems xwxw ywyw zwzw world xoxo yoyo zozo object xvxv yvyv zvzv viewer xlxl ylyl zlzl light

Transformation Transformantion change the coordinate system a point lies in Examples –Viewing Transformation - translate objects to viewer coordinate before projection to viewing plane –Shadows - translate objects to light source coordinates to calculate shadows

N L R S Lighting Process Surface Diffuse Light scatters in all directions Specular Light reflects in direction of reflection vector R V

Rasterization Now that we have transformed and lit polygons… actually, the vertices... And, we know where they appear on the screen… We have to fill their interiors!

Textures Image maps to apply surfaces. Gives impression of complex surface properties. Can substitute for lots of polys (eg, tree bitmap on a single rectangle, vs. thousands of leaf polys)

Rasterization (again)

Flat Fill

Some lighting

And textures

Demo

History of 3D Pipeline Partitioning Geometry Lighting Edge Setup Rasterization Application Software 3D Processor Does All First Generation 3D HW Accelerators Rasterization HW Geometry Lighting Edge Setup Application 2 nd Generation HW ( ) HW Geometry Lighting Edge Setup Rasterization Application 3 rd Generation HW ( ) HW Geometry Lighting Edge Setup Rasterization Application

Memory BW: The problem Frame buffer - ~3MB Z buffer - ~3MB For each object: –Mesh (vertices and triangle connectivity) – 1KB – 1MB –Texture(s) - ~256KB Typical game frame – 8MB – 20MB

AGP: the Solution AGP (Accelerated Graphics Port) –Larger BW than PCI –Lower HW cost (less local RAM needed) Frame/Z buffers stored in graphics local memory Texturing from system memory

Memory traffic when using AGP

How does it work The AGP aperture is mapped as one chunk (1:1 mapping in CPU’s paging HW), both the gfx chip and the CPU reference the same addresses The GART is mapping AGP memory address to the system memory address (like paging HW in the CPU)

In the future Multi-texturing: More than one texture for surface, used for details maps, reflections, refractions, lighting tricks, etc.

Programmable HW Helps the developer in customizing its transform, lighting and texture operations

Programmable vertex machine

Programmable HW demos

backup

Shading Techniques Scan Line A B C LR P  Polygon fill is done across the scanline  Flat shading Color the whole polygon with one color Does not show highlights inside polygons  Gouraud shading If the object surfaces are curved, we can approximate it by polygons Interpolating vertex intensity values along scanline Still does not show highlights inside polygons

Texture Mapping 1. Texture coordinates (s,t,q) for each vertex. These are interpolated along polygon edges. 2. Texture coordinate for each point on scanline is interpolated. Linear interpolation, or a quadratic approximation (for perspective correction) is used. 3. The (s,t) value maps into the source texture map. It usually does not fall on the center of a texel. 4. A texture mapping algorithm is applied to the nearest texel, and possibly surrounding texels, to determine the result. Texturing eats CPU MIPS & bandwidth % slower than flat shading. (s 0, t 0, q 0 ) (s 1, t 1, q 1 ) (s 2, t 2, q 2 ) (s i, t i ) s = 0, t = 0s = 1, t = 0 s = 1, t = 1