me: marco tarini • consultinghours : • course web...

34
Marco Tarini - Computer Graphics - Lez 1 Univ Insubria 2016/2017 1 Computer Graphics me: Marco Tarini e-mail: [email protected] Consulting hours : after each lecture, or, contact me course web page: 1. google for: “Marco Tarini” 2. follow 1st link (that’s me) 3. tab “teaching” (page bottom!) 4. “Computer Graphics 16/17” 1 M a r c o T a r i n i C o m p u t e r G r a p h i c s 2 0 1 6 / 1 7 U n i v e r s i t à d e l l ’ I n s u b r i a Computer Graphics Marco Tarini Università dell’Insubria Corso di Laurea in Informatica Anno Accademico 2016/17 Lez 0: Intro and applications 2

Upload: others

Post on 14-Jun-2020

9 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: me: Marco Tarini • Consultinghours : • course web pagevcg.isti.cnr.it/~tarini/teaching/cg16/Lez01.Intro.pdf · – in the last ~ three dozens years ... Univ Insubria 2016/2017

Marco Tarini - Computer Graphics -Lez 1

Univ Insubria 2016/2017 1

Computer Graphics

• me: Marco Tarini e-mail: [email protected]

• Consulting hours : after each lecture,or, contact me

• course web page: 1. google for: “Marco Tarini”2. � follow 1st link (that’s me)3. � tab “teaching” (page bottom!)4. � “Computer Graphics 16/17”

1M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 6 / 1 7 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a

Computer Graphics

Marco Tarini

Università dell’Insubria

Corso di Laurea in Informatica

Anno Accademico 2016/17

Lez 0: Intro and applications

2

Page 2: me: Marco Tarini • Consultinghours : • course web pagevcg.isti.cnr.it/~tarini/teaching/cg16/Lez01.Intro.pdf · – in the last ~ three dozens years ... Univ Insubria 2016/2017

Marco Tarini - Computer Graphics -Lez 1

Univ Insubria 2016/2017 2

Needed tools

• A bit of math– Linear Algebra:

• esp. vector, matrices (3x3 or 4x4)

• A bit of algorithms– E.g. evaluating the complexity of an algo

• A lot of willingness to learn

3M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 6 / 1 7 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a

A definition

CG: Computer Graphicsa sub-field of computer science which studies methods for digitally synthesizing and manipulating visual content.

CGI: Computer Generated Imagery

4M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 6 / 1 7 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a

Page 3: me: Marco Tarini • Consultinghours : • course web pagevcg.isti.cnr.it/~tarini/teaching/cg16/Lez01.Intro.pdf · – in the last ~ three dozens years ... Univ Insubria 2016/2017

Marco Tarini - Computer Graphics -Lez 1

Univ Insubria 2016/2017 3

Computer Graphics: 3D

• In general terms:1. Digital modelling of (generally) 3D entities2. From those, to synthetic images

• A large fields– this is an introductory course

• Rapidly advancing field– in the last ~ three dozens years

5M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 6 / 1 7 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a

CG: technologies

• HW– input:

• keyboard, mouse• gloves, trackballs, gamepads, • tracked devices (e.g. nintendo Wii)• scanning device (e.g. xbox kinect)• …

– output: • monitors, projectors• multiple projector systems• stereo (“3D”) video systems • holographic displays• ...

– input + ouput:• haptic interfaces• VR / oculus rift

6M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 6 / 1 7 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a

Page 4: me: Marco Tarini • Consultinghours : • course web pagevcg.isti.cnr.it/~tarini/teaching/cg16/Lez01.Intro.pdf · – in the last ~ three dozens years ... Univ Insubria 2016/2017

Marco Tarini - Computer Graphics -Lez 1

Univ Insubria 2016/2017 4

Scientific fields surrounding Computer GraphicsAlgorithms and Data Structures

(like anything in computer science?)Hardware architectures

as CG uses a lot of dedicated hardware (“GPU”)Computational Geometry

algorithms for tasks with an immediate geometric interpretationComputer Vision

robotic vision, in a sense, the inverse problems of CGImage Processing

the cousin on the 2D sideParallel Computing

because they reuse the dedicated hardware designed for CGInteractive techniques (HCI – human computing interaction)

GUI: Graphics User InterfacesScientific Visualization (and Data Visualization)

uses CG at its core

FIEL

DS

USE

DBY

CG

FIEL

DS

BOU

ND

ING

CG

FIEL

DS

USI

NG

CG

7M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 6 / 1 7 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a

Computer Graphics: applicazioni

• Cultural heritage– musei virtuali– supporto al restauro– supporto all’analisi– monitoring

• Medicina– supporto alla diagnosi– telechirurgia– simulazioni

• Architetturali– Supporto al design– Previews

• …

• Videogiochi• Cinematografia

– Visual effects– Film di animazione

• Scientific Visualization• Manufacturing industry

– e.g. Computer Aided Design• Telecommunications

– Personalized Avatars– E–commerce

• Virtual Reality – e augmented reality

Page 5: me: Marco Tarini • Consultinghours : • course web pagevcg.isti.cnr.it/~tarini/teaching/cg16/Lez01.Intro.pdf · – in the last ~ three dozens years ... Univ Insubria 2016/2017

Marco Tarini - Computer Graphics -Lez 1

Univ Insubria 2016/2017 5

Computer Graphics: applicazioni

• Visualizzazione Scientifica– aka: SciVis , visual data analysis ...

(TACC Scientific Visualization group)

(Pittsburg Supercomputing center)(NASA)

• Visualizzazione di dati scientifici• fenomeni meteorologicici, medici,

biologici, chimici, fisici, astrofisici,etc etc

• Origine dei dati:• l’output di una simulazione• acquisiti con qualche sistema di

misuraTipicamente: grandi quantità di dati

9M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 6 / 1 7 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a

Visualizzazione Scientifica

Onde gravitazionali durante una

collisione di buchi neri

(Max Planck Insitute for Gravitational Physics) Rhinovirus 3 protein

10M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 6 / 1 7 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a

Page 6: me: Marco Tarini • Consultinghours : • course web pagevcg.isti.cnr.it/~tarini/teaching/cg16/Lez01.Intro.pdf · – in the last ~ three dozens years ... Univ Insubria 2016/2017

Marco Tarini - Computer Graphics -Lez 1

Univ Insubria 2016/2017 6

Visualizzazione Scientifica

• Visualizzazione Scientifica– aka: SciVis ,

visual data analysis ...

(superficie di un vetro -- Nanorobotics Lab

(Carnegie Mellon University )

(Pittsburg Supercomputing center)(NASA)

11M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 6 / 1 7 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a

Visualizzazione Scientifica

• Visualizzazione Scientifica– aka: SciVis , visual data analysis ...

(Pittsburg Supercomputing center)

(NASA)12M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 6 / 1 7 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a

Page 7: me: Marco Tarini • Consultinghours : • course web pagevcg.isti.cnr.it/~tarini/teaching/cg16/Lez01.Intro.pdf · – in the last ~ three dozens years ... Univ Insubria 2016/2017

Marco Tarini - Computer Graphics -Lez 1

Univ Insubria 2016/2017 7

parentesi parentesi parentesi parentesi parentesi

parentesi parentesi parentesi parentesi parentesi

VS

• dati astratti (N dimensionali)

• Scopo:chiarezza/leggibilità

• Mezzi:i più vari

13

Scientific Visualization

• dati con un interpretazione 3D “naturale”– spesso:

+ dimensione tempo• Scopo:

chiarezza/leggibilità• Mezzi:

realismo, oppure …

Data Visualization

parentesi parentesi parentesi parentesi parentesi

parentesi parentesi parentesi parentesi parentesi

VS

14

Scientific Visualization Data Visualization

Simulaz.

relazione

fra due fluidi

di densità diverse

Page 8: me: Marco Tarini • Consultinghours : • course web pagevcg.isti.cnr.it/~tarini/teaching/cg16/Lez01.Intro.pdf · – in the last ~ three dozens years ... Univ Insubria 2016/2017

Marco Tarini - Computer Graphics -Lez 1

Univ Insubria 2016/2017 8

Data Visualzion: an early example

M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 6 / 1 7 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a 15

Charles Minard, 1869: Napoelon Campaign

Computer Graphics: applicazioni

• Cultural heritage– musei virtuali– supporto al restauro– supporto all’analisi– monitoring

• Medicina– supporto alla diagnosi– telechirurgia– simulazioni

• Architetturali– Supporto al design– Previews

• …

• Videogiochi

• Cinematografia– Visual effects

– Film di animazione

• Scientific Visualization

• Manufacturing industry– e.g. Computer Aided Design

• Telecommunications

– Personalized Avatars

– E–commerce

• Virtual Reality

– e augmented reality

Page 9: me: Marco Tarini • Consultinghours : • course web pagevcg.isti.cnr.it/~tarini/teaching/cg16/Lez01.Intro.pdf · – in the last ~ three dozens years ... Univ Insubria 2016/2017

Marco Tarini - Computer Graphics -Lez 1

Univ Insubria 2016/2017 9

Computer Graphics: applicazioni

• applicazioni medicali– supporto alla diagnosi

• e.g. visualizz. CAT scans– chirurgia virtuale – tele-chirurgia

18M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 6 / 1 7 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a

Computer Graphics: applicazioni

• Industria Manifatturiera– CAD– Rapid Prototyping– Simulazioni

di funzionamento– Defect detection– …

19M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 6 / 1 7 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a

Page 10: me: Marco Tarini • Consultinghours : • course web pagevcg.isti.cnr.it/~tarini/teaching/cg16/Lez01.Intro.pdf · – in the last ~ three dozens years ... Univ Insubria 2016/2017

Marco Tarini - Computer Graphics -Lez 1

Univ Insubria 2016/2017 10

Computer Graphics: applicazioni

• Entertainment: movie industry– visual effects (non special fx)

Jurassic Park - Universal Studios 1993Star Wars: The Phantom Manace - Lucasart 1999 20M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 6 / 1 7 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a

parentesi parentesi parentesi parentesi parentesi

parentesi parentesi parentesi parentesi parentesi

Effetti Visuali VS Effetti Speciali

• (in post-produzione)(sul set)(es: stuntmen, corde, esplosioni, …)

21

Page 11: me: Marco Tarini • Consultinghours : • course web pagevcg.isti.cnr.it/~tarini/teaching/cg16/Lez01.Intro.pdf · – in the last ~ three dozens years ... Univ Insubria 2016/2017

Marco Tarini - Computer Graphics -Lez 1

Univ Insubria 2016/2017 11

Computer Graphics: applicazioni

• Entertainment: movie industry– CG shorts

Luxo Jr - Pixar 1986 Geri's Game - Pixar 1997

22M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 6 / 1 7 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a

Computer Graphics: applicazioni

• Entertainment: movie industry– CG shorts– Feature movies

Toy Story - Pixar 1995

Geri's Game - Pixar 1997

23M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 6 / 1 7 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a

Page 12: me: Marco Tarini • Consultinghours : • course web pagevcg.isti.cnr.it/~tarini/teaching/cg16/Lez01.Intro.pdf · – in the last ~ three dozens years ... Univ Insubria 2016/2017

Marco Tarini - Computer Graphics -Lez 1

Univ Insubria 2016/2017 12

Computer Graphics: applicazioni

• Entertainment: movie industry– Feature movies

fotorealistici

Final Fantasy – Squaresoft 2001

Final Flight Of the Osiris – Squaresoft 2003 Avatar – ILM 200924M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 6 / 1 7 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a

parentesi parentesi parentesi parentesi parentesi

parentesi parentesi parentesi parentesi parentesi

Uncanny valley

25

Page 13: me: Marco Tarini • Consultinghours : • course web pagevcg.isti.cnr.it/~tarini/teaching/cg16/Lez01.Intro.pdf · – in the last ~ three dozens years ... Univ Insubria 2016/2017

Marco Tarini - Computer Graphics -Lez 1

Univ Insubria 2016/2017 13

Computer Graphics: applicazioni

• Entertainment: giochi– forza trainante del settore (crederci o no) ...

Battlezone – Atari 1980Tailgunner - Cinematronics 197926

Computer Graphics: applicazioni

• Entertainment: giochi– forza trainante del settore (crederci o no) ...

Doom – IDsoft 1993

Virtua Fighter - Sega 1993 27

Page 14: me: Marco Tarini • Consultinghours : • course web pagevcg.isti.cnr.it/~tarini/teaching/cg16/Lez01.Intro.pdf · – in the last ~ three dozens years ... Univ Insubria 2016/2017

Marco Tarini - Computer Graphics -Lez 1

Univ Insubria 2016/2017 14

Computer Graphics: applicazioni

• Entertainment: giochi– forza trainante del settore (crederci o no) ...

Doom 3- ID soft 2004

World of Warcraft,

Blizzard Entertainment 2004 28

GTA -

Computer Graphics: applicazioni

• Entertainment: giochi

29World of Warcraft,

Blizzard Entertainment 2004vari

Page 15: me: Marco Tarini • Consultinghours : • course web pagevcg.isti.cnr.it/~tarini/teaching/cg16/Lez01.Intro.pdf · – in the last ~ three dozens years ... Univ Insubria 2016/2017

Marco Tarini - Computer Graphics -Lez 1

Univ Insubria 2016/2017 15

Computer Graphics: applicazioni

• Beni Culturali– Presentazione

• musei virtuali• cataloghi di musei reali• supporto alla didattica• documentaristica...

– Supporto al restauro• Modello 3D come GIS• Simulazioni...

– Studio• Analisi dei dati• vedi SciVis

30M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 6 / 1 7 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a

Beni Culturali• Uso:

– fruizione (musei virtuali..)– documentaristica– didattica – monitoraggio

• Mezzi:– acquisizione della forma ( 3DScanning )– acquisizione del colore– Tecniche di visualizzazione di grandi moli di dati (multiresolution, out of core rendering)

Visual Computing Lab – ISTI-CNR Pisa

31M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 6 / 1 7 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a

Page 16: me: Marco Tarini • Consultinghours : • course web pagevcg.isti.cnr.it/~tarini/teaching/cg16/Lez01.Intro.pdf · – in the last ~ three dozens years ... Univ Insubria 2016/2017

Marco Tarini - Computer Graphics -Lez 1

Univ Insubria 2016/2017 16

Beni Culturali: Fruizione

• Chioschi: supporti multimediali ai musei tradizionali– PC + video, l’utente esamina le opere, legge note informative – esempi: il Davide di Michelangelo alla Galleria dell’Accademia di Firenze– esempi: Il monumento funebre di Arrigo VII all’Arcivescovado

• Diffusione via rete– L’utente visita un museo (o una singola opera) dal PC di casa

32M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 6 / 1 7 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a

Beni Culturali: Fruizione

• Beni Culturali– musei virtuali– supporto multimediale musei tradizionali

33M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 6 / 1 7 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a

Page 17: me: Marco Tarini • Consultinghours : • course web pagevcg.isti.cnr.it/~tarini/teaching/cg16/Lez01.Intro.pdf · – in the last ~ three dozens years ... Univ Insubria 2016/2017

Marco Tarini - Computer Graphics -Lez 1

Univ Insubria 2016/2017 17

Computer Graphics: applicazioni

• Beni Culturali– presentazione in rete

34M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 6 / 1 7 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a

Beni Culturali: Restauro• Il restauratore si faceva fare degli schizzi su carta dell’opera da restaurare per fare una mappa

degli interventi: col il modello virtuale può gestire tutto su PC• Acquisizione dell’opera prima e dopo il restauro e confronto geometrico delle differenze

35M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 6 / 1 7 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a

Page 18: me: Marco Tarini • Consultinghours : • course web pagevcg.isti.cnr.it/~tarini/teaching/cg16/Lez01.Intro.pdf · – in the last ~ three dozens years ... Univ Insubria 2016/2017

Marco Tarini - Computer Graphics -Lez 1

Univ Insubria 2016/2017 18

Computer Graphics: applicazioni

• Beni Culturali– modello 3D come "GIS"

36M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 6 / 1 7 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a

Beni Culturali: Studio

• ES: Simulazione caduta contaminanti15 degrees5 degrees

37M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 6 / 1 7 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a

Page 19: me: Marco Tarini • Consultinghours : • course web pagevcg.isti.cnr.it/~tarini/teaching/cg16/Lez01.Intro.pdf · – in the last ~ three dozens years ... Univ Insubria 2016/2017

Marco Tarini - Computer Graphics -Lez 1

Univ Insubria 2016/2017 19

Beni Culturali: Monitoraggio

• es: monitorare nel tempo la variazioni sui materiali deformabili

foresta di Dunarobbahttp://www.forestafossile.it/public/new/

38M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 6 / 1 7 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a

Beni Culturali: i mezzi

oggetto reale Rappresentazione digitale

Strumento di acquisizione

processing

dei dati

• Acquisizione della forma geometrica (3D scanning)

39M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 6 / 1 7 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a

Page 20: me: Marco Tarini • Consultinghours : • course web pagevcg.isti.cnr.it/~tarini/teaching/cg16/Lez01.Intro.pdf · – in the last ~ three dozens years ... Univ Insubria 2016/2017

Marco Tarini - Computer Graphics -Lez 1

Univ Insubria 2016/2017 20

Beni Culturali: i mezzi

• Acquisizione della forma geometrica (es: 3D scanning)

Visual Computing Lab – Stanford Uni 2000

40M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 6 / 1 7 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a

Beni Culturali: i mezzi

• Acquisizione del colore– semplici fotografie

• approssimato, dipende dalla luce

– Tecniche di calcolo della BRDF

Ci torniamo sopra con calma

41M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 6 / 1 7 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a

Page 21: me: Marco Tarini • Consultinghours : • course web pagevcg.isti.cnr.it/~tarini/teaching/cg16/Lez01.Intro.pdf · – in the last ~ three dozens years ... Univ Insubria 2016/2017

Marco Tarini - Computer Graphics -Lez 1

Univ Insubria 2016/2017 21

Computer Graphics: applicazioni

• Cultural heritage– musei virtuali– supporto al restauro– supporto all’analisi– monitoring

• Medicina– supporto alla diagnosi– telechirurgia– simulazioni

• Architetturali– Supporto al design– Previews

• …

• Videogiochi

• Cinematografia– Visual effects

– Film di animazione

• Scientific Visualization

• Manufacturing industry– e.g. Computer Aided Design

• Telecommunications

– Personalized Avatars

– E–commerce

• Virtual Reality

– e augmented reality

Computer Graphics: applicazioni

• Architettura:– supporto al design

ArchiCAD (Graphsoft)

43M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 6 / 1 7 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a

Page 22: me: Marco Tarini • Consultinghours : • course web pagevcg.isti.cnr.it/~tarini/teaching/cg16/Lez01.Intro.pdf · – in the last ~ three dozens years ... Univ Insubria 2016/2017

Marco Tarini - Computer Graphics -Lez 1

Univ Insubria 2016/2017 22

Computer Graphics: applicazioni

• Architettura:– preview:

• comunicazione• assessment

Brazil – SputterFish 44M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 6 / 1 7 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a

Summary

• Grafica Computazionale(Computer Graphics - CG ):– molteplici applicazioni

– medicali– industriali– beni culturali– militari �– telecomunicazioni– commerciali– ricerca scientifica (scivis)– intrattenimento: games– intrattenimento: movies– e altro (realta' virtuale....)

45M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 6 / 1 7 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a

Page 23: me: Marco Tarini • Consultinghours : • course web pagevcg.isti.cnr.it/~tarini/teaching/cg16/Lez01.Intro.pdf · – in the last ~ three dozens years ... Univ Insubria 2016/2017

Marco Tarini - Computer Graphics -Lez 1

Univ Insubria 2016/2017 23

Computer Graphics interattiva: schema ricorrente

applicazione interattiva

informazionemodellazione

rappresentazioneadeguata

(per...)

Immagine/i

rendering/visualizzazione

preprocessing

modelling

46M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 6 / 1 7 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a

esempio: acquisizione 3D per beni culturali

chiosco museale

Statua reale Range scanning(scansione laser)

Mesh poligonale 3D

Immagine/i

rendering

Semplificazione,flitering…

47M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 6 / 1 7 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a

Page 24: me: Marco Tarini • Consultinghours : • course web pagevcg.isti.cnr.it/~tarini/teaching/cg16/Lez01.Intro.pdf · – in the last ~ three dozens years ... Univ Insubria 2016/2017

Marco Tarini - Computer Graphics -Lez 1

Univ Insubria 2016/2017 24

esempio: games

videogame

Artista(conent creator) modellazione manuale

(e.g. 3Dstudio max, Maya, Blender…)

Mesh low-poly+ textures

Immagine/i

rendering/visualizzazione

semplificazione,u-v mapping,rigging…

48M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 6 / 1 7 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a

esempio: sci-vis analisi di un terremoto

applicaz interattiva

Modellomatematico

del terremoto Simulazione fisica

Campo di altezza(time-varying)

Immagine/i

rendering/visualizzazione

processing vari…(es color-coding)

49M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 6 / 1 7 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a

Page 25: me: Marco Tarini • Consultinghours : • course web pagevcg.isti.cnr.it/~tarini/teaching/cg16/Lez01.Intro.pdf · – in the last ~ three dozens years ... Univ Insubria 2016/2017

Marco Tarini - Computer Graphics -Lez 1

Univ Insubria 2016/2017 25

Rendering

• A very general term

Something Imagerendering

50M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 6 / 1 7 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a

Rendering

• Example: in web browsers

the image appearing inthe browser

rendering

...

HTML page + images, ccs, etc(which models a Web Page)

51M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 6 / 1 7 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a

Page 26: me: Marco Tarini • Consultinghours : • course web pagevcg.isti.cnr.it/~tarini/teaching/cg16/Lez01.Intro.pdf · – in the last ~ three dozens years ... Univ Insubria 2016/2017

Marco Tarini - Computer Graphics -Lez 1

Univ Insubria 2016/2017 26

Rendering

• In our case

3D Scene Image3D renderingultimately,composed by a set of primitives

52M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 6 / 1 7 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a

rasterized:a 2D grid ofpixels

Rendering

• Rendering 3D

ImmagineScena 3D

...

3D model• 3D point• primitives...

53M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 6 / 1 7 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a

3D rendering

Page 27: me: Marco Tarini • Consultinghours : • course web pagevcg.isti.cnr.it/~tarini/teaching/cg16/Lez01.Intro.pdf · – in the last ~ three dozens years ... Univ Insubria 2016/2017

Marco Tarini - Computer Graphics -Lez 1

Univ Insubria 2016/2017 27

Algoritmi di Rendering

• Due tipi:– On-Line Rendering

• Interattivo: circa 1 – 10 frames per sec ("fps")• Real-Time: circa 10-100 fps

– Off-line Rendering• Tipicamente: da minuti ad ore per fotogramma

• Molto differenti:– nelle applicazioni– nei vincoli– nella qualità visiva raggiunta (e.g. fotorealismo)– negli algoritmi e SD usateinsomma: approcci diversi, mondi diversi.

54M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 6 / 1 7 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a

Real Time VS Offline rendering

• Distanza si accorcia

Jurassic Park - Universal Studios 1993

real time

1993

Virtua Fighter - Sega 1993

Jurassic Park - Universal Studios 1993

offline

55M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 6 / 1 7 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a

Page 28: me: Marco Tarini • Consultinghours : • course web pagevcg.isti.cnr.it/~tarini/teaching/cg16/Lez01.Intro.pdf · – in the last ~ three dozens years ... Univ Insubria 2016/2017

Marco Tarini - Computer Graphics -Lez 1

Univ Insubria 2016/2017 28

Real Time VS Offline rendering

• Distanza si accorcia

Jurassic Park - Universal Studios 1993

Final Fintasy – Squaresoft 2001

nVIDIA tech demo at SIGGRAPH 2001

nVIDIA quadro

2001

real time offline

56M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 6 / 1 7 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a

Real Time VS Offline rendering

• Distanza si accorcia

Jurassic Park - Universal Studios 1993

2007

GPUGems III, d'Eon & Luebke (NVidia), 2007

real time offline

Spiederman 3– Squaresoft 2007

57M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 6 / 1 7 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a

Page 29: me: Marco Tarini • Consultinghours : • course web pagevcg.isti.cnr.it/~tarini/teaching/cg16/Lez01.Intro.pdf · – in the last ~ three dozens years ... Univ Insubria 2016/2017

Marco Tarini - Computer Graphics -Lez 1

Univ Insubria 2016/2017 29

Rendering

• Rendering 3D

Scena 3D rendering Immagine

58M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 6 / 1 7 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a

Immagine: su che display hardware?

• Su un monitor, naturalmente!• Il tubo catodico: un fascio di elettroni viene diretto su

una superficie coperta di materiale fosforescente– Display vettoriali:

il fascio veniva pilotato direttamente in maniera totalmente libera

– Display CRT: raster linea per linea,si spazza tutto lo schermo un certo numero di volte al secondo (refresh rate)

59M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 6 / 1 7 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a

Page 30: me: Marco Tarini • Consultinghours : • course web pagevcg.isti.cnr.it/~tarini/teaching/cg16/Lez01.Intro.pdf · – in the last ~ three dozens years ... Univ Insubria 2016/2017

Marco Tarini - Computer Graphics -Lez 1

Univ Insubria 2016/2017 30

Immagine: su che display hardware?

M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 6 / 1 7 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a 60

1980 (Asteroids – Atari )

1984 (Bomb jack – Tehkan)

Display vettoriali

Display CRT

Frame buffer

• Una porzione di memoriadedicata alla memorizzazionedell’immagine – come array 2D di pixel da mostrare a video.

• Caratteristiche:– Risoluzione (numero di pixel)

• Range tipici 320x200 .. 1600x1200– Profondità (bit per pixel)

• Range tipici 1 .. 32 (128)• Divisi in tipicamente 4 (o 3) canali ( R, G, B e Alpha)

61M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 6 / 1 7 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a

Page 31: me: Marco Tarini • Consultinghours : • course web pagevcg.isti.cnr.it/~tarini/teaching/cg16/Lez01.Intro.pdf · – in the last ~ three dozens years ... Univ Insubria 2016/2017

Marco Tarini - Computer Graphics -Lez 1

Univ Insubria 2016/2017 31

Rendering…

• Ci occuperemo principalmente di: Real Time 3D Rendering

Scena 3D rendering Immagine

screen buffer( array 2D di pixel )

N volte al sec( es N=60 )

dal resto dell' applicazione

62M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 6 / 1 7 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a

Real Time 3D Rendering

Problema challanging! per esempio:

• pixel = 32 bit = 4 bytes ("pixel depth")

• screen buffer = 1024 x 768 pixels ("screen resolution")

• frame rate = 60 Hrz ("fps")

188 MegaBytes / sec(in questo esempio)

• total = 4 x 1024 x 768 x 60 byte al sec ("fill-rate", in bytes)

(e mancano altri fattori moltiplicativi, come depth complexity, multipassate… vedremo)63M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 6 / 1 7 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a

Page 32: me: Marco Tarini • Consultinghours : • course web pagevcg.isti.cnr.it/~tarini/teaching/cg16/Lez01.Intro.pdf · – in the last ~ three dozens years ... Univ Insubria 2016/2017

Marco Tarini - Computer Graphics -Lez 1

Univ Insubria 2016/2017 32

Real Time 3D Rendering

• Fill-rates molto elevati – Anticipazione:

...e il fill-rate non è sempre il collo di bottiglia– Anticipazione 2:

...e questa è una sottostima del fill-rate. • manca il fattore depth-complexity ~ x2.5 (come vedremo...)

• sono piu' di 32 bit x pixel

• C'è bisogno di muscoli potenza di calcolo

~

64M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 6 / 1 7 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a

Real Time 3D Rendering

• Problema difficile – fortunatamente,

processo massicciamente parallelizzabile– "embarrassingly parallel"

• Ingrediente base della soluzione: hardware specializzato

65M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 6 / 1 7 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a

Page 33: me: Marco Tarini • Consultinghours : • course web pagevcg.isti.cnr.it/~tarini/teaching/cg16/Lez01.Intro.pdf · – in the last ~ three dozens years ... Univ Insubria 2016/2017

Marco Tarini - Computer Graphics -Lez 1

Univ Insubria 2016/2017 33

dunque, questo corso si occupa sopratto di...

Real-Time Hardware-Based

3D Rendering

66M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 6 / 1 7 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a

Ci occuperemo poco (o nulla) di altri aspetti della CG: sono solo 6 CFU � !• Altri paradigmi di rendering

– es. offline rendering, radiosity, global illumination, raytracing…• Data representation

– es. volumetric data, polygonal meshes, NURBS, splines, subdivision surfaces, LODs, multiresolution structures…

• 3D acquisition (catturare modelli 3D dalla realtà)– es. “shape from shading (silhouettes)”, range scanning,

BRDF acquisition…• Modellazione di superfici

– es. surface simplification, filtering, denoising, parametrization…• Image-based rendering + modelling

– es. light fields, mixed representations, • Applicazioni specifiche della CG

– es. scientific or data visualization, beni culturali, games• Animation techniques

– es. keyframing, cinematica diretta /inversa, skeletal animations, rigging…• GP-GPU, o CUDA, o OpenCL

67M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 6 / 1 7 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a

Page 34: me: Marco Tarini • Consultinghours : • course web pagevcg.isti.cnr.it/~tarini/teaching/cg16/Lez01.Intro.pdf · – in the last ~ three dozens years ... Univ Insubria 2016/2017

Marco Tarini - Computer Graphics -Lez 1

Univ Insubria 2016/2017 34

Text books

M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 6 / 1 7 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a 68

Text books

• Fondamenti di Grafica tridimensionale interattivaScateni, Cignoni, Montani, ScopignoMcGraw Hill Companies– non aggiornato ma… in italiano

• Real-Time Rendering (2nd Edition)Tomas Moller & Eric Haines– un manuale che comprende molto di quello che facciamo nel corso,

…e molto altro

• Vector Math for 3D Computer Graphics– un compendio di alcune nozioni base di matematica– disponibile in rete, con tutorials (google for it)

• Altre risorse: wikipedia, tutorials OpenGL / WebGL online

M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 6 / 1 7 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a 69