Phong Tessellation for Quads
|
|
- Marjorie James
- 5 years ago
- Views:
Transcription
1 Phong Tessellation for Quads Jonathan Dupuy 1,2 1 LIRIS, Université Lyon 1 2 LIGUM, Dept. I.R.O., Université de Montréal Figure 1: First 3 levels of Phong tessellation on a quad mesh (the leftmost surface is equivalent to the input mesh). Abstract Phong tessellation is a cheap solution to produce smooth surfaces from coarse meshes using tessellation. Although originally derived for triangles, it can easily be extended to quads. This paper shows how, and additionally derives the formulas to compute the tangents and bitangents of the surface at any location. A complete GLSL program is also provided. Phong Tessellation for Quads Phong tessellation provides a projection operator which, once interpolated across a polygon using its barycentric coordinates, produces a smooth surface. Given a quad with vertices p 0, p 1, p 2, p 3 and respective normals n 0, n 1, n 2, n 3, the smooth surface P at barycentric position (u, v) is given by P (u, v) def = (1 u) (1 v) π(q(u, v), p 0, n 0) (1) + u (1 v) π(q(u, v), p 1, n 1) + v (1 u) π(q(u, v), p 3, n 3) + uv π(q(u, v), p 2, n 2). The term π is the projection operator as defined originally by Boubekeur and Alex [1] π(q(u, v), p, n) = q(u, v) ((q(u, v) p) n) n, (2) where q(u, v) is the barycentric interpolation of each vertex The results are illustrated in Figure 1. jdupuy@liris.cnrs.fr q(u, v) = (1 u) (1 v) p 0 + u (1 v) p 1 + v (1 u) p 3 + uv p 2. (3) 1
2 Surface Tangents and Bitangents Providing a tangent frame on a surface may be useful for a variety of applications such as anisotropic shading for instance. The tangent and bitangent of a Phong Tessellated surface, respectively denoted as T (u, v) and B(u, v), can be retrieved from the gradients of P ( T (u, v) def xp = ( P ) u = ( B(u, v) def xp = ( P ) v = v, yp v, zp v A first developement yields (using the identity (fg) = f g + g f) ) t u, yp u, zp (4) u ) t. (5) T (u, v) = (v 1) π(q(u, v), p 0, n 0) + (1 u) (1 v) ( π) u(q(u, v), p 0, n 0) + (1 v) π(q(u, v), p 1, n 1) + u (1 v) ( π) u(q(u, v), p 1, n 1) v π(q(u, v), p 3, n 3) + v (1 u) ( π) u(q(u, v), p 3, n 3) + v π(q(u, v), p 2, n 2) + uv ( π) u(q(u, v), p 2, n 2) B(u, v) = (u 1) π(q(u, v), p 0, n 0) + (1 u) (1 v) ( π) v(q(u, v), p 0, n 0) u π(q(u, v), p 1, n 1) + u (1 v) ( π) v(q(u, v), p 1, n 1) + (1 u) π(q(u, v), p 3, n 3) + v (1 u) ( π) v(q(u, v), p 3, n 3) + u π(q(u, v), p 2, n 2) + uv ( π) v(q(u, v), p 2, n 2). The only terms left to solve are the gradients of the projection operator. Using the Chain Rule we find ( π) u = J π ( q) u (6) ( π) v = J π ( q) v (7) where J π is the jacobian of π with respect to the components of q = (x q, y q, z q) x π/ x q x π/ y q x π/ z q J π = y π/ x q y π/ y q y π/ z q (8) z π/ x q z π/ y q z π/ z q 1 x 2 n x ny n x nz n = x ny n 1 yn 2 y nz n. (9) x nz n y nz n 1 zn 2 Finding the gradients of q is also straightforward ( q) u = (v 1) p 0 + (1 v) p 1 v p 3 + v p 2 (10) ( q) v = (u 1) p 0 u p 1 + (1 u) p 3 + u p 2. (11) And so Equations (4,5) can be solved completely. As an illustration, Figure 2 shows the cross products of the tangent and bitangent (e.g. the true normals of the surface) of a Phong tessellated quad mesh. The noticeable discontinuities on the surface are generated at the edges of each patch because Phong tessellation generates C1 surfaces only [2]. In order to avoid this issue, C2 surfaces such as the ones generated by Catmull-Clark subdivision should be used. References [1] Tamy Boubekeur and Marc Alexa. Phong Tessellation. ACM Trans. Graphics (Proc. SIGGRAPH Asia), 27, [2] Thomas J. Cashman. Beyond Catmull-Clark? A Survey of Advances in Subdivision Surface Methods. Comput. Graph. Forum, 31(1):42 61, February
3 Figure 2: Left: Phong tessellation true normals. Right: Perspective interpolation of the normals provided to the patches before tessellation. GLSL Program Below is a complete GLSL program to produce Phong tessellated surfaces with an OpenGL4+ GPU. The shaders were tested on both Nvidia and AMD cards. The code puts emphasis on readability rather than peformance and is naturally far from optimal. Listing 1: Vertex Shader // V e r t e x s h a d e r in vec3 i_position ; in vec3 i_normal ; l a y o u t ( l o c a t i o n = 0) out vec3 o _ n o r m a l ; g l P o s i t i o n. xyz = i_position ; o_normal = i_normal ; Listing 2: Tessellation Control Shader // T e s s e l l a t i o n layout ( vertices layout ( location layout ( location Control shader = 4) out ; = 0) in vec3 i_normal [ ] ; = 0) out vec3 o _ n o r m a l [ ] ; uniform vec2 u_inner ; uniform vec4 u_outer ; // copy p o s i t i o n and normal gl_out [ gl_invocationid ]. g l P o s i t i o n = gl_in [ gl_invocationid ]. g l P o s i t i o n ; o_normal [ gl_invocationid ] = i_normal [ gl_invocationid ] ; // s e t i n n e r t e s s l e v e l s gl_tesslevelinner [ 0 ] = u_inner. x ; gl_tesslevelinner [ 1 ] = u_inner. y ; // s e t o u t e r t e s s levels [ 0 ] = u_outer [ 1 ] = u_outer [ 2 ] = u_outer [ 3 ] = u_outer.x;.y;.z;.w; 3
4 // T e s s e l l a t i o n E v a l u a t i o n shader l a y o u t ( quads, equal_ spacing, ccw ) i n ; l a y o u t ( location = 0) i n vec3 i _ normal [ ] ; l a y o u t ( l o c a t i o n = 0) out vec3 o _ t a n g e n t ; l a y o u t ( l o c a t i o n = 1) out vec3 o _ b i t a n g e n t ; uniform mat4 u _ mvp ; // b a r y c e n t r i c c o o r d i n a t e s f l o a t u = g l _ T e s s C o o r d. x ; f l o a t v = g l _ T e s s C o o r d. y ; // patch v e r t i c e s vec3 p0 = g l _ i n [ 0 ]. g l P o s i t i o n. xyz ; vec3 p1 = g l _ i n [ 1 ]. g l P o s i t i o n. xyz ; vec3 p2 = g l _ i n [ 2 ]. g l P o s i t i o n. xyz ; vec3 p3 = g l _ i n [ 3 ]. g l P o s i t i o n. xyz ; // patch normals vec3 n0 = i _ n o r m a l [ 0 ] ; vec3 n1 = i _ n o r m a l [ 1 ] ; vec3 n2 = i _ n o r m a l [ 2 ] ; vec3 n3 = i _ n o r m a l [ 3 ] ; // g e t i n t e r p o l a t e d p o s i t i o n vec3 q = pt_q ( p0, p1, p2, p3, u, v ) ; Listing 3: Tessellation Evaluation Shader // smooth s u r f a c e p o s i t i o n vec3 p = (1.0 u ) (1.0 v ) p t _ p i ( q, p0, n0 ) + u (1.0 v ) p t _ p i ( q, p1, n1 ) + (1.0 u ) v p t _ p i ( q, p3, n3 ) + u v p t _ p i ( q, p2, n2 ) ; // smooth s u r f a c e tangent vec3 dqdu = p t _ d q d u ( p0, p1, p2, p3, v ) ; vec3 t = ( v 1.0) p t _ p i ( q, p0, n0 ) + (1.0 u ) (1.0 v ) p t _ d p i d u ( dqdu, p0, n0 ) + (1.0 v ) p t _ p i ( q, p1, n1 ) + u (1.0 v ) p t _ d p i d u ( dqdu, p1, n1 ) v p t _ p i ( q, p3, n3 ) + v (1.0 u ) p t _ d p i d u ( dqdu, p3, n3 ) + v p t _ p i ( q, p2, n2 ) + u v p t _ d p i d u ( dqdu, p2, n2 ) ; // smooth s u r f a c e b i t a n g e n t vec3 dqdv = p t _ d q d v ( p0, p1, p2, p3, u ) ; vec3 b = ( u 1.0) p t _ p i ( q, p0, n0 ) + (1.0 u ) (1.0 v ) p t _ d p i d v ( dqdv, p0, n0 ) u p t _ p i ( q, p1, n1 ) + u (1.0 v ) p t _ d p i d v ( dqdv, p1, n1 ) + (1.0 u ) p t _ p i ( q, p3, n3 ) + v (1.0 u ) p t _ d p i d v ( dqdv, p3, n3 ) + u p t _ p i ( q, p2, n2 ) + u v p t _ d p i d v ( dqdv, p2, n2 ) ; // s e t v a r y i n g s o _ tangent = n o r m a l i z e ( t ) ; o _ bitangent = n o r m a l i z e ( b ) ; // p r o j e c t v e r t e x g l P o s i t i o n = u _ m v p vec4 ( p, 1. 0 ) ; // Fragment shader l a y o u t ( l o c a t i o n = 0) i n vec3 i _ t a n g e n t ; l a y o u t ( l o c a t i o n = 1) i n vec3 o _ b i t a n g e n t ; l a y o u t ( l o c a t i o n = 0) out vec3 o _ c o l o u r ; vec3 t = n o r m a l i z e ( i _ t a n g e n t ) ; vec3 b = n o r m a l i z e ( i _ b i t a n g e n t ) ; Listing 4: Fragment Shader // show Phong t e s s e l l a t i o n t r u e normal o _ c o l o u r = c r o s s ( t, b ) ; 4
5 Listing 5: Phong Tessellation Functions // q ( i n t e r p o l a t e d p o s i t i o n ) vec3 pt_q ( i n vec3 p0, i n vec3 p1, i n vec3 p2, i n vec3 p3, i n f l o a t u, i n f l o a t v ) { r e t u r n (1.0 u ) (1.0 v ) p0 + u (1.0 v ) p1 + (1.0 u ) v p3 + u v p2 ; // i n t e r p o l a t e d normal ( same as i n t e r p o l a t e d p o s i t i o n ) vec3 pt_n ( i n vec3 n0, i n vec3 n1, i n vec3 n2, i n vec3 n3, i n f l o a t u, i n f l o a t v ) { r e t u r n pt_q ( n0, n1, n2, n3, u, v ) ; // dq / dv vec3 p t _ d q d u ( in vec3 p0, in vec3 p1, in vec3 p2, in vec3 p3, in f l o a t v ) { return ( v 1.0) p0 + (1.0 v ) p1 v p3 + v p2 ; // dq / dv vec3 p t _ d q d v ( in vec3 p0, in vec3 p1, in vec3 p2, in vec3 p3, in f l o a t u ) { return ( u 1.0) p0 u p1 + (1.0 u ) p3 + u p2 ; // p i ( p r o j e c t i o n o p e r a t o r ) vec3 pt_ pi ( i n vec3 q, i n vec3 p, i n vec3 n ) { r e t u r n q dot ( q p, n ) n ; // dpi / du ( g r a d i e n t o f the p r o j e c t i o n o p e r a t o r with r e s p e c t to u ) vec3 p t _ d p i d u ( i n vec3 dqdu, i n vec3 p, i n vec3 n ) { vec3 g r a d x = vec3 ( 1. 0 n. x n. x, n. y n. x, n. z n. x ) ; vec3 g r a d y = vec3( n. x n. y, 1. 0 n. y n. y, n. z n. y ) ; vec3 g r a d z = vec3( n. x n. z, n. y n. z, 1. 0 n. z n. z ) ; return mat3 ( gradx, grady, gradz ) dqdu ; // dpi / dv ( g r a d i e n t o f the p r o j e c t i o n o p e r a t o r with r e s p e c t to v ) vec3 p t _ d p i d v ( i n vec3 dqdv, i n vec3 p, i n vec3 n ) { vec3 g r a d x = vec3 ( 1. 0 n. x n. x, n. y n. x, n. z n. x ) ; vec3 g r a d y = vec3( n. x n. y, 1. 0 n. y n. y, n. z n. y ) ; vec3 g r a d z = vec3( n. x n. z, n. y n. z, 1. 0 n. z n. z ) ; return mat3 ( gradx, grady, gradz ) dqdv ; 5
A Tessellated Parametric Triangular Bézier Patch
1 CS 457/557 Winter Quarter 2017 Project #7: A Tessellated Parametric Triangular Bézier Patch Due: March 15, 2017 A Parametric Line 2 P 1 P 0 B 0 = (1 u) B 1 = u } Blending Functions A Parametric Triangular
More informationTessellation Shaders
1 Tessellation Shaders Mike Bailey mjb@cs.oregonstate.edu tessellation.pptx Why do we need a Tessellation step right in the pipeline? You can perform adaptive subdivision based on a variety of criteria
More informationHW-Tessellation Basics
HW-Tessellation Basics Peter Houska Institute of Computer Graphics and Algorithms Vienna University of Technology Tessellation Video [UnHe] Institute of Computer Graphics and Algorithms 1 What is Tessellation?
More informationOUTLINE. Tessellation in OpenGL Tessellation of Bezier Surfaces Tessellation for Terrain/Height Maps Level of Detail
TESSELLATION 1 OUTLINE Tessellation in OpenGL Tessellation of Bezier Surfaces Tessellation for Terrain/Height Maps Level of Detail 2 THE EXAMPLE TESSELLATION SHADING Instead of specifying vertices, you
More informationHow to use tessellation to add geometric detail to your scenes. How to use geometry shaders to process whole primitives and create geometry on the fly
Chapter 8 Primitive Processing WHAT YOU LL LEARN IN THIS CHAPTER How to use tessellation to add geometric detail to your scenes How to use geometry shaders to process whole primitives and create geometry
More informationCGT520 Lighting. Lighting. T-vertices. Normal vector. Color of an object can be specified 1) Explicitly as a color buffer
CGT520 Lighting Lighting Color of an object can be specified 1) Explicitly as a color buffer Bedrich Benes, Ph.D. Purdue University Department of Computer Graphics 2) Implicitly from the illumination model.
More informationCS GPU and GPGPU Programming Lecture 7: Shading and Compute APIs 1. Markus Hadwiger, KAUST
CS 380 - GPU and GPGPU Programming Lecture 7: Shading and Compute APIs 1 Markus Hadwiger, KAUST Reading Assignment #4 (until Feb. 23) Read (required): Programming Massively Parallel Processors book, Chapter
More informationTamy Boubekeur & Christophe Schlick
Graphics Hardware (2005) M. Meissner, B.- O. Schneider (Editors) Generic Mesh Refinement on GPU Tamy Boubekeur & Christophe Schlick LaBRI INRIA CNRS University of Bordeaux, France Abstract Many recent
More informationEDAF80 Introduction to Computer Graphics. Seminar 3. Shaders. Michael Doggett. Slides by Carl Johan Gribel,
EDAF80 Introduction to Computer Graphics Seminar 3 Shaders Michael Doggett 2017 Slides by Carl Johan Gribel, 2010-13 Today OpenGL Shader Language (GLSL) Shading theory Assignment 3: (you guessed it) writing
More informationApproximating Subdivision Surfaces with Gregory Patches for Hardware Tessellation
Approximating Subdivision Surfaces with Gregory Patches for Hardware Tessellation Charles Loop Microsoft Research Scott Schaefer Texas A&M University Tianyun Ni NVIDIA Ignacio Castaño NVIDIA Goal Real-Time
More informationPrimitive processing and advanced shading architecture for embedded space. Digital Media Professionals, Inc
Primitive processing and advanced shading architecture for embedded space Maxim Kazakov Eisaku Ohbuchi Digital Media Professionals, Inc Contributions Vertex cache-accelerated fixed and variable size primitive
More informationCS 4620 Final Exam. (a) Is a circle C 0 continuous?
CS 4620 Final Exam Wednesday 9, December 2009 2 1 2 hours Prof. Doug James Explain your reasoning for full credit. You are permitted a double-sided sheet of notes. Calculators are allowed but unnecessary.
More informationObjectives Shading in OpenGL. Front and Back Faces. OpenGL shading. Introduce the OpenGL shading methods. Discuss polygonal shading
Objectives Shading in OpenGL Introduce the OpenGL shading methods - per vertex shading vs per fragment shading - Where to carry out Discuss polygonal shading - Flat - Smooth - Gouraud CITS3003 Graphics
More informationCS195V Week 3. GLSL Programming
CS195V Week 3 GLSL Programming Differences in OpenGL and GLSL 4.x A lot of changes made to GLSL 4.x spec (see: http://www. opengl.org/registry/doc/glslangspec.4.00.8.clean.pdf) CS123 used OpenGL 2.x and
More informationInformation Coding / Computer Graphics, ISY, LiTH. Splines
28(69) Splines Originally a drafting tool to create a smooth curve In computer graphics: a curve built from sections, each described by a 2nd or 3rd degree polynomial. Very common in non-real-time graphics,
More informationApproximate Catmull-Clark Patches. Scott Schaefer Charles Loop
Approximate Catmull-Clark Patches Scott Schaefer Charles Loop Approximate Catmull-Clark Patches Scott Schaefer Charles Loop Catmull-Clark Surface ACC-Patches Polygon Models Prevalent in game industry Very
More informationCS 432 Interactive Computer Graphics
CS 432 Interactive Computer Graphics Lecture 6 Part 2 Lighting and Shading in OpenGL Matt Burlick - Drexel University - CS 430 1 OpenGL Shading Need Vertex Normals Material properties Lights Position of
More informationCS 418: Interactive Computer Graphics. Basic Shading in WebGL. Eric Shaffer
CS 48: Interactive Computer Graphics Basic Shading in WebGL Eric Shaffer Some slides adapted from Angel and Shreiner: Interactive Computer Graphics 7E Addison-Wesley 205 Phong Reflectance Model Blinn-Phong
More informationCSE 4431/ M Advanced Topics in 3D Computer Graphics. TA: Margarita Vinnikov
CSE 4431/5331.03M Advanced Topics in 3D Computer Graphics TA: Margarita Vinnikov mvinni@cse.yorku.ca The OpenGL 4.x pipeline 2 new Programmable stages Tessellation Control Shader(GL_TESS_CONTROL_SHADER)
More informationX. GPU Programming. Jacobs University Visualization and Computer Graphics Lab : Advanced Graphics - Chapter X 1
X. GPU Programming 320491: Advanced Graphics - Chapter X 1 X.1 GPU Architecture 320491: Advanced Graphics - Chapter X 2 GPU Graphics Processing Unit Parallelized SIMD Architecture 112 processing cores
More informationDirect Rendering of Trimmed NURBS Surfaces
Direct Rendering of Trimmed NURBS Surfaces Hardware Graphics Pipeline 2/ 81 Hardware Graphics Pipeline GPU Video Memory CPU Vertex Processor Raster Unit Fragment Processor Render Target Screen Extended
More informationLecture 17: Shading in OpenGL. CITS3003 Graphics & Animation
Lecture 17: Shading in OpenGL CITS3003 Graphics & Animation E. Angel and D. Shreiner: Interactive Computer Graphics 6E Addison-Wesley 2012 Objectives Introduce the OpenGL shading methods - per vertex shading
More informationCS 130 Exam I. Fall 2015
S 3 Exam I Fall 25 Name Student ID Signature You may not ask any questions during the test. If you believe that there is something wrong with a question, write down what you think the question is trying
More informationECS 175 COMPUTER GRAPHICS. Ken Joy.! Winter 2014
ECS 175 COMPUTER GRAPHICS Ken Joy Winter 2014 Shading To be able to model shading, we simplify Uniform Media no scattering of light Opaque Objects No Interreflection Point Light Sources RGB Color (eliminating
More informationThe Rasterization Pipeline
Lecture 5: The Rasterization Pipeline Computer Graphics and Imaging UC Berkeley CS184/284A, Spring 2016 What We ve Covered So Far z x y z x y (0, 0) (w, h) Position objects and the camera in the world
More informationMotivation MGB Agenda. Compression. Scalability. Scalability. Motivation. Tessellation Basics. DX11 Tessellation Pipeline
MGB 005 Agenda Motivation Tessellation Basics DX Tessellation Pipeline Instanced Tessellation Instanced Tessellation in DX0 Displacement Mapping Content Creation Compression Motivation Save memory and
More informationobject (say a cube) will be made up of triangles, each with three vertices, each with known object coordinates.
hello world 3d: basic approach object (say a cube) will be made up of triangles, each with three vertices, each with known object coordinates. object coordinates of vertices will be put in an OpenGL buffer
More informationParametric description
Examples: surface of revolution Vase Torus Parametric description Parameterization for a subdivision curve Modeling Polygonal meshes Graphics I Faces Face based objects: Polygonal meshes OpenGL is based
More informationCS 130 Exam I. Fall 2015
CS 130 Exam I Fall 2015 Name Student ID Signature You may not ask any questions during the test. If you believe that there is something wrong with a question, write down what you think the question is
More informationObjectives. Introduce the OpenGL shading Methods 1) Light and material functions on MV.js 2) per vertex vs per fragment shading 3) Where to carry out
Objectives Introduce the OpenGL shading Methods 1) Light and material functions on MV.js 2) per vertex vs per fragment shading 3) Where to carry out 1 Steps in OpenGL shading Enable shading and select
More informationApproximating Catmull-Clark Subdivision Surfaces with Bicubic Patches
Approximating Catmull-Clark Subdivision Surfaces with Bicubic Patches Charles Loop Microsoft Research Scott Schaefer Texas A&M University April 24, 2007 Technical Report MSR-TR-2007-44 Microsoft Research
More informationRendering Subdivision Surfaces Efficiently on the GPU
Rendering Subdivision Surfaces Efficiently on the GPU Gy. Antal, L. Szirmay-Kalos and L. A. Jeni Department of Algorithms and their Applications, Faculty of Informatics, Eötvös Loránd Science University,
More informationAntialiasing Physically Based Shading with LEADR Mapping
Antialiasing Physically Based Shading with LEADR Mapping Part of: Physically Based Shading in Theory and Practice SIGGRAPH 2014 Course Jonathan Dupuy¹, ² ¹Université Lyon 1, LIRIS, CNRS ²Université de
More informationAdvanced Real- Time Cel Shading Techniques in OpenGL Adam Hutchins Sean Kim
Advanced Real- Time Cel Shading Techniques in OpenGL Adam Hutchins Sean Kim Cel shading, also known as toon shading, is a non- photorealistic rending technique that has been used in many animations and
More informationINF3320 Computer Graphics and Discrete Geometry
INF3320 Computer Graphics and Discrete Geometry More smooth Curves and Surfaces Christopher Dyken, Michael Floater and Martin Reimers 10.11.2010 Page 1 More smooth Curves and Surfaces Akenine-Möller, Haines
More informationAMCS / CS 247 Scientific Visualization Lecture 10: (GPU) Texture Mapping. Markus Hadwiger, KAUST
AMCS / CS 247 Scientific Visualization Lecture 10: (GPU) Texture Mapping Markus Hadwiger, KAUST Reading Assignment #5 (until Oct. 8) Read (required): Real-Time Volume Graphics, Chapter 2 (GPU Programming)
More informationA Real-time Micropolygon Rendering Pipeline. Kayvon Fatahalian Stanford University
A Real-time Micropolygon Rendering Pipeline Kayvon Fatahalian Stanford University Detailed surfaces Credit: DreamWorks Pictures, Shrek 2 (2004) Credit: Pixar Animation Studios, Toy Story 2 (1999) Credit:
More informationLighting and Shading II. Angel and Shreiner: Interactive Computer Graphics 7E Addison-Wesley 2015
Lighting and Shading II 1 Objectives Continue discussion of shading Introduce modified Phong model Consider computation of required vectors 2 Ambient Light Ambient light is the result of multiple interactions
More informationNear-Optimum Adaptive Tessellation of General Catmull-Clark Subdivision Surfaces
Near-Optimum Adaptive Tessellation of General Catmull-Clark Subdivision Surfaces Shuhua Lai and Fuhua (Frank) Cheng (University of Kentucky) Graphics & Geometric Modeling Lab, Department of Computer Science,
More informationCS GPU and GPGPU Programming Lecture 11: GPU Texturing 1. Markus Hadwiger, KAUST
CS 380 - GPU and GPGPU Programming Lecture 11: GPU Texturing 1 Markus Hadwiger, KAUST Reading Assignment #6 (until Mar. 9) Read (required): Programming Massively Parallel Processors book, Chapter 4 (CUDA
More informationComputer Graphics (CS 543) Lecture 8a: Per-Vertex lighting, Shading and Per-Fragment lighting
Computer Graphics (CS 543) Lecture 8a: Per-Vertex lighting, Shading and Per-Fragment lighting Prof Emmanuel Agu Computer Science Dept. Worcester Polytechnic Institute (WPI) Computation of Vectors To calculate
More informationEfficient GPU Rendering of Subdivision Surfaces. Tim Foley,
Efficient GPU Rendering of Subdivision Surfaces Tim Foley, 2017-03-02 Collaborators Activision Wade Brainerd Stanford Matthias Nießner NVIDIA Manuel Kraemer Henry Moreton 2 Subdivision surfaces are a powerful
More informationShading. Introduction to Computer Graphics Torsten Möller. Machiraju/Zhang/Möller/Fuhrmann
Shading Introduction to Computer Graphics Torsten Möller Machiraju/Zhang/Möller/Fuhrmann Reading Chapter 5.5 - Angel Chapter 6.3 - Hughes, van Dam, et al Machiraju/Zhang/Möller/Fuhrmann 2 Shading Illumination
More informationComputer Graphics CS 543 Lecture 13a Curves, Tesselation/Geometry Shaders & Level of Detail
Computer Graphics CS 54 Lecture 1a Curves, Tesselation/Geometry Shaders & Level of Detail Prof Emmanuel Agu Computer Science Dept. Worcester Polytechnic Institute (WPI) So Far Dealt with straight lines
More informationFast Third-Order Texture Filtering
Chapter 20 Fast Third-Order Texture Filtering Christian Sigg ETH Zurich Markus Hadwiger VRVis Research Center Current programmable graphics hardware makes it possible to implement general convolution filters
More informationFunctional Programming of Geometry Shaders
Functional Programming of Geometry Shaders Jiří Havel Faculty of Information Technology Brno University of Technology ihavel@fit.vutbr.cz ABSTRACT This paper focuses on graphical shader programming, which
More informationObjectives. Introduce Phong model Introduce modified Phong model Consider computation of required vectors Discuss polygonal shading.
Shading II 1 Objectives Introduce Phong model Introduce modified Phong model Consider computation of required vectors Discuss polygonal shading Flat Smooth Gouraud 2 Phong Lighting Model A simple model
More informationOPENGL RENDERING PIPELINE
CPSC 314 03 SHADERS, OPENGL, & JS UGRAD.CS.UBC.CA/~CS314 Textbook: Appendix A* (helpful, but different version of OpenGL) Alla Sheffer Sep 2016 OPENGL RENDERING PIPELINE 1 OPENGL RENDERING PIPELINE Javascript
More informationGraphics Shaders. Theory and Practice. Second Edition. Mike Bailey. Steve Cunningham. CRC Press. Taylor&FnincIs Croup tootutor London New York
Graphics Shaders Second Edition ' -i'nsst«i«{r szizt/siss?.aai^m&/gm^mmm3$8iw3ii Theory and Practice Mike Bailey Steve Cunningham CRC Press Taylor&FnincIs Croup tootutor London New York CRCPrea it an Imprint
More informationPipeline Operations. CS 4620 Lecture Steve Marschner. Cornell CS4620 Spring 2018 Lecture 11
Pipeline Operations CS 4620 Lecture 11 1 Pipeline you are here APPLICATION COMMAND STREAM 3D transformations; shading VERTEX PROCESSING TRANSFORMED GEOMETRY conversion of primitives to pixels RASTERIZATION
More informationCS770/870 Spring 2017 Open GL Shader Language GLSL
Preview CS770/870 Spring 2017 Open GL Shader Language GLSL Review traditional graphics pipeline CPU/GPU mixed pipeline issues Shaders GLSL graphics pipeline Based on material from Angel and Shreiner, Interactive
More informationCS770/870 Spring 2017 Open GL Shader Language GLSL
CS770/870 Spring 2017 Open GL Shader Language GLSL Based on material from Angel and Shreiner, Interactive Computer Graphics, 6 th Edition, Addison-Wesley, 2011 Bailey and Cunningham, Graphics Shaders 2
More informationSubdivision. Outline. Key Questions. Subdivision Surfaces. Advanced Computer Graphics (Spring 2013) Video: Geri s Game (outside link)
Advanced Computer Graphics (Spring 03) CS 83, Lecture 7: Subdivision Ravi Ramamoorthi http://inst.eecs.berkeley.edu/~cs83/sp3 Slides courtesy of Szymon Rusinkiewicz, James O Brien with material from Denis
More informationLocalized Construction of Curved Surfaces from Polygon Meshes: A Simple and Practical Approach on GPU
Localized Construction of Curved Surfaces from Polygon Meshes: A Simple and Practical Approach on GPU Yuen-Shan Leung Charlie C.L. Wang Yunbo Zhang Department of Mechanical and Automation Engineering,
More informationCSE 167: Lecture #8: GLSL. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012
CSE 167: Introduction to Computer Graphics Lecture #8: GLSL Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012 Announcements Homework project #4 due Friday, November 2 nd Introduction:
More informationDeus Ex is in the Details
Deus Ex is in the Details Augmenting the PC graphics of Deus Ex: Human Revolution using DirectX 11 technology Matthijs De Smedt Graphics Programmer, Nixxes Software Overview Introduction DirectX 11 implementation
More informationCS770/870 Fall 2015 Advanced GLSL
Expanded Graphics Pipeline CS770/870 Fall 2015 Advanced GLSL Geometry definition Shaders can actually be inserted in more places in pipeline Vertex and fragment shaders are most important Vertex shader
More informationComputer Graphics (CS 543) Lecture 10: Soft Shadows (Maps and Volumes), Normal and Bump Mapping
Computer Graphics (CS 543) Lecture 10: Soft Shadows (Maps and Volumes), Normal and Bump Mapping Prof Emmanuel Agu Computer Science Dept. Worcester Polytechnic Institute (WPI) Shadow Buffer Theory Observation:
More informationPipeline Operations. CS 4620 Lecture 14
Pipeline Operations CS 4620 Lecture 14 2014 Steve Marschner 1 Pipeline you are here APPLICATION COMMAND STREAM 3D transformations; shading VERTEX PROCESSING TRANSFORMED GEOMETRY conversion of primitives
More informationNotes on Computer Graphics and OpenGL. Thomas Strathmann
Notes on Computer Graphics and OpenGL Thomas Strathmann February 2, 2011 Preface The purpose of this document is to server as a sort of logbook in which I put down all the interesting math and assorted
More informationProcedural Shaders: A Feature Animation Perspective
Procedural Shaders: A Feature Animation Perspective Hector Yee, Rendering Specialist, PDI/DreamWorks David Hart, Senior FX Developer, PDI/DreamWorks Arcot Preetham, Engineer, ATI Research Motivation Movies
More informationTechnical Report. Removing polar rendering artifacts in subdivision surfaces. Ursula H. Augsdörfer, Neil A. Dodgson, Malcolm A. Sabin.
Technical Report UCAM-CL-TR-689 ISSN 1476-2986 Number 689 Computer Laboratory Removing polar rendering artifacts in subdivision surfaces Ursula H. Augsdörfer, Neil A. Dodgson, Malcolm A. Sabin June 2007
More informationA Trip Down The (2011) Rasterization Pipeline
A Trip Down The (2011) Rasterization Pipeline Aaron Lefohn - Intel / University of Washington Mike Houston AMD / Stanford 1 This talk Overview of the real-time rendering pipeline available in ~2011 corresponding
More informationProgramming with OpenGL Part 3: Shaders. Ed Angel Professor of Emeritus of Computer Science University of New Mexico
Programming with OpenGL Part 3: Shaders Ed Angel Professor of Emeritus of Computer Science University of New Mexico 1 Objectives Simple Shaders - Vertex shader - Fragment shaders Programming shaders with
More information2.11 Particle Systems
2.11 Particle Systems 320491: Advanced Graphics - Chapter 2 152 Particle Systems Lagrangian method not mesh-based set of particles to model time-dependent phenomena such as snow fire smoke 320491: Advanced
More informationREAL-TIME SMOOTH SURFACE CONSTRUCTION ON THE GRAPHICS PROCESSING UNIT
REAL-TIME SMOOTH SURFACE CONSTRUCTION ON THE GRAPHICS PROCESSING UNIT By TIANYUN NI A DISSERTATION PRESENTED TO THE GRADUATE SCHOOL OF THE UNIVERSITY OF FLORIDA IN PARTIAL FULFILLMENT OF THE REQUIREMENTS
More informationReview of Tuesday. ECS 175 Chapter 3: Object Representation
Review of Tuesday We have learnt how to rasterize lines and fill polygons Colors (and other attributes) are specified at vertices Interpolation required to fill polygon with attributes 26 Review of Tuesday
More informationConsistent Normal Interpolation
Consistent Normal Interpolation Alexander Reshetov Alexei Soupikov William R. Mark Intel ray-tracing using environment lighting using (e grazing angles and silhouettes using Phong normals (a Phong normals
More informationGLSL Introduction. Fu-Chung Huang. Thanks for materials from many other people
GLSL Introduction Fu-Chung Huang Thanks for materials from many other people Shader Languages Currently 3 major shader languages Cg (Nvidia) HLSL (Microsoft) Derived from Cg GLSL (OpenGL) Main influences
More informationComputergrafik. Matthias Zwicker Universität Bern Herbst 2016
Computergrafik Matthias Zwicker Universität Bern Herbst 2016 2 Today Basic shader for texture mapping Texture coordinate assignment Antialiasing Fancy textures 3 Texture mapping Glue textures (images)
More informationProgrammable GPUs. Real Time Graphics 11/13/2013. Nalu 2004 (NVIDIA Corporation) GeForce 6. Virtua Fighter 1995 (SEGA Corporation) NV1
Programmable GPUs Real Time Graphics Virtua Fighter 1995 (SEGA Corporation) NV1 Dead or Alive 3 2001 (Tecmo Corporation) Xbox (NV2A) Nalu 2004 (NVIDIA Corporation) GeForce 6 Human Head 2006 (NVIDIA Corporation)
More informationSpline Surfaces, Subdivision Surfaces
CS-C3100 Computer Graphics Spline Surfaces, Subdivision Surfaces vectorportal.com Trivia Assignment 1 due this Sunday! Feedback on the starter code, difficulty, etc., much appreciated Put in your README
More informationCg 2.0. Mark Kilgard
Cg 2.0 Mark Kilgard What is Cg? Cg is a GPU shading language C/C++ like language Write vertex-, geometry-, and fragmentprocessing kernels that execute on massively parallel GPUs Productivity through a
More informationQuick Shader 0.1 Beta
Quick Shader 0.1 Beta Documentation (last update 2014-07-10) QuickShader is a program that allows you to write and test shaders without creating your own rendering engine. Using this tool you can quickly
More informationAdvanced Shading and Texturing
Real-Time Graphics Architecture Kurt Akeley Pat Hanrahan http://www.graphics.stanford.edu/courses/cs448a-01-fall Advanced Shading and Texturing 1 Topics Features Bump mapping Environment mapping Shadow
More informationGLSL Introduction. Fu-Chung Huang. Thanks for materials from many other people
GLSL Introduction Fu-Chung Huang Thanks for materials from many other people Programmable Shaders //per vertex inputs from main attribute aposition; attribute anormal; //outputs to frag. program varying
More information9. [20 points] A degree three Bezier curve q(u) has the four control points p 0 = 0,0, p 1 = 2,0, p 2 = 0,2, and p 3 = 4,4.
Name: 8 7. [10 points] A color has RGB specification of R = 1 and G = 1 2 and B = 3 4. (R,G,B color values are in the range 0 to 1.) What is the hue value (H) of this color? Express the hue by a value
More informationAnalysis and Implementation of Local Subdivision Algorithms in the GPU
Analysis and Implementation of Local Subdivision Algorithms in the GPU Gustavo Nunes Rodrigo Braga Alexandre Valdetaro Alberto Raposo Bruno Feijó Pontifical Catholic University of Rio de Janeiro (PUC-Rio)
More informationModule Contact: Dr Stephen Laycock, CMP Copyright of the University of East Anglia Version 1
UNIVERSITY OF EAST ANGLIA School of Computing Sciences Main Series PG Examination 2013-14 COMPUTER GAMES DEVELOPMENT CMPSME27 Time allowed: 2 hours Answer any THREE questions. (40 marks each) Notes are
More information- Rasterization. Geometry. Scan Conversion. Rasterization
Computer Graphics - The graphics pipeline - Geometry Modelview Geometry Processing Lighting Perspective Clipping Scan Conversion Texturing Fragment Tests Blending Framebuffer Fragment Processing - So far,
More informationReal - Time Rendering. Graphics pipeline. Michal Červeňanský Juraj Starinský
Real - Time Rendering Graphics pipeline Michal Červeňanský Juraj Starinský Overview History of Graphics HW Rendering pipeline Shaders Debugging 2 History of Graphics HW First generation Second generation
More informationRemoving Polar Rendering Artifacts in Subdivision Surfaces
This is an electronic version of an article published in Journal of Graphics, GPU, and Game Tools, Volume 14, Issue 2 pp. 61-76, DOI: 10.1080/2151237X.2009.10129278. The Journal of Graphics, GPU, and Game
More informationCS GPU and GPGPU Programming Lecture 12: GPU Texturing 1. Markus Hadwiger, KAUST
CS 380 - GPU and GPGPU Programming Lecture 12: GPU Texturing 1 Markus Hadwiger, KAUST Reading Assignment #6 (until Mar. 17) Read (required): Programming Massively Parallel Processors book, Chapter 4 (CUDA
More informationSurface Graphics. 200 polys 1,000 polys 15,000 polys. an empty foot. - a mesh of spline patches:
Surface Graphics Objects are explicitely defined by a surface or boundary representation (explicit inside vs outside) This boundary representation can be given by: - a mesh of polygons: 200 polys 1,000
More informationSemi-uniform, 2-Different Tessellation of Triangular Parametric Surfaces
See discussions, stats, and author profiles for this publication at: https://www.researchgate.net/publication/220844859 Semi-uniform, 2-Different Tessellation of Triangular Parametric Surfaces CONFERENCE
More informationCIS 665 GPU Programming and Architecture
Homework #2 Due: June 6/3/09 CIS 665 GPU Programming and Architecture 1) Bezier Curves & Color Shaping (30 points) Background: The concept of color shaping was introduced in Lecture 2 as a demonstration
More informationShadows. Prof. George Wolberg Dept. of Computer Science City College of New York
Shadows Prof. George Wolberg Dept. of Computer Science City College of New York Objectives Introduce Shadow Algorithms Expand to projective textures 2 Flashlight in the Eye Graphics When do we not see
More informationShader Programs. Lecture 30 Subsections 2.8.2, Robb T. Koether. Hampden-Sydney College. Wed, Nov 16, 2011
Shader Programs Lecture 30 Subsections 2.8.2, 2.8.3 Robb T. Koether Hampden-Sydney College Wed, Nov 16, 2011 Robb T. Koether (Hampden-Sydney College) Shader Programs Wed, Nov 16, 2011 1 / 43 Outline 1
More informationFall CSCI 420: Computer Graphics. 4.2 Splines. Hao Li.
Fall 2014 CSCI 420: Computer Graphics 4.2 Splines Hao Li http://cs420.hao-li.com 1 Roller coaster Next programming assignment involves creating a 3D roller coaster animation We must model the 3D curve
More informationProgramming with OpenGL Shaders I. Adapted From: Ed Angel Professor of Emeritus of Computer Science University of New Mexico
Programming with OpenGL Shaders I Adapted From: Ed Angel Professor of Emeritus of Computer Science University of New Mexico 0 Objectives Shader Basics Simple Shaders Vertex shader Fragment shaders 1 Vertex
More informationComputer Graphics with OpenGL ES (J. Han) Chapter XI Normal Mapping
Chapter XI Normal Mapping Bumpy Surfaces Image texturing only Fast Not realistic Highly tessellated mesh Realistic Slow 11-2 Surface Normal and Lighting Recall the interaction among light sources, surfaces,
More informationLecture 4: Geometry Processing. Kayvon Fatahalian CMU : Graphics and Imaging Architectures (Fall 2011)
Lecture 4: Processing Kayvon Fatahalian CMU 15-869: Graphics and Imaging Architectures (Fall 2011) Today Key per-primitive operations (clipping, culling) Various slides credit John Owens, Kurt Akeley,
More informationMach band effect. The Mach band effect increases the visual unpleasant representation of curved surface using flat shading.
Mach band effect The Mach band effect increases the visual unpleasant representation of curved surface using flat shading. A B 320322: Graphics and Visualization 456 Mach band effect The Mach band effect
More informationPNG1 Triangles for Tangent Plane Continuous Surfaces on the GPU
PNG Triangles for Tangent Plane Continuous Surfaces on the GPU Christoph Fünfzig, 2 Kerstin Müller, 2 Dianne Hansford Gerald Farin PRISM Lab, Arizona State University, Tempe, USA 2 Computer Graphics and
More informationCurve Corner Cutting
Subdivision ision Techniqueses Spring 2010 1 Curve Corner Cutting Take two points on different edges of a polygon and join them with a line segment. Then, use this line segment to replace all vertices
More informationSurface Displacement moving vertices
Catlike Coding Unity C# Tutorials Surface Displacement moving vertices Adjust vertex positions on the GPU. Tessellate shadow geometry. Skip tessellating unseen triangles. This tutorial follow Tessellation
More informationC P S C 314 S H A D E R S, O P E N G L, & J S RENDERING PIPELINE. Mikhail Bessmeltsev
C P S C 314 S H A D E R S, O P E N G L, & J S RENDERING PIPELINE UGRAD.CS.UBC.C A/~CS314 Mikhail Bessmeltsev 1 WHAT IS RENDERING? Generating image from a 3D scene 2 WHAT IS RENDERING? Generating image
More informationTexture Mapping 1/34
Texture Mapping 1/34 Texture Mapping Offsets the modeling assumption that the BRDF doesn t change in u and v coordinates along the object s surface Store a reflectance as an image called a texture Map
More informationComputer Graphics. Lecture 14 Bump-mapping, Global Illumination (1)
Computer Graphics Lecture 14 Bump-mapping, Global Illumination (1) Today - Bump mapping - Displacement mapping - Global Illumination Radiosity Bump Mapping - A method to increase the realism of 3D objects
More informationLecture 2. Shaders, GLSL and GPGPU
Lecture 2 Shaders, GLSL and GPGPU Is it interesting to do GPU computing with graphics APIs today? Lecture overview Why care about shaders for computing? Shaders for graphics GLSL Computing with shaders
More information