Dynamic Gaze-Contingent Rendering Complexity Scaling By Luke Paireepinart.

Slides:



Advertisements
Similar presentations
Accelerating Real-Time Shading with Reverse Reprojection Caching Diego Nehab 1 Pedro V. Sander 2 Jason Lawrence 3 Natalya Tatarchuk 4 John R. Isidoro 4.
Advertisements

TRANSFORM FEEDBACK ALEX ECKER AND AARON EMMERT. WHAT IS TRANSFORM FEEDBACK? OpenGl says: Transform Feedback is the process of altering the rendering pipeline.
Exploration of advanced lighting and shading techniques
POST-PROCESSING SET09115 Intro Graphics Programming.
COMPUTER GRAPHICS CS 482 – FALL 2014 NOVEMBER 10, 2014 GRAPHICS HARDWARE GRAPHICS PROCESSING UNITS PARALLELISM.
IGCSE Coursework August 2011 The write up for this experiment should be word processed if possible A hard copy should be submitted by next Monday No excuses.
Ray tracing. New Concepts The recursive ray tracing algorithm Generating eye rays Non Real-time rendering.
Bump Mapping CSE 781 Roger Crawfis.
RealityEngine Graphics Kurt Akeley Silicon Graphics Computer Systems.
Week 7 - Monday.  What did we talk about last time?  Specular shading  Aliasing and antialiasing.
GI 2006, Québec, June 9th 2006 Implementing the Render Cache and the Edge-and-Point Image on Graphics Hardware Edgar Velázquez-Armendáriz Eugene Lee Bruce.
Week 11 - Wednesday.  Image based effects  Skyboxes  Lightfields  Sprites  Billboards  Particle systems.
Evaluation of Electronic MCQ/EMQ Examinations 2008/9.
Rasterization and Ray Tracing in Real-Time Applications (Games) Andrew Graff.
Status – Week 247 Victor Moya. Summary Streamer. Streamer. TraceDriver. TraceDriver. bGPU bGPU Signal Traffic Analyzer. Signal Traffic Analyzer.
IN4151 Introduction 3D graphics 1 Introduction to 3D computer graphics part 2 Viewing pipeline Multi-processor implementation GPU architecture GPU algorithms.
SM3121 Software Technology Mark Green School of Creative Media.
3-D RENDERING Peter Moore Jackson Cwach. What 3-D Rendering is 3D rendering is the 3D computer graphics process of automatically converting 3D wire frame.
Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College.
Realtime 3D Computer Graphics Computer Graphics Computer Graphics Software & Hardware Rendering Software & Hardware Rendering 3D APIs 3D APIs Pixel & Vertex.
REAL-TIME VOLUME GRAPHICS Christof Rezk Salama Computer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006 Real-Time Volume.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
GPU Programming Robert Hero Quick Overview (The Old Way) Graphics cards process Triangles Graphics cards process Triangles Quads.
Real-time Graphical Shader Programming with Cg (HLSL)
Geometric Objects and Transformations. Coordinate systems rial.html.
Chris Kerkhoff Matthew Sullivan 10/16/2009.  Shaders are simple programs that describe the traits of either a vertex or a pixel.  Shaders replace a.
A Crash Course in HLSL Matt Christian.
CS 450: COMPUTER GRAPHICS REVIEW: INTRODUCTION TO COMPUTER GRAPHICS – PART 2 SPRING 2015 DR. MICHAEL J. REALE.
Matrices from HELL Paul Taylor Basic Required Matrices PROJECTION WORLD VIEW.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
1 Rendering Geometry with Relief Textures L.Baboud X.Décoret ARTIS-GRAVIR/IMAG-INRIA.
Tiger Woods 2008: Advancements in Environments Peter Arisman Technical Art Director Tiger Woods 2008.
Computer Graphics The Rendering Pipeline - Review CO2409 Computer Graphics Week 15.
Shadow Mapping Chun-Fa Chang National Taiwan Normal University.
GRAPHICS PIPELINE & SHADERS SET09115 Intro to Graphics Programming.
Shader Study 이동현. Vision engine   Games Helldorado The Show Warlord.
Reference: The Game Loop Animation / Game loop 1. Update variables 2. [Get input from the user] (GameLoop only) 3. Draw (using variables)
09/16/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Environment mapping Light mapping Project Goals for Stage 1.
- Laboratoire d'InfoRmatique en Image et Systèmes d'information
CSCE 552 Spring D Models By Jijun Tang. Triangles Fundamental primitive of pipelines  Everything else constructed from them  (except lines and.
Advanced Computer Graphics Spring 2014 K. H. Ko School of Mechatronics Gwangju Institute of Science and Technology.
OpenGL-ES 3.0 And Beyond Boston Photo credit :Johnson Cameraface OpenGL Basics.
Game Programming Patterns Game Loop From the book by Robert Nystrom
Havok FX Physics on NVIDIA GPUs. Copyright © NVIDIA Corporation 2004 What is Effects Physics? Physics-based effects on a massive scale 10,000s of objects.
Maths & Technologies for Games Advanced Graphics: Scene Post-Processing CO3303 Week
COMPUTER GRAPHICS CS 482 – FALL 2015 SEPTEMBER 29, 2015 RENDERING RASTERIZATION RAY CASTING PROGRAMMABLE SHADERS.
Ray Tracing using Programmable Graphics Hardware
11 Adding a Bread Bat Session Session Overview  We have created a cheese sprite that bounces around the display  We now need to create a bread.
GPU Computing for GIS James Mower Department of Geography and Planning University at Albany.
CMSC 104, Section 301, Fall Lecture 18, 11/11/02 Functions, Part 1 of 3 Topics Using Predefined Functions Programmer-Defined Functions Using Input.
An Introduction to the Cg Shading Language Marco Leon Brandeis University Computer Science Department.
COMP 175 | COMPUTER GRAPHICS Remco Chang1/XX13 – GLSL Lecture 13: OpenGL Shading Language (GLSL) COMP 175: Computer Graphics April 12, 2016.
Build your own 2D Game Engine and Create Great Web Games using HTML5, JavaScript, and WebGL. Sung, Pavleas, Arnez, and Pace, Chapter 5 Examples 1.
Reference: What is it? A multimedia python library – Window Management – Graphics geometric shapes bitmaps (sprites) – Input Mouse Keyboard.
Introduction to 3-D Viewing Glenn G. Chappell U. of Alaska Fairbanks CS 381 Lecture Notes Monday, October 27, 2003.
How to use a Pixel Shader CMT3317. Pixel shaders There is NO requirement to use a pixel shader for the coursework though you can if you want to You should.
From VIC (VRVS) to ViEVO (EVO) 3 years of experiences with developing of video application VIC for VRVS allowed us to develop a new video application.
2D Graphics Optimizations
Scene Manager Creates and places movable objects like lights and cameras so as to access them efficiently, e.g. for rendering. Loads and assembles world.
Reflective Shadow Mapping By: Mitchell Allen.
Week 11 - Wednesday CS361.
Chapter 3 Drawing In the World.
Deferred Lighting.
The Graphics Rendering Pipeline
CS451Real-time Rendering Pipeline
Introduction to Computer Graphics with WebGL
Static Image Filtering on Commodity Graphics Processors
Debugging Tools Tim Purcell NVIDIA.
CIS 441/541: Introduction to Computer Graphics Lecture 15: shaders
Frame Buffer Applications
Presentation transcript:

Dynamic Gaze-Contingent Rendering Complexity Scaling By Luke Paireepinart

Initial Objectives Use the eye sensitivity function Dynamically adjust rendering complexity Increase average frame rate Make the degradation as unnoticeable as possible Complete a real implementation in a single semester Get extra credit points

Project Implementation Environment

Panda3D justification Made by Disney and CMU Originally commercial, now Open-Source Windows support Commercial Applications & Games Integrated w/ Python (vs. pyOGRE etc.) Extremely fast engine But most of all…..

Shader Support with CG vs. HLSL vs. GLSL Shaders are really neat

Shader Pipeline Vertex Shader – Modifies vertex positions, as well as colors / texcoords (which are LERP’ed) Geometry Shader – Creates new vertexes Pixel / Fragment Shader – Determines final rendering color of every pixel

What the heck is LERP?! Linear IntERPolation

Shader Complexity Vertex Shader Speed – Determined by the number of visible (basically) vertexes in the scene Fragment Shader Speed – Run for every pixel on the screen (for specific models w/ fragment shaders applied)

Example Vertex Shaders

Example Geometry Shaders

Example Pixel Shaders

How ridiculously fast the GPU is 1680x1050 display = 1,764,000 pixels on screen, 1920x1200 display = 2,304,000 pixels on screen! Can have multiple fragment shaders per pixel 8800GT runs my shader at ~700 FPS at 1680x1050 That’s 1,234,800,000 function calls a second! The 9800GT = $85 new on Newegg 9800GT == 8800GT (they are EXACTLY the same card)

Bump Mapping + =

No Live Demonstration Laptop doesn’t support shaders Panda3D can’t be installed on school computers Desktop is enormous & I don’t want to carry it Screenshots/video will have to do – I’ll send you the program later if you’re interested and you ask nicely

Actual Running Example

Youtube Video It’s much smoother in real life (recorded at 60 FPS, encoded at FPS, result… judder)

Approach Justification Bump-mapping is a simple example, but… – Shader is reusable – Modifications are easy – Template could be created – Could be integrated into every pixel shader automatically by engine – Could be integrated into vertex / geometry shaders as well

Deviation from Spec Render stops at a specific point (no sensitivity function, just a hard drop-off) vs No speed gain in areas where rendering is done partially (for most effects)

Idealistic Goals Great speedup Unnoticeable degradation of effect Easy implementation – Everyone’s happy!

Unfortunate Reality Branching in GPU code is not implemented well If your code follows two different branches it is not optimized correctly by the compiler, and automatically gets slowed down by about 8% Even with identical code in both branches, there was still that 8% slowdown if the branch was taken only during certain calls This may be due to a cache miss, but seems unlikely

Unfortunate Reality Bumpmapping creates contrast Lack of contrast in peripheral is still noticeable – It’s not necessarily distracting but the effect is not as seamless as you might wish Updating mouse position creates massive slowdown while mouse is moving – Still was >400FPS in the example with mouse waving

Unfortunate Reality CG REALLY SUCKS – Variable passing is not implemented in a sensible manner – Certain variables have to be copied to a new variable and re-aliased before they’re passed – Even just ACCESSING the wrong variable can cause everything to break – NO REALLY, check it out…

CG Sucks Passthrough Fragment Shader Commented variable access //l_position; o_color = tex2D(tex_0, l_texcoord0); o_color.w = 1.0; Uncommented variable access l_position; o_color = tex2D(tex_0, l_texcoord0); o_color.w = 1.0;

Actual Performance Characteristics During regular run at 1680x1050 (windowed) FPS with full-screen bumpmapping FPS with area bumpmapping During regular run at 1680x1050 (fullscreen) Exactly the same as above results Yeah, I thought fullscreen would be faster too – I ran it on Windows XP. On Win7, windowed mode is automatically VSYNCed so FPS would be 60 (for my monitors (and probably yours too))

How we could make this actually speed up rendering process GPU branching needs to be made more efficient Use effects that are so complicated to calculate that the speed improvement is worth the branching slowdown Modify specific effects to be scaled without a branch (using the distance from center directly) – But this solution is not as universal as the original and relies on the implementer too much

Other ways to speed up games Dynamic model complexity scaling – This would be implemented in the engine, not shaders Vertex Shader scaling – This is a logical progression from the pixel shader approach and is essentially identical Geometry Shader scaling – Same as above

Fragment Shader definition void fshader(float4 l_position : POSITION, float4 l_my_position: TEXCOORD0, float2 l_texcoord0, float3 l_lightvec, float3 l_pointpos, uniform float4 k_mousepos: C6, uniform float4 mspos_light : C7, sampler2D tex_0, sampler2D tex_1, out float4 o_color : COLOR)

Fragment Shader implementation // “point” is the location of the pixel itself on the screen float2 point = float2(l_my_position[0]/l_my_position[3],l_my_position[1]/l_my_position[3]); // “point2” is the location of the mouse on the screen float2 point2 = float2(k_mousepos[0], k_mousepos[1]); // in_area determines if the position of the pixel is within x distance of the mouse. // k_mousepos[2] is actually a flag for enabling/disabling the effect. bool in_area = (k_mousepos[2] >.9 && distance(point, point2) <.5) || k_mousepos[2] <.1; // everything will be white if it’s in the center and white otherwise. if (in_area) o_color = float4(1,1,1,1); else o_color = float4(0,0,0,1);

The End