Teaching a Modern Graphics Pipeline Using a Shader-based Software Renderer

Similar documents
Models and Architectures

Real-Time Rendering (Echtzeitgraphik) Michael Wimmer

CS 4620 Program 3: Pipeline

Introduction to Computer Graphics with WebGL

Lecture 2. Shaders, GLSL and GPGPU

Tutorial on GPU Programming #2. Joong-Youn Lee Supercomputing Center, KISTI

CS559 Computer Graphics Fall 2015

Computer Graphics Coursework 1


The Graphics Pipeline

Lecture 10: Shading Languages. Kayvon Fatahalian CMU : Graphics and Imaging Architectures (Fall 2011)

The Graphics Pipeline

Today. Rendering - III. Outline. Texturing: The 10,000m View. Texture Coordinates. Specifying Texture Coordinates in GL

CS 130 Exam I. Fall 2015

Computer Graphics: Programming, Problem Solving, and Visual Communication

CS 381 Computer Graphics, Fall 2008 Midterm Exam Solutions. The Midterm Exam was given in class on Thursday, October 23, 2008.

Rendering Objects. Need to transform all geometry then

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

Shaders. Slide credit to Prof. Zwicker

Graphics Programming. Computer Graphics, VT 2016 Lecture 2, Chapter 2. Fredrik Nysjö Centre for Image analysis Uppsala University

Pipeline Operations. CS 4620 Lecture 14

Working with Metal Overview

Introduction to Shaders.

EDAF80 Introduction to Computer Graphics. Seminar 3. Shaders. Michael Doggett. Slides by Carl Johan Gribel,

Real - Time Rendering. Graphics pipeline. Michal Červeňanský Juraj Starinský

TSBK 07! Computer Graphics! Ingemar Ragnemalm, ISY

THE AUSTRALIAN NATIONAL UNIVERSITY Final Examinations(Semester 2) COMP4610/COMP6461 (Computer Graphics) Final Exam

Computer graphics 2: Graduate seminar in computational aesthetics

OUTLINE. Learn the basic design of a graphics system Introduce pipeline architecture Examine software components for a graphics system

OPENGL RENDERING PIPELINE

Module Contact: Dr Stephen Laycock, CMP Copyright of the University of East Anglia Version 1

Programmable GPUs. Real Time Graphics 11/13/2013. Nalu 2004 (NVIDIA Corporation) GeForce 6. Virtua Fighter 1995 (SEGA Corporation) NV1

CS 418: Interactive Computer Graphics. Basic Shading in WebGL. Eric Shaffer

Module 13C: Using The 3D Graphics APIs OpenGL ES

1.2.3 The Graphics Hardware Pipeline

Rendering. Converting a 3D scene to a 2D image. Camera. Light. Rendering. View Plane

12.2 Programmable Graphics Hardware

Models and Architectures. Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico

Teaching a Modern Graphics Pipeline Using a Shader-based Software Renderer

GLSL Introduction. Fu-Chung Huang. Thanks for materials from many other people

The Application Stage. The Game Loop, Resource Management and Renderer Design

Rendering approaches. 1.image-oriented. 2.object-oriented. foreach pixel... 3D rendering pipeline. foreach object...

Programmable Graphics Hardware

WebGL and GLSL Basics. CS559 Fall 2015 Lecture 10 October 6, 2015

Evolution of GPUs Chris Seitz

Understanding M3G 2.0 and its Effect on Producing Exceptional 3D Java-Based Graphics. Sean Ellis Consultant Graphics Engineer ARM, Maidenhead

Shaders (some slides taken from David M. course)

Computer Graphics. Illumination and Shading

Shader Programming 1. Examples. Vertex displacement mapping. Daniel Wesslén 1. Post-processing, animated procedural textures

CS 354R: Computer Game Technology

The Rasterization Pipeline

Illumination and Shading

CS452/552; EE465/505. Intro to Lighting

Computer Graphics with OpenGL ES (J. Han) Chapter 6 Fragment shader

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

Ciril Bohak. - INTRODUCTION TO WEBGL

The Graphics Pipeline and OpenGL III: OpenGL Shading Language (GLSL 1.10)!

Programming Graphics Hardware

Shader Programs. Lecture 30 Subsections 2.8.2, Robb T. Koether. Hampden-Sydney College. Wed, Nov 16, 2011

Lecture 5 Vertex and Fragment Shaders-1. CITS3003 Graphics & Animation

CS GPU and GPGPU Programming Lecture 7: Shading and Compute APIs 1. Markus Hadwiger, KAUST

Programming with OpenGL Part 3: Shaders. Ed Angel Professor of Emeritus of Computer Science University of New Mexico

Supplement to Lecture 22

Deferred Rendering Due: Wednesday November 15 at 10pm

Real - Time Rendering. Pipeline optimization. Michal Červeňanský Juraj Starinský

Lecture 4: Geometry Processing. Kayvon Fatahalian CMU : Graphics and Imaging Architectures (Fall 2011)

THE AUSTRALIAN NATIONAL UNIVERSITY Final Examinations (Semester 2) COMP4610/COMP6461 (Computer Graphics) Final Exam

CS4620/5620: Lecture 14 Pipeline

WebGL and GLSL Basics. CS559 Fall 2016 Lecture 14 October

CS 464 Review. Review of Computer Graphics for Final Exam

Rasterization Overview

Programming with OpenGL Shaders I. Adapted From: Ed Angel Professor of Emeritus of Computer Science University of New Mexico

OpenJSGL Web 3D Rendering Without Plug-Ins Andrés Buriticá Loyola Marymount University Faculty Mentor: John David N. Dionisio

CS GAME PROGRAMMING Question bank

COMP30019 Graphics and Interaction Rendering pipeline & object modelling

Lecture outline. COMP30019 Graphics and Interaction Rendering pipeline & object modelling. Introduction to modelling

Converts geometric primitives into images Is split into several independent stages Those are usually executed concurrently

Computer Graphics. Lecture 02 Graphics Pipeline. Edirlei Soares de Lima.

CS GPU and GPGPU Programming Lecture 3: GPU Architecture 2. Markus Hadwiger, KAUST

General Purpose Computation (CAD/CAM/CAE) on the GPU (a.k.a. Topics in Manufacturing)

Shadows. Prof. George Wolberg Dept. of Computer Science City College of New York

Lecture 17: Shading in OpenGL. CITS3003 Graphics & Animation

OpenGL Programmable Shaders

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

CHAPTER 1 Graphics Systems and Models 3

COMP 4801 Final Year Project. Ray Tracing for Computer Graphics. Final Project Report FYP Runjing Liu. Advised by. Dr. L.Y.

ECS 175 COMPUTER GRAPHICS. Ken Joy.! Winter 2014

GLSL Introduction. Fu-Chung Huang. Thanks for materials from many other people

CS 130 Final. Fall 2015

Course Title: Computer Graphics Course no: CSC209

Copyright Khronos Group 2012 Page 1. Teaching GL. Dave Shreiner Director, Graphics and GPU Computing, ARM 1 December 2012

The Graphics Pipeline and OpenGL III: OpenGL Shading Language (GLSL 1.10)!

Computer Graphics with OpenGL ES (J. Han) Chapter VII Rasterizer

G - Graphics

Lecture 11of 41. Surface Detail 2 of 5: Textures OpenGL Shading

Programming Graphics Hardware

A SIMD-efficient 14 Instruction Shader Program for High-Throughput Microtriangle Rasterization

On-the-fly Vertex Reuse for Massively-Parallel Software Geometry Processing

Instructor. Goals. Image Synthesis Examples. Applications. Foundations of Computer Graphics. Why Study 3D Computer Graphics?

1 of 5 9/10/ :11 PM

Transcription:

Teaching a Modern Graphics Pipeline Using a Shader-based Software Renderer Heinrich Fink 1 Thomas Weber 1 Michael Wimmer 1 1 Institute of Computer Graphics and Algorithms, Vienna University of Technology

Our Introductory CG Lab Course

Our Introductory CG Lab Course Understand & implement a software renderer

Our Introductory CG Lab Course

Test & explore renderer features within 3D editor

Our Introductory CG Lab Course Only requires basic Java programming skills No prior experience in computer graphics necessary 3 ECTS lab course (~75 hrs per semester)

Our Introductory CG Lab Course Only requires basic Java programming skills No prior experience in computer graphics necessary 3 ECTS lab course (~75 hrs per semester)

Our Introductory CG Lab Course Only requires basic Java programming skills No prior experience in computer graphics necessary 3 ECTS lab course (~75 hrs per semester) We provide an initial software renderer framework

Our Introductory CG Lab Course Only requires basic Java programming skills No prior experience in computer graphics necessary 3 ECTS lab course (~75 hrs per semester) We provide an initial software renderer framework Students complete six programming assignments

Our Introductory CG Lab Course Only requires basic Java programming skills No prior experience in computer graphics necessary 3 ECTS lab course (~75 hrs per semester) We provide an initial software renderer framework Students complete six programming assignments Assignments complete key features of the software renderer and build upon each other

Our Introductory CG Lab Course Only requires basic Java programming skills No prior experience in computer graphics necessary 3 ECTS lab course (~75 hrs per semester) We provide an initial software renderer framework Students complete six programming assignments Assignments complete key features of the software renderer and build upon each other A rich 3D editor is contained within the framework and allows to experiment with the implemented solutions

Assignment 1 Line Rasterization

Rendered directly by student s solution

Scene Outliner Rendered directly by student s solution

Scene Outliner Rendered directly by student s solution Properties & Tools

+ Line rasterization BresenhamRasterizer.java

+ Viewport mapping -1 1 Renderer.java

Assignment 2 Transformations in 3D Space

+ 3D math Vec3.java Vec4.java Mat3.java Mat4.java

+ Model transformations Renderer.java ColorShader.java SceneObject.java

Assignment 3 Clipping, Viewing & Projection

+ Vertex Color Interpolation Varyings.java BresenhamRasterizer.java ColorShader.java

+ View Transform Camera.java Scene.java ColorShader.java

+ Clipping ClippingPlane.java Clipper.java Renderer.java

+ Projection Transform PerspectiveProjection.java Renderer.java ColorShader.java

Assignment 4 Triangle Rasterization & Culling

+ Back-face culling Renderer.java

+ Triangle Rasterization TriangleRasterizer.java Renderer.java

Assignment 5 Lighting & Shading

+ Per-vertex diffuse reflection IlluminationModels.java PointLight.java Geometry.java LambertGouraudShader.java Scene.java

+ Per-fragment specular reflection IlluminationModels.java BlinnPhongShader.java Scene.java

Assignment 6 Texturing & Custom Shaders

+ Texturing Renderer.java Varyings.java TexturedShader.java

public class TexturedShader implements Shader { } @Image2DSamplerParam(name="Diffuse Sampler") public Sampler diffuse; @RGBParam(r=1, g=1, b=1) public Vec3 specular; @FloatParam(value=20, min=1, max=200.0f) public float shininess; @Override public Vertex shadevertex(mesh.vertex v) {...} @Override public Vec3 shadefragment(varyings varyings) {...}

public class TexturedShader implements Shader { } @Image2DSamplerParam(name="Diffuse Sampler") public Sampler diffuse; @RGBParam(r=1, g=1, b=1) public Vec3 specular; @FloatParam(value=20, min=1, max=200.0f) public float shininess; @Override public Vertex shadevertex(mesh.vertex v) {...} @Override public Vec3 shadefragment(varyings varyings) {...}

public class TexturedShader implements Shader { } @Image2DSamplerParam(name="Diffuse Sampler") public Sampler diffuse; @RGBParam(r=1, g=1, b=1) public Vec3 specular; @FloatParam(value=20, min=1, max=200.0f) public float shininess; @Override public Vertex shadevertex(mesh.vertex v) {...} @Override public Vec3 shadefragment(varyings varyings) {...}

public class TexturedShader implements Shader { } @Image2DSamplerParam(name="Diffuse Sampler") public Sampler diffuse; @RGBParam(r=1, g=1, b=1) public Vec3 specular; @FloatParam(value=20, min=1, max=200.0f) public float shininess; @Override public Vertex shadevertex(mesh.vertex v) {...} @Override public Vec3 shadefragment(varyings varyings) {...}

public class TexturedShader implements Shader { } @Image2DSamplerParam(name="Diffuse Sampler") public Sampler diffuse; @RGBParam(r=1, g=1, b=1) public Vec3 specular; @FloatParam(value=20, min=1, max=200.0f) public float shininess; @Override public Vertex shadevertex(mesh.vertex v) {...} @Override public Vec3 shadefragment(varyings varyings) {...}

public class TexturedShader implements Shader { } @Image2DSamplerParam(name="Diffuse Sampler") public Sampler diffuse; @RGBParam(r=1, g=1, b=1) public Vec3 specular; @FloatParam(value=20, min=1, max=200.0f) public float shininess; @Override public Vertex shadevertex(mesh.vertex v) {...} @Override public Vec3 shadefragment(varyings varyings) {...}

public class TexturedShader implements Shader { } @Image2DSamplerParam(name="Diffuse Sampler") public Sampler diffuse; @RGBParam(r=1, g=1, b=1) public Vec3 specular; @FloatParam(value=20, min=1, max=200.0f) public float shininess; @Override public Vertex shadevertex(mesh.vertex v) {...} @Override public Vec3 shadefragment(varyings varyings) {...}

public class TexturedShader implements Shader { } @Image2DSamplerParam(name="Diffuse Sampler") public Sampler diffuse; @RGBParam(r=1, g=1, b=1) public Vec3 specular; @FloatParam(value=20, min=1, max=200.0f) public float shininess; @Override public Vertex shadevertex(mesh.vertex v) {...} @Override public Vec3 shadefragment(varyings varyings) {...}

public class TexturedShader implements Shader { } @Image2DSamplerParam(name="Diffuse Sampler") public Sampler diffuse; @RGBParam(r=1, g=1, b=1) public Vec3 specular; @FloatParam(value=20, min=1, max=200.0f) public float shininess; @Override public Vertex shadevertex(mesh.vertex v) {...} @Override public Vec3 shadefragment(varyings varyings) {...}

+ Own Shader Creation MyCustomShader.java

Student Work 2010/2011

Student Work 2010/2011

Student Work 2010/2011

Student Work 2010/2011

Student Work 2010/2011

Student Work 2010/2011

Summary In our course undergraduate students implement fundamental features of a software renderer Our framework provides the initial code base and an interactive 3D editor around it Playful exploration of features and rich content interoperability highly motivates students

Heinrich Fink, hfink@cg.tuwien.ac.at Thomas Weber, ginko@cg.tuwien.ac.at Michael Wimmer, wimmer@cg.tuwien.ac.at