OpenGL-Rendering Pipeline

Slides:



Advertisements
Similar presentations
COMPUTER GRAPHICS SOFTWARE.
Advertisements

Understanding the graphics pipeline Lecture 2 Original Slides by: Suresh Venkatasubramanian Updates by Joseph Kider.
Graphics Pipeline.
Computer Graphic Creator: Mohsen Asghari Session 2 Fall 2014.
Basics. OpenGL. “Hello world” George Georgiev Telerik Corporation
GPU Simulator Victor Moya. Summary Rendering pipeline for 3D graphics. Rendering pipeline for 3D graphics. Graphic Processors. Graphic Processors. GPU.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Introduction to Computer Graphics Ed Angel Professor of Computer Science, Electrical and.
The Graphics Pipeline CS2150 Anthony Jones. Introduction What is this lecture about? – The graphics pipeline as a whole – With examples from the video.
Introduction to OpenGL. What is OpenGL OpenGL is a low-level software interface to graphics hardware No commands for performing windowing tasks or obtaining.
Open Graphics Library (OpenGL)
Basic Graphics Concepts Day One CSCI 440. Terminology object - the thing being modeled image - view of object(s) on the screen frame buffer - memory that.
CS 480/680 Computer Graphics Course Overview Dr. Frederick C Harris, Jr. Fall 2012.
What is ? Open Graphics Library A cross-language, multi-platform API for rendering 2D and 3D computer graphics. The API is used to interact with a Graphics.
Programmable Pipelines. Objectives Introduce programmable pipelines ­Vertex shaders ­Fragment shaders Introduce shading languages ­Needed to describe.
INTRO TO COMPUTER GRAPHICS TEXT EDWARD ANGEL: EDITION 5 CS770/870
Programmable Pipelines. 2 Objectives Introduce programmable pipelines ­Vertex shaders ­Fragment shaders Introduce shading languages ­Needed to describe.
CS 450: COMPUTER GRAPHICS REVIEW: INTRODUCTION TO COMPUTER GRAPHICS – PART 2 SPRING 2015 DR. MICHAEL J. REALE.
The Graphics Rendering Pipeline 3D SCENE Collection of 3D primitives IMAGE Array of pixels Primitives: Basic geometric structures (points, lines, triangles,
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.
1 Angel and Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 Introduction to Computer Graphics Ed Angel Professor Emeritus of Computer.
OpenGL Conclusions OpenGL Programming and Reference Guides, other sources CSCI 6360/4360.
1 Introduction to Computer Graphics SEN Introduction to OpenGL Graphics Applications.
Computer Graphics I, Fall 2008 Introduction to Computer Graphics.
1 Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009 CS4610/7610: Introduction to Computer Graphics.
CS 4363/6353 OPENGL BACKGROUND. WHY IS THIS CLASS SO HARD TO TEACH? (I’LL STOP WHINING SOON) Hardware (GPUs) double in processing power ever 6 months!
CS 480/680 Intro Dr. Frederick C Harris, Jr. Fall 2014.
CSE Real Time Rendering Week 2. Graphics Processing 2.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Computer Graphics The Rendering Pipeline - Review CO2409 Computer Graphics Week 15.
1Computer Graphics Lecture 4 - Models and Architectures John Shearer Culture Lab – space 2
COMPUTER GRAPHICS CSCI 375. What do I need to know?  Familiarity with  Trigonometry  Analytic geometry  Linear algebra  Data structures  OOP.
GRAPHICS PIPELINE & SHADERS SET09115 Intro to Graphics Programming.
Programmable Pipelines Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts Director, Arts Technology Center University.
1 3D API OPENGL ES v1.0 Owned by Silicon Graphics (SGL) Control was then transferred to Khronos Group Introduction.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
© David Kirk/NVIDIA and Wen-mei W. Hwu, ECE408, University of Illinois, Urbana-Champaign 1 Programming Massively Parallel Processors Lecture.
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.
Programming with OpenGL Part 3: Shaders Ed Angel Professor of Emeritus of Computer Science University of New Mexico 1 E. Angel and D. Shreiner: Interactive.
1 E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 Models and Architectures 靜宜大學 資訊工程系 蔡奇偉 副教授 2012.
Graphics Pipeline Bringing it all together. Implementation The goal of computer graphics is to take the data out of computer memory and put it up on the.
Programmable Pipelines
Introduction to Computer Graphics
Computer Graphics Lecture 32
A Crash Course on Programmable Graphics Hardware
Graphics Processing Unit
Introduction to OpenGL
Chapter 6 GPU, Shaders, and Shading Languages
The Graphics Rendering Pipeline
CS451Real-time Rendering Pipeline
Understanding Theory and application of 3D
Models and Architectures
Introduction to Computer Graphics with WebGL
Models and Architectures
Introduction to Computer Graphics with WebGL
Introduction to Computer Graphics with WebGL
Introduction to Computer Graphics with WebGL
Day 05 Shader Basics.
Graphics Processing Unit
Introduction to Computer Graphics
Introduction to Computer Graphics
Models and Architectures
Models and Architectures
Programming with OpenGL Part 3: Shaders
Computer Graphics Introduction to Shaders
CIS 441/541: Introduction to Computer Graphics Lecture 15: shaders
Introduction to OpenGL
OpenGL Background CS 4722.
CS 480/680 Fall 2011 Dr. Frederick C Harris, Jr. Computer Graphics
Presentation transcript:

OpenGL-Rendering Pipeline

OpenGL Created in 1991 by Silicon Graphics. Now it is managed by the Khronos consortium A library of functions (e.g., glDrawArrays) and constants (e.g., GL_TRIANGLES) The API interacts with the graphics processing unit (GPU) Language-independent: has many bindings, e.g., WebGL. Platform-independent: works on Win/Linux/..

OpenGL – Libraries OpenGL doesn’t support input or windowing GLUT (or GLFW) is used to create a context Platform-dependent extensions can be provided by vendors. Identified by ARB, EXT, .. GLEW wraps the extraction of functionality

OpenGL – History OpenGL 1 (1992): Fixed pipeline OpenGL 2 (2004): Programmable shaders (GLSL) OpenGL 3: Deprecated the fixed functionality OpenGL 3.1 (2009): Removed completely the fixed pipeline .. OpenGL 4.5 (2014): 最初這個功能是以組合語言撰寫著色器來達到的。組合語言對開發者的使用是不直觀而複雜的。OpenGL ARB 建立了 OpenGL 著色語言,為 GPU 的程式設計提供更加直觀的方法,當維護開放標準的時候,就有助於帶動 OpenGL 的歷史。 最初 OpenGL 1.5 是以擴充形式引入,後來 OpenGL ARB 在 OpenGL 2.0 核心中正式納入 GLSL。自 1992 年建立的OpenGL 1.0 起,OpenGL 2.0 是第一個 OpenGL 的大修改版。 使用 GLSL 有如下好處: 具有跨平台的相容性,包括 Macintosh、Windows 和 Linux 等作業系統。 所有支援 OpenGL 著色語言的繪圖卡,都可以用來編寫著色器。 允許廠商為特定的繪圖卡產生最佳化的代碼。

OpenGL-Rendering Pipeline

OpenGL-Rendering Pipeline

OpenGL-Rendering Pipeline List an ordered list of vertices that define 1.The boundaries of the primitive (Points, Lines or Polygons). 2.Colors of each vertices. 3.Texture coordinates.

OpenGL 3D Coordinate

Texture Coordinate

Vertex specification Common object format: .obj, .stl, .3ds f vertex/uv/normal You can obtain free 3D model from CGTrader or you can make it by yourself using Blender.

OpenGL-Rendering Pipeline Vertex Shader is a program written in GLSL that manipulate the vertex data. The goal of vertex shader is to calculate final vertex position of each vertex.

OpenGL-Rendering Pipeline This shader stage is optional. Divided into smoother mesh of triangles.

OpenGL-Rendering Pipeline This shader stage is optional. Divided into smoother mesh of triangles.

OpenGL-Rendering Pipeline This shader stage is optional. Convert primitives to different types. For example, point primitive can become triangles.

OpenGL-Rendering Pipeline This is a fixed function stage. The most important part of this stage is Clipping.

Perspective and Orthogonal rendering

Perspective and Orthogonal rendering

OpenGL-Rendering Pipeline This stage collects the vertex data into a ordered sequence of simple primitives(lines, points or triangles).

OpenGL-Rendering Pipeline The output of rasterization is a fragments.

OpenGL-Rendering Pipeline User-written program in GLSL calculates the color of each fragment that user sees on the screen. Bump mapping

OpenGL-Rendering Pipeline User-written program in GLSL calculates the color of each fragment that user sees on the screen. Global illumination

OpenGL-Rendering Pipeline User-written program in GLSL calculates the color of each fragment that user sees on the screen. Physically based rendering

OpenGL-Rendering Pipeline There are few tests that are performed based on user has activated them or not. For example: Pixel ownership test, Scissor Test, Stencil Test, Depth Test.

OpenGL-Rendering Pipeline There are few tests that are performed based on user has activated them or not. For example: Pixel ownership test, Scissor Test, Stencil Test, Depth Test.

OpenGL-Rendering Pipeline Where we can program!

Double-Buffered Animation

Single Frame Buffer

Double Frame Buffer

New OpenGL vs Old OpenGL New version uses GLFW (or GLAD) : Old version uses GLUT (freeGLUT) New version has implementable shader : Old Version does not. New version can render scene when ever you want. Old version has fixed pipeline.