1 Introduction to the Hardware Graphics Pipeline Introduction To

Total Page:16

File Type:pdf, Size:1020Kb

1 Introduction to the Hardware Graphics Pipeline Introduction To Overview of the Tutorial: Morning Tutorial 5: Programming Graphics Hardware 8:30 Introduction to the Hardware Graphics Pipeline Introduction to Cyril Zeller the Hardware Graphics Pipeline 9:30 Controlling the GPU from the CPU: the 3D API Cyril Zeller Cyril Zeller 10:15 Break 10:45 Programming the GPU: High-level Shading Languages Randy Fernando 12:00 Lunch Tutorial 5: Programming Graphics Hardware Overview of the Tutorial: Afternoon Overview Concepts: 12:00 Lunch Real-time rendering 14:00 Optimizing the Graphics Pipeline Hardware graphics pipeline Matthias Wloka Evolution of the PC hardware graphics pipeline: 14:45 Advanced Rendering Techniques 1995-1998: Texture mapping and z-buffer Matthias Wloka 1998: Multitexturing 15:45 Break 1999-2000: Transform and lighting 16:15 General-Purpose Computation Using Graphics Hardware 2001: Programmable vertex shader Mark Harris 2002-2003: Programmable pixel shader 2004: Shader model 3.0 and 64-bit color support 17:30 End PC graphics software architecture Performance numbers Tutorial 5: Programming Graphics Hardware Tutorial 5: Programming Graphics Hardware Real-Time Rendering Hardware Graphics Pipeline Graphics hardware enables real-time rendering Application Geometry Rasterization 3D Triangles 2D Triangles Pixels Real-time means display rate at more than 10 images per second Stage Stage Stage For each For each triangle: triangle vertex: Rasterize Transform triangle 3D position Interpolate into vertex attributes screen position across triangle Compute Shade attributes pixels 3D Scene = Image = Resolve visibility Collection of Array of pixels 3D primitives (triangles, lines, points) Tutorial 5: Programming Graphics Hardware Tutorial 5: Programming Graphics Hardware 1 PC Architecture 1995-1998: Texture Mapping and Z-Buffer CPU GPU Motherboard Application / Geometry Stage Rasterization Stage Raster Texture Central Processor Unit (CPU) Rasterizer Operations Unit Unit System Memory Bus Port (PCI, AGP, PCIe) 2D Triangles Bus Frame 2D Triangles Textures Textures (PCI) Buffer Video Memory System Memory Video Memory Graphics Processor Unit (GPU) PCI: Peripheral Component Interconnect 3dfx’s Voodoo Video Board Tutorial 5: Programming Graphics Hardware Tutorial 5: Programming Graphics Hardware Texture Mapping Texture Mapping: Texture Coordinates Interpolation Triangle Meshtextured with Base Texture Screen Space Texture Space x u (x1, y1) + y v (u1, v1) (x, y) (x0, y0) (u, v) (x2, y2) (u0, v0) = (u2, v2) Tutorial 5: Programming Graphics Hardware Tutorial 5: Programming Graphics Hardware Texture Mapping: Perspective-Correct Interpolation Texture Mapping: Magnification Screen Space Texture Space x u y v Perspective-Incorrect Perspective-Correct or Nearest-Point Sampling Bilinear Filtering Tutorial 5: Programming Graphics Hardware Tutorial 5: Programming Graphics Hardware 2 Texture Mapping: Minification Texture Mapping: Mipmapping Screen Space Texture Space x u y v or Bilinear Filtering Trilinear Filtering Tutorial 5: Programming Graphics Hardware Tutorial 5: Programming Graphics Hardware Texture Mapping: Anisotropic Filtering Texture Mapping: Addressing Modes or Wrap Mirror Bilinear Filtering Trilinear Filtering Tutorial 5: Programming Graphics Hardware Tutorial 5: Programming Graphics Hardware Texture Mapping: Addressing Modes Raster Operations Unit (ROP) Raster Operations stencil buffer value Unit at (x, y) tested against Texture Rasterizer Fragments Scissor Test reference value Unit Fragment Alpha Test tested against Frame Buffer Screen Position (x, y) scissor rectangle Stencil Test Stencil Buffer tested against Alpha Value a reference value Z Test Z-Buffer tested against Depth z z-buffer value at (x, y) Color Buffer (visibility test) Alpha Blending Pixels blended with color buffer value at (x, y): Clamp Border Color (r, g, b) Ksrc * Colorsrc + Kdst * Colorsrc (src = fragment dst = color buffer) Tutorial 5: Programming Graphics Hardware Tutorial 5: Programming Graphics Hardware 3 1998: Multitexturing AGP CPU GPU PCI uses a parallel connection Application / Geometry Stage Rasterization Stage AGP uses a serial connection Raster Multitexture Rasterizer Operations → Less pins, simpler protocol → Cheaper, more scalable Unit Unit PCI uses a shared-bus protocol AGP uses a point-to-point protocol → Bandwidth is not shared among devices 2D Triangles Bus Frame 2D Triangles Textures Textures (AGP) Buffer AGP uses a dedicated system memory called AGP memory or non-local video memory System Memory Video Memory The GPU can lookup textures that resides in AGP memory AGP: Accelerated Graphics Port NVIDIA’s TNT, ATI’s Rage Bandwidth: AGP = 2 x PCI (AGP2x = 2 x AGP, etc.) Tutorial 5: Programming Graphics Hardware Tutorial 5: Programming Graphics Hardware Multitexturing 1999-2000: Transform and Lighting Base Texturemodulated by Light Map CPU GPU “Fixed Function Pipeline” Application Geometry Stage Rasterization Stage Stage Raster Transform Register Rasterizer Operations and Combiner Unit Lighting X Unit Texture Unit 3D Triangles Textures Bus Frame from UT2004 (c) 3D Triangles Textures (AGP) Epic Games Inc. Buffer Used with permission System = Memory Video Memory Register Combiner: Offers many more texture/color combinations NVIDIA’s GeForce 256 and GeForce2, ATI’s Radeon 7500, S3’s Savage3D Tutorial 5: Programming Graphics Hardware Tutorial 5: Programming Graphics Hardware Transform and Lighting Unit (TnL) Bump Mapping Transform and Lighting Unit Bump mapping is about fetching the normal from a texture (called a normal map) instead of using the interpolated normal to compute Transform lighting at a given pixel World World View Perspective Model Camera Projection Screen Matrix Space Matrix Division or or Projection or or and Object Eye Matrix Clip Window Model-View Viewport Space Space Space Space Matrix Matrix Lighting Material Properties Vertex Light Properties Diffuse and Specular Color Normal Map Vertex Color Diffuse light without bump Diffuse light with bumps Tutorial 5: Programming Graphics Hardware Tutorial 5: Programming Graphics Hardware 4 Cube Texture Mapping Projective Texture Mapping Cubemap Projected Texture (covering Environment Mapping (x, y, z, w) the six faces z (x (the reflection vector of a cube) ,y,z y (x/w, y/w) Texture Projection ) is used to lookup x the cubemap) Cubemap lookup Projective Texture lookup (with direction (x, y, z)) Tutorial 5: Programming Graphics Hardware Tutorial 5: Programming Graphics Hardware 2001: Programmable Vertex Shader Vertex Shader CPU GPU A programming processor for any per-vertex computation Application Geometry Stage Rasterization Stage void VertexShader( Stage Raster // Input per vertex Register in float4 positionInModelSpace, Vertex Shader Rasterizer Operations (no flow control) (with Z-Cull) Combiner in float2 textureCoordinates, Unit in float3 normal, Texture // Input per batch of triangles uniform float4x4 modelToProjection, Shader uniform float3 lightDirection, // Output per vertex out float4 positionInProjectionSpace, 3D Triangles out float2 textureCoordinatesOutput, out float3 color Textures Bus Frame ) 3D Triangles Textures { (AGP) Buffer // Vertex transformation System positionInProjectionSpace = mul(modelToProjection, positionInModelSpace); Memory Video Memory // Texture coordinates copy Z-Cull: Predicts which fragments will fail the Z test and discards them textureCoordinatesOutput = textureCoordinates; Texture Shader: Offers more texture addressing and operations // Vertex color computation color = dot(lightDirection, normal); NVIDIA’s GeForce3 and GeForce4 Ti, ATI’s Radeon 8500 } Tutorial 5: Programming Graphics Hardware Tutorial 5: Programming Graphics Hardware Volume Texture Mapping Hardware Shadow Mapping Shadow Map Computation z/w The shadow map contains the depth z/w of the 3D points visible (x, y, z, w) from the light’s point of view: Spot (x/w, y/w) light Shadow Rendering shadow z map A 3D point (x, y, z, w) is in shadow if: value (x,y,z) y z/w < value of shadow map at (x/w, y/w) (x, y, z, w) x Spot Volume Texture Noise Perturbation A hardware shadow map lookup (x/w, y/w) light (3D Noise) returns the value of this comparison between 0 and 1 Volume Texture lookup (with position (x, y, z)) Tutorial 5: Programming Graphics Hardware Tutorial 5: Programming Graphics Hardware 5 Antialiasing: Definition Antialiasing: Supersampling and Multisampling Supersampling: Pixel Center Aliasing: Undesirable visual artifacts due to Compute color and Z at insufficient sampling of: higher resolution and Sample Primitives (triangles, lines, etc.) → jagged edges display averaged color to smooth out the visual Textures or shaders → pixelation, moiré patterns artifacts Those artifacts are even more noticeable on animated images. Multisampling: Antialiasing: Method to reduce aliasing Same thing except only Z Texture antialiasing is largely handled by proper is computed at higher mipmapping and anisotropic filtering resolution Multisampling performs Shader antialiasing can be tricky (especially with antialiasing on primitive conditionals) edges only Tutorial 5: Programming Graphics Hardware Tutorial 5: Programming Graphics Hardware 2002-2003: Programmable Pixel Shader Pixel Shader CPU GPU A programming processor for any per-pixel computation Application Geometry Stage Rasterization Stage void PixelShader( Stage Vertex Shader Pixel Shader Raster // Input per pixel Rasterizer in float2 textureCoordinates, (static and dynamic (static Operations (with Z-Cull) in float3 normal, flow control) flow control only) Unit // Input per batch of triangles Texture uniform sampler2D
Recommended publications
  • Texture Mapping Textures Provide Details Makes Graphics Pretty
    Texture Mapping Textures Provide Details Makes Graphics Pretty • Details creates immersion • Immersion creates fun Basic Idea Paint pictures on all of your polygons • adds color data • adds (fake) geometric and texture detail one of the basic graphics techniques • tons of hardware support Texture Mapping • Map between region of plane and arbitrary surface • Ensure “right things” happen as textured polygon is rendered and transformed Parametric Texture Mapping • Texture size and orientation tied to polygon • Texture can modulate diffuse color, specular color, specular exponent, etc • Separation of “texture space” from “screen space” • UV coordinates of range [0…1] Retrieving Texel Color • Compute pixel (u,v) using barycentric interpolation • Look up texture pixel (texel) • Copy color to pixel • Apply shading How to Parameterize? Classic problem: How to parameterize the earth (sphere)? Very practical, important problem in Middle Ages… Latitude & Longitude Distorts areas and angles Planar Projection Covers only half of the earth Distorts areas and angles Stereographic Projection Distorts areas Albers Projection Preserves areas, distorts aspect ratio Fuller Parameterization No Free Lunch Every parameterization of the earth either: • distorts areas • distorts distances • distorts angles Good Parameterizations • Low area distortion • Low angle distortion • No obvious seams • One piece • How do we achieve this? Planar Parameterization Project surface onto plane • quite useful in practice • only partial coverage • bad distortion when normals perpendicular Planar Parameterization In practice: combine multiple views Cube Map/Skybox Cube Map Textures • 6 2D images arranged like faces of a cube • +X, -X, +Y, -Y, +Z, -Z • Index by unnormalized vector Cube Map vs Skybox skybox background Cube maps map reflections to emulate reflective surface (e.g.
    [Show full text]
  • Texture / Image-Based Rendering Texture Maps
    Texture / Image-Based Rendering Texture maps Surface color and transparency Environment and irradiance maps Reflectance maps Shadow maps Displacement and bump maps Level of detail hierarchy CS348B Lecture 12 Pat Hanrahan, Spring 2005 Texture Maps How is texture mapped to the surface? Dimensionality: 1D, 2D, 3D Texture coordinates (s,t) Surface parameters (u,v) Direction vectors: reflection R, normal N, halfway H Projection: cylinder Developable surface: polyhedral net Reparameterize a surface: old-fashion model decal What does texture control? Surface color and opacity Illumination functions: environment maps, shadow maps Reflection functions: reflectance maps Geometry: bump and displacement maps CS348B Lecture 12 Pat Hanrahan, Spring 2005 Page 1 Classic History Catmull/Williams 1974 - basic idea Blinn and Newell 1976 - basic idea, reflection maps Blinn 1978 - bump mapping Williams 1978, Reeves et al. 1987 - shadow maps Smith 1980, Heckbert 1983 - texture mapped polygons Williams 1983 - mipmaps Miller and Hoffman 1984 - illumination and reflectance Perlin 1985, Peachey 1985 - solid textures Greene 1986 - environment maps/world projections Akeley 1993 - Reality Engine Light Field BTF CS348B Lecture 12 Pat Hanrahan, Spring 2005 Texture Mapping ++ == 3D Mesh 2D Texture 2D Image CS348B Lecture 12 Pat Hanrahan, Spring 2005 Page 2 Surface Color and Transparency Tom Porter’s Bowling Pin Source: RenderMan Companion, Pls. 12 & 13 CS348B Lecture 12 Pat Hanrahan, Spring 2005 Reflection Maps Blinn and Newell, 1976 CS348B Lecture 12 Pat Hanrahan, Spring 2005 Page 3 Gazing Ball Miller and Hoffman, 1984 Photograph of mirror ball Maps all directions to a to circle Resolution function of orientation Reflection indexed by normal CS348B Lecture 12 Pat Hanrahan, Spring 2005 Environment Maps Interface, Chou and Williams (ca.
    [Show full text]
  • Real-Time Rendering Techniques with Hardware Tessellation
    Volume 34 (2015), Number x pp. 0–24 COMPUTER GRAPHICS forum Real-time Rendering Techniques with Hardware Tessellation M. Nießner1 and B. Keinert2 and M. Fisher1 and M. Stamminger2 and C. Loop3 and H. Schäfer2 1Stanford University 2University of Erlangen-Nuremberg 3Microsoft Research Abstract Graphics hardware has been progressively optimized to render more triangles with increasingly flexible shading. For highly detailed geometry, interactive applications restricted themselves to performing transforms on fixed geometry, since they could not incur the cost required to generate and transfer smooth or displaced geometry to the GPU at render time. As a result of recent advances in graphics hardware, in particular the GPU tessellation unit, complex geometry can now be generated on-the-fly within the GPU’s rendering pipeline. This has enabled the generation and displacement of smooth parametric surfaces in real-time applications. However, many well- established approaches in offline rendering are not directly transferable due to the limited tessellation patterns or the parallel execution model of the tessellation stage. In this survey, we provide an overview of recent work and challenges in this topic by summarizing, discussing, and comparing methods for the rendering of smooth and highly-detailed surfaces in real-time. 1. Introduction Hardware tessellation has attained widespread use in computer games for displaying highly-detailed, possibly an- Graphics hardware originated with the goal of efficiently imated, objects. In the animation industry, where displaced rendering geometric surfaces. GPUs achieve high perfor- subdivision surfaces are the typical modeling and rendering mance by using a pipeline where large components are per- primitive, hardware tessellation has also been identified as a formed independently and in parallel.
    [Show full text]
  • Deconstructing Hardware Usage for General Purpose Computation on Gpus
    Deconstructing Hardware Usage for General Purpose Computation on GPUs Budyanto Himawan Manish Vachharajani Dept. of Computer Science Dept. of Electrical and Computer Engineering University of Colorado University of Colorado Boulder, CO 80309 Boulder, CO 80309 E-mail: {Budyanto.Himawan,manishv}@colorado.edu Abstract performance, in 2001, NVidia revolutionized the GPU by making it highly programmable [3]. Since then, the programmability of The high-programmability and numerous compute resources GPUs has steadily increased, although they are still not fully gen- on Graphics Processing Units (GPUs) have allowed researchers eral purpose. Since this time, there has been much research and ef- to dramatically accelerate many non-graphics applications. This fort in porting both graphics and non-graphics applications to use initial success has generated great interest in mapping applica- the parallelism inherent in GPUs. Much of this work has focused tions to GPUs. Accordingly, several works have focused on help- on presenting application developers with information on how to ing application developers rewrite their application kernels for the perform the non-trivial mapping of general purpose concepts to explicitly parallel but restricted GPU programming model. How- GPU hardware so that there is a good fit between the algorithm ever, there has been far less work that examines how these appli- and the GPU pipeline. cations actually utilize the underlying hardware. Less attention has been given to deconstructing how these gen- This paper focuses on deconstructing how General Purpose ap- eral purpose application use the graphics hardware itself. Nor has plications on GPUs (GPGPU applications) utilize the underlying much attention been given to examining how GPUs (or GPU-like GPU pipeline.
    [Show full text]
  • NVIDIA Quadro Technical Specifications
    NVIDIA Quadro Technical Specifications NVIDIA Quadro Workstation GPU High-resolution Antialiasing ° Dassault CATIA • Full 128-bit floating point precision • Up to 16x full-scene antialiasing (FSAA), ° ESRI ArcGIS pipeline at resolutions up to 1920 x 1200 ° ICEM Surf • 12-bit subpixel precision • 12-bit subpixel sampling precision ° MSC.Nastran, MSC.Patran • Hardware-accelerated antialiased enhances AA quality ° PTC Pro/ENGINEER Wildfire, points and lines • Rotated-grid FSAA significantly 3Dpaint, CDRS The NVIDIA Quadro® family of In addition to a full line up of 2D and • Hardware OpenGL overlay planes increases color accuracy and visual ° SolidWorks • Hardware-accelerated two-sided quality for edges, while maintaining ° UDS NX Series, I-deas, SolidEdge, professional solutions for workstations 3D workstation graphics solutions, the lighting performance3 Unigraphics, SDRC delivers the fastest application NVIDIA Quadro professional products • Hardware-accelerated clipping planes and many more… Memory performance and the highest quality include a set of specialty solutions that • Third-generation occlusion culling • Digital Content Creation (DCC) graphics. have been architected to meet the • 16 textures per pixel • High-speed memory (up to 512MB Alias Maya, MOTIONBUILDER needs of a wide range of industry • OpenGL quad-buffered stereo (3-pin GDDR3) ° NewTek Lightwave 3D Raw performance and quality are only sync connector) • Advanced lossless compression ° professionals. These specialty Autodesk Media and Entertainment the beginning. The NVIDIA
    [Show full text]
  • Extending the Graphics Pipeline with Adaptive, Multi-Rate Shading
    Extending the Graphics Pipeline with Adaptive, Multi-Rate Shading Yong He Yan Gu Kayvon Fatahalian Carnegie Mellon University Abstract compute capability as a primary mechanism for improving the qual- ity of real-time graphics. Simply put, to scale to more advanced Due to complex shaders and high-resolution displays (particularly rendering effects and to high-resolution outputs, future GPUs must on mobile graphics platforms), fragment shading often dominates adopt techniques that perform shading calculations more efficiently the cost of rendering in games. To improve the efficiency of shad- than the brute-force approaches used today. ing on GPUs, we extend the graphics pipeline to natively support techniques that adaptively sample components of the shading func- In this paper, we enable high-quality shading at reduced cost on tion more sparsely than per-pixel rates. We perform an extensive GPUs by extending the graphics pipeline’s fragment shading stage study of the challenges of integrating adaptive, multi-rate shading to natively support techniques that adaptively sample aspects of the into the graphics pipeline, and evaluate two- and three-rate imple- shading function more sparsely than per-pixel rates. Specifically, mentations that we believe are practical evolutions of modern GPU our extensions allow different components of the pipeline’s shad- designs. We design new shading language abstractions that sim- ing function to be evaluated at different screen-space rates and pro- plify development of shaders for this system, and design adaptive vide mechanisms for shader programs to dynamically determine (at techniques that use these mechanisms to reduce the number of in- fine screen granularity) which computations to perform at which structions performed during shading by more than a factor of three rates.
    [Show full text]
  • Texture Mapping Modeling an Orange
    Texture Mapping Modeling an Orange q Problem: Model an orange (the fruit) q Start with an orange-colored sphere – Too smooth q Replace sphere with a more complex shape – Takes too many polygons to model all the dimples q Soluon: retain the simple model, but add detail as a part of the rendering process. 1 Modeling an orange q Surface texture: we want to model the surface features of the object not just the overall shape q Soluon: take an image of a real orange’s surface, scan it, and “paste” onto a simple geometric model q The texture image is used to alter the color of each point on the surface q This creates the ILLUSION of a more complex shape q This is efficient since it does not involve increasing the geometric complexity of our model Recall: Graphics Rendering Pipeline Application Geometry Rasterizer 3D 2D input CPU GPU output scene image 2 Rendering Pipeline – Rasterizer Application Geometry Rasterizer Image CPU GPU output q The rasterizer stage does per-pixel operaons: – Turn geometry into visible pixels on screen – Add textures – Resolve visibility (Z-buffer) From Geometry to Display 3 Types of Texture Mapping q Texture Mapping – Uses images to fill inside of polygons q Bump Mapping – Alter surface normals q Environment Mapping – Use the environment as texture Texture Mapping - Fundamentals q A texture is simply an image with coordinates (s,t) q Each part of the surface maps to some part of the texture q The texture value may be used to set or modify the pixel value t (1,1) (199.68, 171.52) Interpolated (0.78,0.67) s (0,0) 256x256 4 2D Texture Mapping q How to map surface coordinates to texture coordinates? 1.
    [Show full text]
  • Graphics Pipeline and Rasterization
    Graphics Pipeline & Rasterization Image removed due to copyright restrictions. MIT EECS 6.837 – Matusik 1 How Do We Render Interactively? • Use graphics hardware, via OpenGL or DirectX – OpenGL is multi-platform, DirectX is MS only OpenGL rendering Our ray tracer © Khronos Group. All rights reserved. This content is excluded from our Creative Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/. 2 How Do We Render Interactively? • Use graphics hardware, via OpenGL or DirectX – OpenGL is multi-platform, DirectX is MS only OpenGL rendering Our ray tracer © Khronos Group. All rights reserved. This content is excluded from our Creative Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/. • Most global effects available in ray tracing will be sacrificed for speed, but some can be approximated 3 Ray Casting vs. GPUs for Triangles Ray Casting For each pixel (ray) For each triangle Does ray hit triangle? Keep closest hit Scene primitives Pixel raster 4 Ray Casting vs. GPUs for Triangles Ray Casting GPU For each pixel (ray) For each triangle For each triangle For each pixel Does ray hit triangle? Does triangle cover pixel? Keep closest hit Keep closest hit Scene primitives Pixel raster Scene primitives Pixel raster 5 Ray Casting vs. GPUs for Triangles Ray Casting GPU For each pixel (ray) For each triangle For each triangle For each pixel Does ray hit triangle? Does triangle cover pixel? Keep closest hit Keep closest hit Scene primitives It’s just a different orderPixel raster of the loops!
    [Show full text]
  • A Snake Approach for High Quality Image-Based 3D Object Modeling
    A Snake Approach for High Quality Image-based 3D Object Modeling Carlos Hernandez´ Esteban and Francis Schmitt Ecole Nationale Superieure´ des Tel´ ecommunications,´ France e-mail: carlos.hernandez, francis.schmitt @enst.fr f g Abstract faces. They mainly work for 2.5D surfaces and are very de- pendent on the light conditions. A third class of methods In this paper we present a new approach to high quality 3D use the color information of the scene. The color informa- object reconstruction by using well known computer vision tion can be used in different ways, depending on the type of techniques. Starting from a calibrated sequence of color im- scene we try to reconstruct. A first way is to measure color ages, we are able to recover both the 3D geometry and the consistency to carve a voxel volume [28, 18]. But they only texture of the real object. The core of the method is based on provide an output model composed of a set of voxels which a classical deformable model, which defines the framework makes difficult to obtain a good 3D mesh representation. Be- where texture and silhouette information are used as exter- sides, color consistency algorithms compare absolute color nal energies to recover the 3D geometry. A new formulation values, which makes them sensitive to light condition varia- of the silhouette constraint is derived, and a multi-resolution tions. A different way of exploiting color is to compare local gradient vector flow diffusion approach is proposed for the variations of the texture such as in cross-correlation methods stereo-based energy term.
    [Show full text]
  • Graphics Pipeline
    Graphics Pipeline What is graphics API ? • A low-level interface to graphics hardware • OpenGL About 120 commands to specify 2D and 3D graphics Graphics API and Graphics Pipeline OS independent Efficient Rendering and Data transfer Event Driven Programming OpenGL What it isn’t: A windowing program or input driver because How many of you have programmed in OpenGL? How extensively? OpenGL GLUT: window management, keyboard, mouse, menue GLU: higher level library, complex objects How does it work? Primitives: drawing a polygon From the implementor’s perspective: geometric objects properties: color… pixels move camera and objects around graphics pipeline Primitives Build models in appropriate units (microns, meters, etc.). Primitives Rotate From simple shapes: triangles, polygons,… Is it Convert to + material Translate 3D to 2D visible? pixels properties Scale Primitives 1 Primitives: drawing a polygon Primitives: drawing a polygon • Put GL into draw-polygon state glBegin(GL_POLYGON); • Send it the points making up the polygon glVertex2f(x0, y0); glVertex2f(x1, y1); glVertex2f(x2, y2) ... • Tell it we’re finished glEnd(); Primitives Primitives Triangle Strips Polygon Restrictions Minimize number of vertices to be processed • OpenGL Polygons must be simple • OpenGL Polygons must be convex (a) simple, but not convex TR1 = p0, p1, p2 convex TR2 = p1, p2, p3 Strip = p0, p1, p2, p3, p4,… (b) non-simple 9 10 Material Properties: Color Primitives: Material Properties • glColor3f (r, g, b); Red, green & blue color model color, transparency, reflection
    [Show full text]
  • UNWRELLA Step by Step Unwrapping and Texture Baking Tutorial
    Introduction Content Defining Seams in 3DSMax Applying Unwrella Texture Baking Final result UNWRELLA Unwrella FAQ, users manual Step by step unwrapping and texture baking tutorial Unwrella UV mapping tutorial. Copyright 3d-io GmbH, 2009. All rights reserved. Please visit http://www.unwrella.com for more details. Unwrella Step by Step automatic unwrapping and texture baking tutorial Introduction 3. Introduction Content 4. Content Defining Seams in 3DSMax 10. Defining Seams in Max Applying Unwrella Texture Baking 16. Applying Unwrella Final result 20. Texture Baking Unwrella FAQ, users manual 29. Final Result 30. Unwrella FAQ, user manual Unwrella UV mapping tutorial. Copyright 3d-io GmbH, 2009. All rights reserved. Please visit http://www.unwrella.com for more details. Introduction In this comprehensive tutorial we will guide you through the process of creating optimal UV texture maps. Introduction Despite the fact that Unwrella is single click solution, we have created this tutorial with a lot of material explaining basic Autodesk 3DSMax work and the philosophy behind the „Render to Texture“ workflow. Content Defining Seams in This method, known in game development as texture baking, together with deployment of the Unwrella plug-in achieves the 3DSMax following quality benchmarks efficiently: Applying Unwrella - Textures with reduced texture mapping seams Texture Baking - Minimizes the surface stretching Final result - Creates automatically the largest possible UV chunks with maximal use of available space Unwrella FAQ, users manual - Preserves user created UV Seams - Reduces the production time from 30 minutes to 3 Minutes! Please follow these steps and learn how to utilize this great tool in order to achieve the best results in minimum time during your everyday productions.
    [Show full text]
  • CPU-GPU Hybrid Real Time Ray Tracing Framework
    Volume 0 (1981), Number 0 pp. 1–8 CPU-GPU Hybrid Real Time Ray Tracing Framework S.Beck , A.-C. Bernstein , D. Danch and B. Fröhlich Lehrstuhl für Systeme der Virtuellen Realität, Bauhaus-Universität Weimar, Germany Abstract We present a new method in rendering complex 3D scenes at reasonable frame-rates targeting on Global Illumi- nation as provided by a Ray Tracing algorithm. Our approach is based on some new ideas on how to combine a CPU-based fast Ray Tracing algorithm with the capabilities of todays programmable GPUs and its powerful feed-forward-rendering algorithm. We call this approach CPU-GPU Hybrid Real Time Ray Tracing Framework. As we will show, a systematic analysis of the generations of rays of a Ray Tracer leads to different render-passes which map either to the GPU or to the CPU. Indeed all camera rays can be processed on the graphics card, and hardware accelerated shadow mapping can be used as a pre-step in calculating precise shadow boundaries within a Ray Tracer. Our arrangement of the resulting five specialized render-passes combines a fast Ray Tracer located on a multi-processing CPU with the capabilites of a modern graphics card in a new way and might be a starting point for further research. Categories and Subject Descriptors (according to ACM CCS): I.3.3 [Computer Graphics]: Ray Tracing, Global Illumination, OpenGL, Hybrid CPU GPU 1. Introduction Ray Tracer can compute every pixel of an image separately Within the last years prospects in computer-graphics are in parallel which is done in clusters and render-farms and growing and the aim of high-quality rendering and natural- shortens render time.
    [Show full text]