Creating an Appealing 3D-Visualization Tool for Baseboards in the Web Browser Lars Bergman

Total Page:16

File Type:pdf, Size:1020Kb

Creating an Appealing 3D-Visualization Tool for Baseboards in the Web Browser Lars Bergman LiU-ITN-TEK-A--20/028--SE Creating an Appealing 3D-visualization Tool for Baseboards in the Web Browser Lars Bergman 2020-06-12 Department of Science and Technology Institutionen för teknik och naturvetenskap Linköping University Linköpings universitet SE-601 74 Norrköping, Sweden 601 74 Norrköping LiU-ITN-TEK-A--20/028--SE Creating an Appealing 3D-visualization Tool for Baseboards in the Web Browser Examensarbete utfört i Medieteknik vid Tekniska högskolan vid Linköpings universitet Lars Bergman Handledare Henry Fröcklin Examinator Niklas Rönnberg Norrköping 2020-06-12 Upphovsrätt Detta dokument hålls tillgängligt på Internet – eller dess framtida ersättare – under en längre tid från publiceringsdatum under förutsättning att inga extra- ordinära omständigheter uppstår. Tillgång till dokumentet innebär tillstånd för var och en att läsa, ladda ner, skriva ut enstaka kopior för enskilt bruk och att använda det oförändrat för ickekommersiell forskning och för undervisning. Överföring av upphovsrätten vid en senare tidpunkt kan inte upphäva detta tillstånd. All annan användning av dokumentet kräver upphovsmannens medgivande. För att garantera äktheten, säkerheten och tillgängligheten finns det lösningar av teknisk och administrativ art. Upphovsmannens ideella rätt innefattar rätt att bli nämnd som upphovsman i den omfattning som god sed kräver vid användning av dokumentet på ovan beskrivna sätt samt skydd mot att dokumentet ändras eller presenteras i sådan form eller i sådant sammanhang som är kränkande för upphovsmannens litterära eller konstnärliga anseende eller egenart. För ytterligare information om Linköping University Electronic Press se förlagets hemsida http://www.ep.liu.se/ Copyright The publishers will keep this document online on the Internet - or its possible replacement - for a considerable time from the date of publication barring exceptional circumstances. The online availability of the document implies a permanent permission for anyone to read, to download, to print out single copies for your own use and to use it unchanged for any non-commercial research and educational purpose. Subsequent transfers of copyright cannot revoke this permission. All other uses of the document are conditional on the consent of the copyright owner. The publisher has taken technical and administrative measures to assure authenticity, security and accessibility. According to intellectual property law the author has the right to be mentioned when his/her work is accessed as described above and to be protected against infringement. For additional information about the Linköping University Electronic Press and its procedures for publication and for assurance of document integrity, please refer to its WWW home page: http://www.ep.liu.se/ © Lars Bergman Linköping University | Department of Science and Technology Master’s thesis, 30 ECTS | Medieteknik 202020 | LIU-ITN/LITH-EX-A--2020/001--SE Creating an appealing 3D- visualization tool for baseboards in the web browser Skapande av ett tilldragande 3D-visualiserings verktyg för lister i webbläsaren Lars Bergman Supervisor : Henry Fröcklin Examiner : Niklas Rönnberg Linköpings universitet SE–581 83 Linköping +46 13 28 10 00 , www.liu.se Upphovsrätt Detta dokument hålls tillgängligt på Internet - eller dess framtida ersättare - under 25 år från publicer- ingsdatum under förutsättning att inga extraordinära omständigheter uppstår. Tillgång till dokumentet innebär tillstånd för var och en att läsa, ladda ner, skriva ut enstaka ko- pior för enskilt bruk och att använda det oförändrat för ickekommersiell forskning och för undervis- ning. Överföring av upphovsrätten vid en senare tidpunkt kan inte upphäva detta tillstånd. All annan användning av dokumentet kräver upphovsmannens medgivande. För att garantera äktheten, säker- heten och tillgängligheten finns lösningar av teknisk och administrativ art. Upphovsmannens ideella rätt innefattar rätt att bli nämnd som upphovsman i den omfattning som god sed kräver vid användning av dokumentet på ovan beskrivna sätt samt skydd mot att dokumentet ändras eller presenteras i sådan form eller i sådant sammanhang som är kränkande för upphovsman- nens litterära eller konstnärliga anseende eller egenart. För ytterligare information om Linköping University Electronic Press se förlagets hemsida http://www.ep.liu.se/. Copyright The publishers will keep this document online on the Internet - or its possible replacement - for a period of 25 years starting from the date of publication barring exceptional circumstances. The online availability of the document implies permanent permission for anyone to read, to down- load, or to print out single copies for his/hers own use and to use it unchanged for non-commercial research and educational purpose. Subsequent transfers of copyright cannot revoke this permission. All other uses of the document are conditional upon the consent of the copyright owner. The publisher has taken technical and administrative measures to assure authenticity, security and accessibility. According to intellectual property law the author has the right to be mentioned when his/her work is accessed as described above and to be protected against infringement. For additional information about the Linköping University Electronic Press and its procedures for publication and for assurance of document integrity, please refer to its www home page: http://www.ep.liu.se/. © Lars Bergman Abstract Today a lot of libraries, tools and techniques exist to create visual appealing renders for the web. In this thesis, a prototype for visualizing baseboards in the web browser was developed. The prototype demonstrates how certain libraries and techniques were used in order to achieve a generalized, appealing and realistic visualization of the baseboards in a 3D-visualization. This paper also covers why certain libraries and techniques were used for this prototype. The resulting prototype, use Three.js and takes advantage of PBR, different mapping methods and lighting sources that can be changed during runtime through a GUI. To get results on different aspects, such as the visual appeal, how realistic, and what lighting sources worked best for the prototype, a web-survey was sent out and the results evaluated. The evaluation showed that the usage of PBR, a roughness-metalness workflow, environment mapping, physical correct lighting and a point light solution in Three.js all made a good job in creating an appealing, generalized and realistic visualization tool for the web. Acknowledgments I would like to thank Valbo Trä for suggesting and making this master thesis possible. A big thank you goes to my supervisors at Valbo Trä Nisse Eriksson and Mikael Helmersson for discussions, feedback and ideas, as well as more project related advice and encouragement. I would like to thank Patrick Andersson at 100 Procent media as well for more technical details regarding the project. Also I want to thank my thesis examiner Niklas Rönnberg and assistant Henry Fröcklin at Linköping University, for guiding me in the right direction for this master thesis and re- port. Lastly a thank you to Camilla Forsell at Linköping University for helping me with the structure of the web survey. iv Contents Abstract iii Acknowledgments iv Contents v List of Figures vii List of Tables viii 1 Introduction 1 1.1 Visualization tool for browser . 1 1.2 Research questions . 2 1.3 Limitations . 2 1.4 Structure of report . 2 2 Related Work 3 2.1 An optimal solution for implementing a specific 3D web application . 3 2.2 Ambient Occlusion for Dynamic Objects and Procedural Environments . 3 2.3 Photorealistic Texturing for Modern Video Games . 4 2.4 IKEA - Home planner . 4 2.5 Three.js - Physically accurate incandescent bulb . 4 2.6 Babylon.js - Physical based rendering . 4 2.7 Xeogl.js - Importing and loading a more complex model and using different materials . 4 3 Background 5 3.1 HTML . 5 3.2 Javascript and Libraries . 5 3.3 WebGL . 6 3.4 Lightings . 8 3.5 Ray-tracing . 9 3.6 PBR - Physically Based Rendering . 9 3.7 3D-models, maps and textures . 10 4 Method 13 4.1 PBR . 13 4.2 Libraries . 13 4.3 Lighting . 14 4.4 Mapping and textures . 15 4.5 Web-survey . 15 4.6 Camera and movement in the scene . 15 v 5 Implementation 16 5.1 Localhost server - Node.js . 16 5.2 Creating the scene . 16 5.3 Lighting . 17 5.4 Baseboards . 17 5.5 PBR . 18 5.6 Mapping and textures . 18 5.7 GUI . 19 5.8 Shadows . 19 6 Result and discussion 21 6.1 Prototype . 21 6.2 Web-survey results . 25 6.3 Survey evaluation . 27 6.4 Discussion . 28 7 Conclusions and future work 30 7.1 Conclusions . 30 7.2 Future work . 31 Bibliography 32 vi List of Figures 3.1 Scene node map for Three.js, showing the render flow . 6 3.2 Shows browser support of WebGL 1.0. 7 3.3 Shows browser support of WebGL 2.0. 7 3.4 Difference between a perspective and an orthographic camera. 8 3.5 Shows how roughness and metalness affects a material. 10 3.6 Image showing the two most common PBR workflows Metalness/Roughness and Specular/Glossiness. 11 3.7 Image showing a cube map. 12 5.1 Artefacts can be seen on the side of the baseboard when using a normal map, inside the red rectangle. 19 6.1 Resulting prototype, showing the base model, a baseboard, the skybox and the two windows containing the GUI and performance. 22 6.2 Resulting prototype, showing a white baseboard in close-up. 22 6.3 GUI components . 23 6.4 Image showing off the shadows. Note that there are two light sources in the scene. One spotlight and one point light. The spotlight is casting the sharpest shadow and the point light the lesser shadow. The model floating in the middle of the room was added to show the shadows more clearly. 23 6.5 Shows four images of different roughness and metalness values. The only param- eters changing in the images are the metalness and roughness values. Note that both the scene and baseboard have the same roughness and metalness values here, but they can be different.
Recommended publications
  • Relief Texture Mapping
    Advanced Texturing Environment Mapping Environment Mapping ° reflections Environment Mapping ° orientation ° Environment Map View point Environment Mapping ° ° ° Environment Map View point Environment Mapping ° Can be an “effect” ° Usually means: “fake reflection” ° Can be a “technique” (i.e., GPU feature) ° Then it means: “2D texture indexed by a 3D orientation” ° Usually the index vector is the reflection vector ° But can be anything else that’s suitable! ° Increased importance for modern GI Environment Mapping ° Uses texture coordinate generation, multi-texturing, new texture targets… ° Main task ° Map all 3D orientations to a 2D texture ° Independent of application to reflections Sphere Cube Dual paraboloid Top top Top Left Front Right Left Front Right Back left front right Bottom Bottom Back bottom Cube Mapping ° OpenGL texture targets Top Left Front Right Back Bottom glTexImage2D( GL_TEXTURE_CUBE_MAP_POSITIVE_X , 0, GL_RGB8, w, h, 0, GL_RGB, GL_UNSIGNED_BYTE, face_px ); Cube Mapping ° Cube map accessed via vectors expressed as 3D texture coordinates (s, t, r) +t +s -r Cube Mapping ° 3D 2D projection done by hardware ° Highest magnitude component selects which cube face to use (e.g., -t) ° Divide other components by this, e.g.: s’ = s / -t r’ = r / -t ° (s’, r’) is in the range [-1, 1] ° remap to [0,1] and select a texel from selected face ° Still need to generate useful texture coordinates for reflections Cube Mapping ° Generate views of the environment ° One for each cube face ° 90° view frustum ° Use hardware render to texture
    [Show full text]
  • Advanced Texture Mapping
    Advanced texture mapping Computer Graphics COMP 770 (236) Spring 2007 Instructor: Brandon Lloyd 2/21/07 1 From last time… ■ Physically based illumination models ■ Cook-Torrance illumination model ° Microfacets ° Geometry term ° Fresnel reflection ■ Radiance and irradiance ■ BRDFs 2/21/07 2 Today’s topics ■ Texture coordinates ■ Uses of texture maps ° reflectance and other surface parameters ° lighting ° geometry ■ Solid textures 2/21/07 3 Uses of texture maps ■ Texture maps are used to add complexity to a scene ■ Easier to paint or capture an image than geometry ■ model reflectance ° attach a texture map to a parameter ■ model light ° environment maps ° light maps ■ model geometry ° bump maps ° normal maps ° displacement maps ° opacity maps and billboards 2/21/07 4 Specifying texture coordinates ■ Texture coordinates needed at every vertex ■ Hard to specify by hand ■ Difficult to wrap a 2D texture around a 3D object from Physically-based Rendering 2/21/07 5 Planar mapping ■ Compute texture coordinates at each vertex by projecting the map coordinates onto the model 2/21/07 6 Cylindrical mapping 2/21/07 7 Spherical mapping 2/21/07 8 Cube mapping 2/21/07 9 “Unwrapping” the model 2/21/07 images from www.eurecom.fr/~image/Clonage/geometric2.html 10 Modelling surface properties ■ Can use a texture to supply any parameter of the illumination model ° ambient, diffuse, and specular color ° specular exponent ° roughness fr o m ww w.r o nfr a zier.net 2/21/07 11 Modelling lighting ■ Light maps ° supply the lighting directly ° good for static environments
    [Show full text]
  • Visualizing 3D Objects with Fine-Grain Surface Depth Roi Mendez Fernandez
    Visualizing 3D models with fine-grain surface depth Author: Roi Méndez Fernández Supervisors: Isabel Navazo (UPC) Roger Hubbold (University of Manchester) _________________________________________________________________________Index Index 1. Introduction ..................................................................................................................... 7 2. Main goal .......................................................................................................................... 9 3. Depth hallucination ........................................................................................................ 11 3.1. Background ............................................................................................................. 11 3.2. Output .................................................................................................................... 14 4. Displacement mapping .................................................................................................. 15 4.1. Background ............................................................................................................. 15 4.1.1. Non-iterative methods ................................................................................... 17 a. Bump mapping ...................................................................................... 17 b. Parallax mapping ................................................................................... 18 c. Parallax mapping with offset limiting ...................................................
    [Show full text]
  • Generating Real Time Reflections by Ray Tracing Approximate Geometry
    Generating Real Time Reflections by Ray Tracing Approximate Geometry Master’s thesis in Interaction Design and Technologies JOHAN FREDRIKSSON, ADAM SCOTT Department of Interaction Design and Technologies CHALMERS UNIVERSITY OF TECHNOLOGY Gothenburg, Sweden 2016 Master’s thesis 2016:123 Generating Real Time Reflections by Ray Tracing Approximate Geometry JOHAN FREDRIKSSON, ADAM SCOTT Department of Computer Science Division of Interaction Design and Technologies Chalmers University of Technology Gothenburg, Sweden 2016 Generating Real Time Reflections by Ray Tracing Approximate Geometry JOHAN FREDRIKSSON, ADAM SCOTT © JOHAN FREDRIKSSON, ADAM SCOTT, 2016. Supervisor: Erik Sintorn, Computer Graphics Examiner: Staffan Björk, Interaction Design and Technologies Master’s Thesis 2016:123 Department of Computer Science Division of Interaction Design and Technologies Chalmers University of Technology SE-412 96 Gothenburg Cover: BVH encapsulating approximate geometry created in the Frostbite engine. Typeset in LATEX Gothenburg, Sweden 2016 iii Generating Real Time Reflections by Ray Tracing Approximated Geometry Johan Fredriksson, Adam Scott Department of Interaction Design and Technologies Chalmers University of Technology Abstract Rendering reflections in real time is important for realistic modern games. A com- mon way to provide reflections is by using environment mapping. This method is not an accurate way to calculate reflections and it consumes a lot of memory space. We propose a method of ray tracing approximate geometry in real time. By using approximate geometry it can be kept simple and the size of the bounding volume hierarchy will have a lower memory impact. The ray tracing is performed on the GPU and the bounding volumes are pre built on the CPU using surface area heuris- tics.
    [Show full text]
  • Brno University of Technology Rendering Of
    BRNO UNIVERSITY OF TECHNOLOGY VYSOKÉ UČENÍ TECHNICKÉ V BRNĚ FACULTY OF INFORMATION TECHNOLOGY FAKULTA INFORMAČNÍCH TECHNOLOGIÍ DEPARTMENT OF COMPUTER GRAPHICS AND MULTIMEDIA ÚSTAV POČÍTAČOVÉ GRAFIKY A MULTIMÉDIÍ RENDERING OF NONPLANAR MIRRORS ZOBRAZOVÁNÍ POKŘIVENÝCH ZRCADEL MASTER’S THESIS DIPLOMOVÁ PRÁCE AUTHOR Bc. MILOSLAV ČÍŽ AUTOR PRÁCE SUPERVISOR Ing. TOMÁŠ MILET VEDOUCÍ PRÁCE BRNO 2017 Abstract This work deals with the problem of accurately rendering mirror reflections on curved surfaces in real-time. While planar mirrors do not pose a problem in this area, non-planar surfaces are nowadays rendered mostly using environment mapping, which is a method of approximating the reflections well enough for the human eye. However, this approach may not be suitable for applications such as CAD systems. Accurate mirror reflections can be rendered with ray tracing methods, but not in real-time and therefore without offering interactivity. This work examines existing approaches to the problem and proposes a new algorithm for computing accurate mirror reflections in real-time using accelerated searching for intersections with depth profile stored in cubemap textures. This algorithm has been implemented using OpenGL and tested on different platforms. Abstrakt Tato práce se zabývá problémem přesného zobrazování zrcadlových odrazů na zakřiveném povrchu v reálném čase. Zatímco planární zrcadla nepředstavují v tomto ohledu problém, zakřivené povrchy se v dnešní době zobrazují především metodou environment mapping, která aproximuje reálné odrazy a nabízí výsledky uspokojivé pro lidské oko. Tento přístup však nemusí být vhodný např. v oblasti CAD systémů. Přesných zrcadlových odrazů se dá dosáhnout pomocí metod sledování paprsku, avšak ne v reálném čase a tudíž bez možnosti interaktivity.
    [Show full text]
  • 235-242.Pdf (449.2Kb)
    Eurographics/ IEEE-VGTC Symposium on Visualization (2007) Ken Museth, Torsten Möller, and Anders Ynnerman (Editors) Hardware-accelerated Stippling of Surfaces derived from Medical Volume Data Alexandra Baer Christian Tietjen Ragnar Bade Bernhard Preim Department of Simulation and Graphics Otto-von-Guericke University of Magdeburg, Germany {abaer|tietjen|rbade|preim}@isg.cs.uni-magdeburg.de Abstract We present a fast hardware-accelerated stippling method which does not require any preprocessing for placing points on surfaces. The surfaces are automatically parameterized in order to apply stippling textures without ma- jor distortions. The mapping process is guided by a decomposition of the space in cubes. Seamless scaling with a constant density of points is realized by subdividing and summarizing cubes. Our mip-map technique enables ar- bitrarily scaling with one texture. Different shading tones and scales are facilitated by adhering to the constraints of tonal art maps. With our stippling technique, it is feasible to encode all scaling and brightness levels within one self-similar texture. Our method is applied to surfaces extracted from (segmented) medical volume data. The speed of the stippling process enables stippling for several complex objects simultaneously. We consider applica- tion scenarios in intervention planning (neck and liver surgery planning). In these scenarios, object recognition (shape perception) is supported by adding stippling to semi-transparently shaded objects which are displayed as context information. Categories and Subject Descriptors (according to ACM CCS): I.3.7 [Computer Graphics]: Three-Dimensional Graphics and Realism -Color, shading, shadowing, and texture 1. Introduction from breathing, pulsation or patient movement. Without a well-defined curvature field, hatching may be misleading by The effective visualization of complex anatomic surfaces is a emphasizing erroneous features of the surfaces.
    [Show full text]
  • Texture Mapping Objectives the Limits of Geometric Modeling
    Objectives •Introduce Mapping Methods Texture Mapping - Texture Mapping - Environment Mapping - Bump Mapping CS 432 Interactive Computer Graphics •Consider basic strategies Prof. David E. Breen - Forward vs backward mapping Department of Computer Science - Point sampling vs area averaging E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 1 E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 2 1 2 The Limits of Geometric Modeling an Orange Modeling •Although graphics cards can render over •Consider the problem of modeling an orange 20 million polygons per second, that (the fruit) number is insufficient for many phenomena •Start with an orange-colored sphere - Clouds - Too simple - Grass •Replace sphere with a more complex shape - Terrain - Does not capture surface characteristics (small - Skin dimples) - Takes too many polygons to model all the dimples E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 3 E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 4 3 4 Modeling an Orange (2) Three Types of Mapping •Take a picture of a real orange, scan it, •Texture Mapping and “paste” onto simple geometric model - Uses images to fill inside of polygons - This process is known as texture mapping •Environment (reflection mapping) •Still might not be sufficient because - Uses a picture of the environment for texture resulting surface will be smooth maps - Need to change local shape - Allows simulation of highly specular surfaces - Bump mapping •Bump mapping - Emulates altering normal vectors during the rendering process E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 5 E.
    [Show full text]
  • 2.5D 3D Axis-Aligned Bounding Box (AABB) Albedo Alpha Blending
    This page is dedicated to describing the commonly used terms when working with CRYENGINE V. As a use case, you may find yourself asking questions like "What is a Brush", "What is a Component", or Overview | Sections | # | A | B | C | D | E "What is POM?", this page will highlight and provide descriptions for those types of questions and more. | F | G | H | I | J | L | M | N | O | P | Q | R Once you have an understanding of what each term means, links are provided for more documentation | S | T | V | Y | Z and guidance on working with them. 2.5D Used to describe raycasting engines, such as Doom or Duke Nukem. The maps are generally drawn as 2D bitmaps with height properties but when rendered gives the appearance of being 3D. 3D Refers to the ability to move in the X, Y and Z axis and also rotate around the X, Y, and Z axes. Axis-aligned Bounding Box A form of a bounding box where the box is aligned to the axis therefore only two points in space are (AABB) needed to define it. AABB’s are much faster to use, and take up less memory, but are very limited in the sense that they can only be aligned to the axis. Albedo An albedo is a physical measure of a material’s reflectivity, generally across the visible spectrum of light. An albedo texture simulates a surface albedo as opposed to explicitly defining a colour for it. Alpha Blending Assigning varying levels of translucency to graphical objects, allowing the creation of things such as glass, fog, and ghosts.
    [Show full text]
  • Real-Time Recursive Specular Reflections on Planar and Curved Surfaces Using Graphics Hardware
    REAL-TIME RECURSIVE SPECULAR REFLECTIONS ON PLANAR AND CURVED SURFACES USING GRAPHICS HARDWARE Kasper Høy Nielsen Niels Jørgen Christensen Informatics and Mathematical Modelling The Technical University of Denmark DK 2800 Lyngby, Denmark {khn,njc}@imm.dtu.dk ABSTRACT Real-time rendering of recursive reflections have previously been done using different techniques. How- ever, a fast unified approach for capturing recursive reflections on both planar and curved surfaces, as well as glossy reflections and interreflections between such primitives, have not been described. This paper describes a framework for efficient simulation of recursive specular reflections in scenes containing both planar and curved surfaces. We describe and compare two methods that utilize texture mapping and en- vironment mapping, while having reasonable memory requirements. The methods are texture-based to allow for the simulation of glossy reflections using image-filtering. We show that the methods can render recursive reflections in static and dynamic scenes in real-time on current consumer graphics hardware. The methods make it possible to obtain a realism close to ray traced images at interactive frame rates. Keywords: Real-time rendering, recursive specular reflections, texture, environment mapping. 1 INTRODUCTION mapped surface sees the exact same surroundings re- gardless of its position. Static precalculated environ- Mirror-like reflections are known from ray tracing, ment maps can be used to create the notion of reflec- where shiny objects seem to reflect the surrounding tion on shiny objects. However, for modelling reflec- environment. Rays are continuously traced through tions similar to ray tracing, reflections should capture the scene by following reflected rays recursively un- the actual synthetic environment as accurately as pos- til a certain depth is reached, thereby capturing both sible, while still being feasible for interactive render- reflections and interreflections.
    [Show full text]
  • Ray Tracing Tutorial
    Ray Tracing Tutorial by the Codermind team Contents: 1. Introduction : What is ray tracing ? 2. Part I : First rays 3. Part II : Phong, Blinn, supersampling, sRGB and exposure 4. Part III : Procedural textures, bump mapping, cube environment map 5. Part IV : Depth of field, Fresnel, blobs 2 This article is the foreword of a serie of article about ray tracing. It's probably a word that you may have heard without really knowing what it represents or without an idea of how to implement one using a programming language. This article and the following will try to fill that for you. Note that this introduction is covering generalities about ray tracing and will not enter into much details of our implementation. If you're interested about actual implementation, formulas and code please skip this and go to part one after this introduction. What is ray tracing ? Ray tracing is one of the numerous techniques that exist to render images with computers. The idea behind ray tracing is that physically correct images are composed by light and that light will usually come from a light source and bounce around as light rays (following a broken line path) in a scene before hitting our eyes or a camera. By being able to reproduce in computer simulation the path followed from a light source to our eye we would then be able to determine what our eye sees. Of course it's not as simple as it sounds. We need some method to follow these rays as the nature has an infinite amount of computation available but we have not.
    [Show full text]
  • (543) Lecture 7 (Part 2): Texturing Prof Emmanuel
    Computer Graphics (543) Lecture 7 (Part 2): Texturing Prof Emmanuel Agu Computer Science Dept. Worcester Polytechnic Institute (WPI) The Limits of Geometric Modeling Although graphics cards can render over 10 million polygons per second Many phenomena even more detailed Clouds Grass Terrain Skin Computationally inexpensive way to add details Image complexity does not affect the complexity of geometry processing 2 (transformation, clipping…) Textures in Games Everthing is a texture except foreground characters that require interaction Even details on foreground texture (e.g. clothes) is texture Types of Texturing 1. geometric model 2. texture mapped Paste image (marble) onto polygon Types of Texturing 3. Bump mapping 4. Environment mapping Simulate surface roughness Picture of sky/environment (dimples) over object Texture Mapping 1. Define texture position on geometry 2. projection 4. patch texel 3. texture lookup 3D geometry 2D projection of 3D geometry t 2D image S Texture Representation Bitmap (pixel map) textures: images (jpg, bmp, etc) loaded Procedural textures: E.g. fractal picture generated in .cpp file Textures applied in shaders (1,1) t Bitmap texture: 2D image - 2D array texture[height][width] Each element (or texel ) has coordinate (s, t) s and t normalized to [0,1] range Any (s,t) => [red, green, blue] color s (0,0) Texture Mapping Map? Each (x,y,z) point on object, has corresponding (s, t) point in texture s = s(x,y,z) t = t(x,y,z) (x,y,z) t s texture coordinates world coordinates 6 Main Steps to Apply Texture 1. Create texture object 2. Specify the texture Read or generate image assign to texture (hardware) unit enable texturing (turn on) 3.
    [Show full text]
  • NVIDIA Opengl Extension Specifications
    NVIDIA OpenGL Extension Specifications NVIDIA OpenGL Extension Specifications NVIDIA Corporation Mark J. Kilgard, editor [email protected] May 21, 2001 1 NVIDIA OpenGL Extension Specifications Copyright NVIDIA Corporation, 1999, 2000, 2001. This document is protected by copyright and contains information proprietary to NVIDIA Corporation as designated in the document. Other OpenGL extension specifications can be found at: http://oss.sgi.com/projects/ogl-sample/registry/ 2 NVIDIA OpenGL Extension Specifications Table of Contents Table of NVIDIA OpenGL Extension Support.............................. 4 ARB_imaging........................................................... 6 ARB_multisample....................................................... 7 ARB_multitexture..................................................... 18 ARB_texture_border_clamp............................................. 19 ARB_texture_compression.............................................. 25 ARB_texture_cube_map................................................. 48 ARB_texture_env_add.................................................. 62 ARB_texture_env_combine.............................................. 65 ARB_texture_env_dot3................................................. 73 ARB_transpose_matrix................................................. 76 EXT_abgr............................................................. 81 EXT_bgra............................................................. 84 EXT_blend_color...................................................... 86 EXT_blend_minmax....................................................
    [Show full text]