Interactive 3D Graphics

Programma dell'insegnamento - Corso di laurea in Informatica Magistrale internazionale

 

Docente

Prof. Roberto Ranon

    Indirizzo e-mail

    roberto.ranon@uniud.it

     

    Indirizzo Pagina Web Personale

    Sito Web http://sole.dimi.uniud.it/~roberto.ranon/

    Crediti

    6 CFU

    Finalità

    Lo scopo del corso e' introdurre lo studente ai concetti, agli algoritmi, e alle tecnologie della grafica 3D interattiva, con esempi pratici in WebGL, usando la libreria threejs.

    Al termine del corso, lo studente sarà in grado di:

    - comprendere il funzionamento delle applicazioni basate su grafica 3D interattiva, come ad esempio videogiochi, visualizzazione di dati, e simulazioni;

    -  progettare e implementare applicazioni di questo tipo, relativamente alla parte grafica.

    NOTA BENE: il corso (lezioni e materiali) viene fornito in lingua inglese.

    La pagina Web del corso e’ http://www.dimi.uniud.it/ranon/int3d.html

    Programma

    Introduzione. Differenze tra grafica 3D e grafica 3D interattiva. Il ciclo di rendering interattivo. La pipeline per il real-time rendering.

    Rappresentazione di geometrie. Mesh di poligoni. Sistemi di coordinate. Rappresentazione di triangoli e mesh di triangoli. Normali e altri dati associati ai vertici.

    Trasformazioni. Trasformazioni affini: rotazione, scalatura, traslazione, e loro rappresentazione con matrici. Angoli di Eulero. Trasformazioni in coordinate omogenee.

    La telecamera virtuale. Rappresentazione di una telecamera virtuale. Camera space, clip space e screen space. Proiezioni ortografiche e prospettiche. Clipping e screen mapping.

    Rasterizzazione e interpolazione. Algoritmi per la rasterizzazione di punti, linee e poligoni. Interpolazione prospettica di attributi dei vertici. Aliasing e metodi di anti-aliasing screen-based.

    Operazioni su frammenti e buffer. Operazioni su frammenti: depth test, blending. Algoritmi per il rendering di superfici semitrasparenti.

    Programmable Shaders. Vertex e fragment shaders. Il linguaggio Glsl.

    Shading. I colori e la loro rappresentazione nel rendering. Fenomeni visuali. Interazione tra luce e superfici. Equazione generale per il rendering. Bidirectional Scattering Distribution Function. Superfici lambertiane. Superfici lucide. Equazioni di shading real-time e loro implementazione tramite shaders.

    Modelli di Illuminazione Blinn-Phong e Cook-Torrance. Rappresentazione di sorgenti di luce e materiali. Equazione di shading di Blinn-Phong. Termine speculare di Cook-Torrance. Implementazione tramite shaders.

    Textures. Concetto di texture map. Texture space e coordinate di texture. Applicazione di texture. Metodi di anti-aliasing per texture.

    Uso di Textures nello shading. Material Mapping, Normal Mapping. Displacement Mapping. Reflection e Refraction Mapping, Shadow Mapping.

    Strutture dati spaziali. Bounding volumes, Bounding Volume Hierarchies, Binary Space Partitioning Trees. Algoritmi di culling: Hierarchical View Frustum Culling

    Rendering Basato su Immagini. Effetti full screen. Implementazione di alcuni algoritmi di image processing tramite shaders: color filters, convoluzioni.

    Introduzione alle animazioni. Animazioni tramite keyframing: interpolazione tramite splines. Cenni ad altri tipi di animazioni: skinning, morphing, sistemi di particelle. Rappresentazione di rotazioni tramite quaternioni.

    Controllo della telecamera virtuale. Panoramica dei metodi interattivi, assistiti e automatici.

    Attività di Laboratorio

    Il corso non prevede una vera e propria attività di laboratorio, ma a lezione vengono presentati esempi pratici e proposti alcuni esercizi.

    Prerequisiti

    E’ necessaria la conoscenza di base della programmazione e dell’algebra lineare (vettori, matrici e operazioni con essi).

    Bibliografia

    - Real-Time Rendering, 2nd oppure 3rd edition, di T. Akenine-Möller, E. Haines, e N. Hoffman

    - 3D Math Primer for Graphics and Game Development, di F. Dunn e I. Parberry, A K Peters / CRC Press oppure Mathematics for 3D Game Programming and Computer Graphics, 2nd edition, di Eric Lengyel, Cengage Learning 2011

    - slides ed esempi forniti a lezione e su materialedidattico.uniud.it.

    Modalità d'esame

    L'esame si compone di una prova scritta con esercizi e domande aperte, e di due esercitazioni pratiche (assegnate nel corso delle lezioni) che consistono nella realizzazione di un programma secondo le indicazioni fornite dal docente e riportate sulla pagina Web del corso. Le esercitazioni vanno consegnate il giorno precedente allo scritto che si intende sostenere, e vengono discusse con lo studente e valutate in una discussione orale.

    Orario di ricevimento

    Su appuntamento.

    **************************************************************************************

    The main goal of the course is to introduce concepts, algorithms and technologies in the field of interactive 3D graphics, with practical examples in WebGL, using the three.js library.

    By the end of the course, the student will be able to:

    - understand the functioning of interactive 3D graphics applications, such as videogames, data visualization, and simulations;

    - design and implement the graphics part of such kind of applications.

     

    The language of instruction is English and all of the syllabus material is in English. Examination questions will be given and can be answered in English.

    The Web page of the course is http://www.dimi.uniud.it/ranon/int3d.html

    Program

    Introduction. The interactive 3D rendering cycle. The real-time rendering pipeline.

    Geometry representation. Polygon meshes and coordinate systems. Triangle representation and triangle meshes. Normals and other vertex data.

    Transformations. Affine transformations: rotations, scaling, translation, and their representation through matrices. Euler Angles. Transformations in homogeneous coordinates.

    The virtual camera. Representation of a virtual camera. Camera space, clip space and screen space. Orthographic and perspective projections. Clipping and screen mapping.

    Rasterization and interpolation. Algorithms for rasterizing points, lines and polygons. Perspective interpolation of vertex data. Aliasing and screen-based anti-aliasing methods.

    Buffer and fragment operations. Depth test, blending. Algorithms for rendering semi-transparent surfaces.

    Programmable shaders. Vertex and fragment shaders. The Glsl language.

    Shading. Colors and their representation in rendering. Visual phenomena and their importance in shading. Interactions between light and surfaces. The general rendering equation. Bidirectional Scattering Distribution Function. Lambertian Surfaces. Glossy Surfaces. Real-time shading equations and their implementation through shaders.

    Blinn-Phong and Cool-Torrance Illumination models. Representation of light sources and materials. Blinn-Phong specular term. Cook-Torrance specular term.

    Textures. Texture maps. Texture space and texture coordinates. Texture application. Anti-aliasing methods for textures.

    Using textures in shading. Material Mapping, Normal Mapping. Displacement Mapping. Reflection and Refraction Mapping, Shadow Mapping.

    Spatial data structures.  Bounding volumes, Bounding Volume Hierarchies, Binary Space Partitioning Trees. Culling algorithms: Hierarchical View Frustum Culling

    Image-based rendering. Full screen effects. Using shaders to implement image processing algorithms: color filters, convolutions.

    Introduction to animations. Keyframe animations: interpolation through splines. Other kind of animations: skinning, morphing, particle systems. Representing rotations with quaternions.

    Controlling a virtual camera. Interactive, assisted and automatic methods: state of the art.

     

    Bibliography:

    -Real-Time Rendering, 3rd edition, di T. Akenine-Möller, E. Haines, e N. Hoffman

    -3D Math Primer for Graphics and Game Development, di F. Dunn e I. Parberry

    -Mathematics for 3D Game Programming and Computer Graphics, 2nd edition, di Eric Lengyel

    - slides and examples given in class and available at materialedidattico.uniud.it.

    Exam

    -  written exam with open questions and exercises.

    -  two practical projects, that are due before the written exams, and whose specific topic will be given during lectures and posted on the course web page.