Phong Illumination Model; Shading

Total Page:16

File Type:pdf, Size:1020Kb

Phong Illumination Model; Shading Phong Illumination Model A local illumination model EECS 487: Interactive • one bounce: light → surface → viewer Lighting a single point Computer Graphics At the point: n Lecture 16: : surface normal (orientation of surface) l: light vector (surface to light) n • Phong Illumination Model v: viewing vector (surface to eye) ϕ • Shading θ: light angle of incidence θ l ϕ: viewing angle v Phong Illumination Model Surface Reflection Coefficients Approximate surface color as Light sources: sum of three components: Approximate BRDFs: not physically based sd diffuse light intensity • an ideal diffuse component ss specular light intensity • a glossy/blurred specular component Modify surface color by changing reflection sa ambient light intensity • an ambient term coefficients based on: • material type m ambient color reflection • surface finish a m diffuse color reflection + = • texture maps d • what looks good ms specular color reflection • artistic license mshi shininess (blurriness) • trial and error me emissive color intensity • personal library + = Diffuse Example Ideal Diffuse Reflectance Ideal diffuse surface reflects light equally in all directions, according to Lambert's cosine law: • amount of light energy that falls on surface and gets Where is the light? reflected is proportional to the incidence angle, θ • perceived brightness (reflectance) is view independent Where’s the normal direction at the brightest point? θ Durand Ideal Diffuse Reflectance Ideal Diffuse Model Amount of light energy that falls At the microscopic level, an ideal on surface is proportional to diffuse surface is a very rough surface incidence angle, θ: • microfacets are oriented in any which way cd = sd md cos θ • examples: chalk, clay, surface of moon Curless For normalized n and l: c = s m max((n•l), 0) d d d RTR2 • (n•l) < 0 cos θ < 0 θ > 90º, light source is behind surface • why must n and l be normalized? l n u·v θ u·v = u v cosθ ⇒ cosθ = u v Durand Diffuse Reflectance and Viewing Angle Ideal Specular/Mirror Reflectance Lambert’s Cosine Law: amount of light energy that falls on Accounts for highlight seen on objects surface and gets reflected is proportional to incidence angle, θ i with smooth, shiny surfaces, such as: • cos θi = dot product of light vector with normal (both normalized) • metal • polished stone Shouldn’t the amount of energy reflected also be proportional • plastics to viewing angle, θ ? r • apples • no, whereas larger θi means • n skin energy arriving over area Recall: dA cos θi is spread across the sin (π/2 – θ) = cos θ larger area dA, larger θr simply means collecting energy from n the same area dA, but channelling it through the smaller area dA cos θ dA cos θ r θ Surface 2 π/2 − θ Surface 1 dA TP3, FvD94 Curless,Zhang n Ideal Specular/Mirror Reflectance Phong Specular Reflection r l v Reflection only at mirror angle Simulates a highlight θ θ φ • highlight intensity depends on viewing direction Reflection angle = incidence angle = θ Most intense specular reflection when v = r Model: all microfacets of mirror surface are oriented in the same How to compute r? direction as the surface itself • examples: mirrors, highly polished r = −l + 2(n•l)n n (in OpenGL, specular term is 0 if l • n = 0) metals r l 2(n ⋅ l)n (n ⋅ l)n -l Durand Glossy Reflectors Glossy Real materials tend to deviate significantly from ideal Reflectors mirror reflectors ⇒ highlight and reflections are blurry Simple empirical model: Also known as: “rough specular”, “directional diffuse”, • we expect most of the reflected light to travel in or “glossy” reflection the direction of the ideal reflection ray • but due to variations in microfacet orientations, (there are no ideal diffuse surfaces either …) some of the light will be reflected just slightly off from the ideal reflected direction • as we angle away from the reflected ray, we expect to see less light reflected Durand Durand Surface Roughness Phong “Glossy” Reflection Model Schlick As v angles away from r, specular reflection falls specular diffuse off, simulating “glossy” reflection: Glossy Surface Less Shiny Surface Diffuse Surface Perfect Mirror v v increasing roughness TP3 less glossy/ more glossy/blurry more specular Phong “Glossy” Reflection Model Material Glossiness Phong specular model: To account for the shininess of different material: mshi cs = ss ms max((r • v), 0) cs = ss ms cos φ = ss ms max((r • v), 0) larger mshi gives tighter and shinier highlight, with sudden dropoff, simulating a more mirror-like surface cos φ v n r r l v intensity φ specular angle mshi: RTR3 Phong Specular Reflection Blinn-Phong (Blinn-Torrance) Model larger mshi , tighter highlight Back to micro facets: • model surface by a collection of tiny mirrors • specular reflectance comes from mirrors oriented halfway between l and v, in direction of h , shinier s m l n h v ω ω larger TP3 Manocha Blinn-Phong Illumination Models h A rendering process can be modeled as an integral Model specular reflection with “halfway” l l equation representing the transport of light through vector (h) instead of r v the environment the rendering equation • consider the microfacet through point p that p Local illumination: an approx. of the rendering eqn. reflects light perfectly to the viewer • assumes light is scattered only once: light from light source is reflected by a surface and modulated on its way towards • h is the normal of this plane, it is halfway l + v h = the eye between l and v (by definition), h normalized l + v Global illumination: • angle between h and n is β; v = r when h = n • light rays traveling from light to surface may be v r n h (β is not the angle between and ) l r • blocked by intervening surfaces (shadows) or • specular reflection modeled as: β v • bent or scattered by intervening material (refraction and atmospheric 4m 4m effects) or c = s m (n • h) shi = s m (cos β) shi s s s s s p • light arriving at a surface may come indirectly via another surface (reflection and color bleed) Phong Ambient Term Putting It All Together Phong Illumination Model “Approximates” the contribution of all indirect m c = m s + (m (n⋅l) + m (r ⋅v) shi ) f (d)s illumination t a a d s Phong ρa ρd ρs ρtotal Surface uniformly lit θ = 60º • areas with no direct illumination are not completely dark • independent of: θ = 25º • light direction • surface normal • viewing angle θ = 0º Spheres rendered with ambient reflection only Durand OpenGL Light Sources OpenGL Lighting and Reflectance glLightfv(lightname,param,value) /* Initialize material property, light source, • parameters lighting model, and depth buffer. */ • GL_AMBIENT void init(void) • GL_DIFFUSE { • GL_SPECULAR GLfloat mat_specular[] = { 1.0, 1.0, 1.0, 1.0 }; • GL_POSITION GLfloat mat_shininess[] = { 50.0 }; GLfloat light_position[] = { 1.0, 1.0, 1.0, 0.0 }; • GL_SPOT_DIRECTION glClearColor(0.0, 0.0, 0.0, 0.0); • GL_SPOT_CUTOFF glShadeModel(GL_SMOOTH); • GL_SPOT_EXPONENT glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular); • GL_CONSTANT_ATTENUATION glMaterialfv(GL_FRONT, GL_SHININESS, mat_shininess); • GL_LINEAR_ATTENUATION • GL_QUADRATIC_ATTENUATION glLightfv(GL_LIGHT0, GL_POSITION, light_position); glEnable(GL_LIGHTING); Turning on the lights: glEnable(GL_LIGHT0); • glEnable(GL_LIGHTING) glEnable(GL_DEPTH_TEST); } • glEnable(GL_LIGHT0) OpenGL Material Properties Choosing the Parameters glMaterial(face,param,value) Experiment with different parameter settings • face • GL_FRONT A few suggestions: • GL_BACK • ma + md + ms < 1 • GL_FRONT_AND_BACK • use a small m (~0.1) • parameters a • GL_AMBIENT • try mshi ∈ [0, 100] • GL_DIFFUSE • GL_AMBIENT_AND_DIFFUSE TP3 • GL_SPECULAR • GL_SHININESS material m m m • GL_EMISSION d s shi See Redbook Chapter 5 for techniques to minimize metal small, color of metal large, color of metal large performance costs associated medium, color of medium, color of plastic medium with changing material object light (or white) properties planet varying 0 0 Curless Highlight Color Emissive Term For non-metals, e.g., plastics, highlight color is color Material’s emissive parameter me of light (plastics has a transparent/white coating) • assumed not lighting other objects For metals, e.g., brass, highlight depends on surface m c = m + m s + (m (n⋅l) + m (v ⋅r) shi ) f (d)s color t e a a d s Surface plastic metal clay Apodaca&Gritz Funkhouser Attenuation Model Global Ambient and Multiple Lights Whereas the ambient term simulates indirect lighting, attenuation model and fog simulate scattering effect Global ambient light source: cg = sg ma • sg set with: Intensity attenuation: light falls off the further away glLightModel*(GL_LIGHT_MODEL_AMBIENT,ambient_light) one gets from the source • distinguishes overlapping surfaces Multiple lights: n having the same reflection parameters (k) (k) (k) (k) 2 c = c + m + c + f (d )(c + c ), • radiant energy disperses as 1/d d t g e ∑ a d s 1 k=1 • d is the distance from the light source to surface k:!light!number,!not!exponentiation • reason for the inverse square falloff? d 2 ! 2 • attenuation function f (d) = 1/(a0+a1d+a2d ) • user defined constants a0 , a1 , a2 • since we’re not modeling atmospheric scattering, 1/d 2 often appears too harsh • instead, we use f (d) = 1/(a0+a1d) or no attenuation Lighting with attenuation: c’ = f (d )c Fog Fog Simple atmospheric effect f :!fog!factor!at!point!p color of fog: cf p • a little better realism color of surface: cs zend − zstart : the!foggy!range • fog effect: help to convey distances d f : fog!density cp = f cs + (1 − f ) cf , f ∈ [0,1] ! • 2 forms of depth cueing (ignoring scattering) • light-to-object distance conveyed by light attenuation
Recommended publications
  • Opengl 4.0 Shading Language Cookbook
    OpenGL 4.0 Shading Language Cookbook Over 60 highly focused, practical recipes to maximize your use of the OpenGL Shading Language David Wolff BIRMINGHAM - MUMBAI OpenGL 4.0 Shading Language Cookbook Copyright © 2011 Packt Publishing All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews. Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book. Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information. First published: July 2011 Production Reference: 1180711 Published by Packt Publishing Ltd. 32 Lincoln Road Olton Birmingham, B27 6PA, UK. ISBN 978-1-849514-76-7 www.packtpub.com Cover Image by Fillipo ([email protected]) Credits Author Project Coordinator David Wolff Srimoyee Ghoshal Reviewers Proofreader Martin Christen Bernadette Watkins Nicolas Delalondre Indexer Markus Pabst Hemangini Bari Brandon Whitley Graphics Acquisition Editor Nilesh Mohite Usha Iyer Valentina J. D’silva Development Editor Production Coordinators Chris Rodrigues Kruthika Bangera Technical Editors Adline Swetha Jesuthas Kavita Iyer Cover Work Azharuddin Sheikh Kruthika Bangera Copy Editor Neha Shetty About the Author David Wolff is an associate professor in the Computer Science and Computer Engineering Department at Pacific Lutheran University (PLU).
    [Show full text]
  • Phong Shading
    Computer Graphics Shading Based on slides by Dianna Xu, Bryn Mawr College Image Synthesis and Shading Perception of 3D Objects • Displays almost always 2 dimensional. • Depth cues needed to restore the third dimension. • Need to portray planar, curved, textured, translucent, etc. surfaces. • Model light and shadow. Depth Cues Eliminate hidden parts (lines or surfaces) Front? “Wire-frame” Back? Convex? “Opaque Object” Concave? Why we need shading • Suppose we build a model of a sphere using many polygons and color it with glColor. We get something like • But we want Shading implies Curvature Shading Motivation • Originated in trying to give polygonal models the appearance of smooth curvature. • Numerous shading models – Quick and dirty – Physics-based – Specific techniques for particular effects – Non-photorealistic techniques (pen and ink, brushes, etching) Shading • Why does the image of a real sphere look like • Light-material interactions cause each point to have a different color or shade • Need to consider – Light sources – Material properties – Location of viewer – Surface orientation Wireframe: Color, no Substance Substance but no Surfaces Why the Surface Normal is Important Scattering • Light strikes A – Some scattered – Some absorbed • Some of scattered light strikes B – Some scattered – Some absorbed • Some of this scattered light strikes A and so on Rendering Equation • The infinite scattering and absorption of light can be described by the rendering equation – Cannot be solved in general – Ray tracing is a special case for
    [Show full text]
  • CS488/688 Glossary
    CS488/688 Glossary University of Waterloo Department of Computer Science Computer Graphics Lab August 31, 2017 This glossary defines terms in the context which they will be used throughout CS488/688. 1 A 1.1 affine combination: Let P1 and P2 be two points in an affine space. The point Q = tP1 + (1 − t)P2 with t real is an affine combination of P1 and P2. In general, given n points fPig and n real values fλig such that P P i λi = 1, then R = i λiPi is an affine combination of the Pi. 1.2 affine space: A geometric space composed of points and vectors along with all transformations that preserve affine combinations. 1.3 aliasing: If a signal is sampled at a rate less than twice its highest frequency (in the Fourier transform sense) then aliasing, the mapping of high frequencies to lower frequencies, can occur. This can cause objectionable visual artifacts to appear in the image. 1.4 alpha blending: See compositing. 1.5 ambient reflection: A constant term in the Phong lighting model to account for light which has been scattered so many times that its directionality can not be determined. This is a rather poor approximation to the complex issue of global lighting. 1 1.6CS488/688 antialiasing: Glossary Introduction to Computer Graphics 2 Aliasing artifacts can be alleviated if the signal is filtered before sampling. Antialiasing involves evaluating a possibly weighted integral of the (geometric) image over the area surrounding each pixel. This can be done either numerically (based on multiple point samples) or analytically.
    [Show full text]
  • FAKE PHONG SHADING by Daniel Vlasic Submitted to the Department
    FAKE PHONG SHADING by Daniel Vlasic Submitted to the Department of Electrical Engineering and Computer Science in Partial Fulfillment of the Requirements for the Degrees of Bachelor of Science in Computer Science and Engineering and Master of Engineering in Electrical Engineering and Computer Science at the Massachusetts Institute of Technology May 17, 2002 Copyright 2002 M.I.T. All Rights Reserved. Author ________________________________________________________ Department of Electrical Engineering and Computer Science May 17, 2002 Approved by ___________________________________________________ Leonard McMillan Thesis Supervisor Accepted by ____________________________________________________ Arthur C. Smith Chairman, Department Committee on Graduate Theses FAKE PHONG SHADING by Daniel Vlasic Submitted to the Department of Electrical Engineering and Computer Science May 17, 2002 In Partial Fulfillment of the Requirements for the Degrees of Bachelor of Science in Computer Science and Engineering And Master of Engineering in Electrical Engineering and Computer Science ABSTRACT In the real-time 3D graphics pipeline framework, rendering quality greatly depends on illumination and shading models. The highest-quality shading method in this framework is Phong shading. However, due to the computational complexity of Phong shading, current graphics hardware implementations use a simpler Gouraud shading. Today, programmable hardware shaders are becoming available, and, although real-time Phong shading is still not possible, there is no reason not to improve on Gouraud shading. This thesis analyzes four different methods for approximating Phong shading: quadratic shading, environment map, Blinn map, and quadratic Blinn map. Quadratic shading uses quadratic interpolation of color. Environment and Blinn maps use texture mapping. Finally, quadratic Blinn map combines both approaches, and quadratically interpolates texture coordinates. All four methods adequately render higher-resolution methods.
    [Show full text]
  • Interactive Refractive Rendering for Gemstones
    Interactive Refractive Rendering for Gemstones LEE Hoi Chi Angie A Thesis Submitted in Partial Fulfillment of the Requirements for the Degree of Master of Philosophy in Automation and Computer-Aided Engineering ©The Chinese University of Hong Kong Jan, 2004 The Chinese University of Hong Kong holds the copyright of this thesis. Any person(s) intending to use a part of whole of the materials in the thesis in a proposed publication must seek copyright release from the Dean of the Graduate School. 统系绍¥圖\& 卿 15 )ij UNIVERSITY —肩j N^Xlibrary SYSTEM/-^ Abstract Customization plays an important role in today's jewelry design industry. There is a demand on the interactive gemstone rendering which is essential for illustrating design layout to the designer and customer interactively. Although traditional rendering techniques can be used for generating photorealistic image, they require long processing time for image generation so that interactivity cannot be attained. The technique proposed in this thesis is to render gemstone interactively using refractive rendering technique. As realism always conflicts with interactivity in the context of rendering, the refractive rendering algorithm need to strike a balance between them. In the proposed technique, the refractive rendering algorithm is performed in two stages, namely the pre-computation stage and the shading stage. In the pre-computation stage, ray-traced information, such as directions and positions of rays, are generated by ray tracing and stored in a database. During the shading stage, the corresponding data are retrieved from the database for the run-time shading calculation of gemstone. In the system, photorealistic image of gemstone with various cutting, properties, lighting and background can be rendered interactively.
    [Show full text]
  • Flat Shading
    Shading Reading: Angel Ch.6 What is “Shading”? So far we have built 3D models with polygons and rendered them so that each polygon has a uniform colour: - results in a ‘flat’ 2D appearance rather than 3D - implicitly assumed that the surface is lit such that to the viewer it appears uniform ‘Shading’ gives the surface its 3D appearance - under natural illumination surfaces give a variation in colour ‘shading’ across the surface - the amount of reflected light varies depends on: • the angle between the surface and the viewer • angle between the illumination source and surface • surface material properties (colour/roughness…) Shading is essential to generate realistic images of 3D scenes Realistic Shading The goal is to render scenes that appear as realistic as photographs of real scenes This requires simulation of the physical processes of image formation - accurate modeling of physics results in highly realistic images - accurate modeling is computationally expensive (not real-time) - to achieve a real-time graphics pipeline performance we must compromise between physical accuracy and computational cost To model shading requires: (1) Model of light source (2) Model of surface reflection Physically accurate modelling of shading requires a global analysis of the scene and illumination to account for surface reflection between surfaces/shadowing/ transparency etc. Fast shading calculation considers only local analysis based on: - material properties/surface geometry/light source position & properties Physics of Image Formation Consider the
    [Show full text]
  • Ray Casting Architectures for Volume Visualization
    MITSUBISHI ELECTRIC RESEARCH LABORATORIES http://www.merl.com Ray Casting Architectures for Volume Visualization Harvey Ray, Hanspeter Pfister, Deborah Silver, Todd A. Cook TR99-17 April 1999 Abstract Real-time visualization of large volume datasets demands high performance computation, push- ing the storage, processing, and data communication requirements to the limits of current tech- nology. General purpose parallel processors have been used to visualize moderate size datasets at interactive frame rates; however, the cost and size of these supercomputers inhibits the widespread use for real-time visualization. This paper surveys several special purpose architectures that seek to render volumes at interactive rates. These specialized visualization accelerators have cost, per- formance, and size advantages over parallel processors. All architectures implement ray casting using parallel and pipelined hardware. We introduce a new metric that normalizes performance to compare these architectures. The architectures included in this survey are VOGUE, VIRIM, Array Based Ray Casting, EM-Cube, and VIZARD II. We also discuss future applications of special purpose accelerators. IEEE Transactions on Visualization and Computer Graphics This work may not be copied or reproduced in whole or in part for any commercial purpose. Permission to copy in whole or in part without payment of fee is granted for nonprofit educational and research purposes provided that all such whole or partial copies include the following: a notice that such copying is by permission of Mitsubishi Electric Research Laboratories, Inc.; an acknowledgment of the authors and individual contributions to the work; and all applicable portions of the copyright notice. Copying, reproduction, or republishing for any other purpose shall require a license with payment of fee to Mitsubishi Electric Research Laboratories, Inc.
    [Show full text]
  • Shading and Rendering
    Chapter 7 - Shading and Rendering • Local Illumination Models: Shading • Global Illumination: Ray Tracing • Global Illumination: Radiosity • Non-Photorealistic Rendering Literature: H.-J. Bungartz, M. Griebel, C. Zenger: Einführung in die Computergraphik, 2. Auflage, Vieweg 2002 LMU München – Medieninformatik – Andreas Butz – Computergrafik 1 – SS2015 – Kapitel 7 1 ! The 3D rendering pipeline (our version for this class) 3D models in 3D models in world 2D Polygons in Pixels in image model coordinates coordinates camera coordinates coordinates Scene graph Camera Rasterization Animation, Lights Interaction LMU München – Medieninformatik – Andreas Butz – Computergrafik 1 – SS2015 – Kapitel 7 2 ! Local Illumination: Shading • Local illumination: – Light calculations are done locally without the global scene – No cast shadows (since those would be from other objects, hence global) – Object shadows are OK, only depend on the surface normal ! • Simple idea: Loop over all polygons • For each polygon: – Determine the pixels it occupies on the screen and their color – Draw using e.g., Z-buffer algorithm to get occlusion right ! • Each polygon only considered once • Some pixels considered multiple times • More efficient: Scan-line algorithms LMU München – Medieninformatik – Andreas Butz – Computergrafik 1 – SS2015 – Kapitel 7 3 ! Scan-Line Algorithms in More Detail • Polygon Table (PT): – List of all polygons with plane equation parameters, color information and inside/outside flag (see rasterizaton) ! • Edge Table (ET): – List of all non-horizontal
    [Show full text]
  • Appendix: Graphics Software Took
    Appendix: Graphics Software Took Appendix Objectives: • Provide a comprehensive list of graphics software tools. • Categorize graphics tools according to their applications. Many tools come with multiple functions. We put a primary category name behind a tool name in the alphabetic index, and put a tool name into multiple categories in the categorized index according to its functions. A.I. Graphics Tools Listed by Categories We have no intention of rating any of the tools. Many tools in the same category are not necessarily of the same quality or at the same capacity level. For example, a software tool may be just a simple function of another powerful package, but it may be free. Low4evel Graphics Libraries 1. DirectX/DirectSD - - 248 2. GKS-3D - - - 278 3. Mesa 342 4. Microsystem 3D Graphic Tools 346 5. OpenGL 370 6. OpenGL For Java (GL4Java; Maps OpenGL and GLU APIs to Java) 281 7. PHIGS 383 8. QuickDraw3D 398 9. XGL - 497 138 Appendix: Graphics Software Toois Visualization Tools 1. 3D Grapher (Illustrates and solves mathematical equations in 2D and 3D) 160 2. 3D Studio VIZ (Architectural and industrial designs and concepts) 167 3. 3DField (Elevation data visualization) 171 4. 3DVIEWNIX (Image, volume, soft tissue display, kinematic analysis) 173 5. Amira (Medicine, biology, chemistry, physics, or engineering data) 193 6. Analyze (MRI, CT, PET, and SPECT) 197 7. AVS (Comprehensive suite of data visualization and analysis) 211 8. Blueberry (Virtual landscape and terrain from real map data) 221 9. Dice (Data organization, runtime visualization, and graphical user interface tools) 247 10. Enliten (Views, analyzes, and manipulates complex visualization scenarios) 260 11.
    [Show full text]
  • Computação Gráfica Computer Graphics Engenharia Informática (11569) – 3º Ano, 2º Semestre
    Computação Gráfica Computer Graphics Engenharia Informática (11569) – 3º ano, 2º semestre Chap. 9 – Shading http://di.ubi.pt/~agomes/cg/09-shading.pdf T09 Shading Outline Based on https://www.cs.unc.edu/~dm/UNC/COMP236/LECTURES/LightingAndShading.ppt …: – Light-dependent illumination models: a refresher – Shading: motivation – Types of shading: flat, Gouraud, and Phong – Flat shading algorithm – Gouraud shading algorithm – Phong shading algorithm – Shading issues – Flat, Gouraud, and Phong shaders in GLSL – OpenGL/GLSL examples. T09 Shading Light-dependent models: a refresher stills.htm / raygallery / raytracer Direct (or local) illumination: /~johns/ – Simple interaction between light and objects jedi.ks.uiuc.edu – Real-time process supported by OpenGL http:// l – Example: Phong’s illumination model. Indirect (or global) illumination: – Multiple interactions between light and objects (e.g., inter-object reflections, refraction, and shadows) – It is a real-time process for small scenes, but not for complex scenes – Examples: raytracing, radiosity, photon mapping … T09 Shading Shading: motivation We now have a direct lighting model for a simple point on the surface. Assuming that our surface is defined as a mesh of polygonal faces, what points should we use? – Computing the color for all points is expensive – The normals may not be explicitly defined for all points It should be noted that: – Lighting involves a rather cumbersome calculation process if it is applied to all points on the surface of an object – There are several possible
    [Show full text]
  • Intro. Computer Graphics
    An Introduction to Computer Graphics Joaquim Madeira Beatriz Sousa Santos Universidade de Aveiro 1 Topics What is CG Brief history Main applications CG Main Tasks Simple Graphics system CG APIs 2D and 3D Visualization Illumination and shading Computer Graphics The technology with which pictures, in the broadest sense of the word, are Captured or generated, and presented Manipulated and / or processed Merged with other, non-graphical application data It includes: Integration with other kinds of data – Multimedia Advanced dialogue and interactive technologies 3 Computer Graphics Computer Graphics deals with all aspects of creating images with a computer Hardware Software Applications [Angel] 4 Computer Graphics: 1950 – 1960 Earliest days of computing Pen plotters Simple calligraphic displays Issues Cost of display refresh Slow, unreliable, expensive computers 5 Computer Graphics: 1960 – 1970 Wireframe graphics Draw only lines ! [Angel] 6 Computer Graphics: 1960 – 1970 Ivan Sutherland’s Sketchpad PhD thesis at MIT (1963) Man-machine interaction Processing loop Display something Wait for user input Generate new display [http://history-computer.com] 7 Sketchpad (Ivan Sutherland, 1963) http://www.youtube.com/watch?feature=endscreen&NR=1&v=USyoT_Ha_bA 8 Computer Graphics: 1970 – 1980 Raster graphics Allows drawing polygons First graphics standards Workstations and PCs 9 Raster graphics Image produced as an array (the raster) of picture elements (pixels) in the frame buffer [Angel] 10 Raster graphics Drawing
    [Show full text]
  • A Graphics Pipeline for Directly Rendering 3D Scenes on Web Browsers
    A Graphics Pipeline for Directly Rendering 3D Scenes on Web Browsers Master’s Thesis ! Edgar Marchiel Pinto A Graphics Pipeline for Directly Rendering 3D Scenes on Web Browsers DISSERTATION concerning to the investigation work done to obtain the degree of MASTER OF SCIENCE in COMPUTER SCIENCE AND ENGINEERING by Edgar Marchiel Pinto natural of Covilha,˜ Portugal ! Computer Graphics and Multimedia Group Department of Computer Science University of Beira Interior Covilha,˜ Portugal www.di.ubi.pt Copyright c 2009 by Edgar Marchiel Pinto. All right reserved. No part of this publica- tion can be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the previous written permission of the author. A Graphics Pipeline for Directly Rendering 3D Scenes on Web Browsers Author: Edgar Marchiel Pinto Student Id: M1489 Resumo Nesta dissertac¸ao˜ propomos um pipeline grafico,´ na forma de uma biblioteca Web- 3D, para a renderizac¸ao˜ de cenas 3D directamente no browser. Esta biblioteca de codigo´ livre chama-se Glyper3D. Foi desenvolvida usando a linguagem de programac¸ao˜ JavaScript, em conjunto com o elemento canvas do HTML5, permitindo a criac¸ao,˜ ma- nipulac¸ao˜ e renderizac¸ao˜ de conteudos´ 3D no browser, sem ser necessaria´ a instalac¸ao˜ de qualquer tipo de plug-in ou add-on para o browser, ou seja, nao˜ tira partido de acelerac¸ao˜ grafica.´ Esta e´ a principal diferenc¸a em relac¸ao˜ a outras tecnologias Web3D. Como e´ uma biblioteca direccionada para um ambiente web, foi desenvolvida para pro- porcionar maior usabilidade, proporcionando assim uma forma mais simples e intuitiva para desenvolver conteudos´ 3D directamente no browser.
    [Show full text]