PowerPoint Presentation › ... › shading-1pp.pdf · PowerPoint Presentation Author: Brian...

51
1

Transcript of PowerPoint Presentation › ... › shading-1pp.pdf · PowerPoint Presentation Author: Brian...

Page 1: PowerPoint Presentation › ... › shading-1pp.pdf · PowerPoint Presentation Author: Brian Curless Created Date: 10/26/2017 4:56:19 PM ...

1

Page 2: PowerPoint Presentation › ... › shading-1pp.pdf · PowerPoint Presentation Author: Brian Curless Created Date: 10/26/2017 4:56:19 PM ...

2

Page 3: PowerPoint Presentation › ... › shading-1pp.pdf · PowerPoint Presentation Author: Brian Curless Created Date: 10/26/2017 4:56:19 PM ...

3

Page 4: PowerPoint Presentation › ... › shading-1pp.pdf · PowerPoint Presentation Author: Brian Curless Created Date: 10/26/2017 4:56:19 PM ...

4

P

P

P

Page 5: PowerPoint Presentation › ... › shading-1pp.pdf · PowerPoint Presentation Author: Brian Curless Created Date: 10/26/2017 4:56:19 PM ...

5

Page 6: PowerPoint Presentation › ... › shading-1pp.pdf · PowerPoint Presentation Author: Brian Curless Created Date: 10/26/2017 4:56:19 PM ...

6

Page 7: PowerPoint Presentation › ... › shading-1pp.pdf · PowerPoint Presentation Author: Brian Curless Created Date: 10/26/2017 4:56:19 PM ...

7

Page 8: PowerPoint Presentation › ... › shading-1pp.pdf · PowerPoint Presentation Author: Brian Curless Created Date: 10/26/2017 4:56:19 PM ...

8

P

N P

L IL

P

V P

P

I p

N = L = V =1

Page 9: PowerPoint Presentation › ... › shading-1pp.pdf · PowerPoint Presentation Author: Brian Curless Created Date: 10/26/2017 4:56:19 PM ...

9

I

ke

I = ke

Page 10: PowerPoint Presentation › ... › shading-1pp.pdf · PowerPoint Presentation Author: Brian Curless Created Date: 10/26/2017 4:56:19 PM ...

10

ka

ILa

I = ke+ k

aI

La

Page 11: PowerPoint Presentation › ... › shading-1pp.pdf · PowerPoint Presentation Author: Brian Curless Created Date: 10/26/2017 4:56:19 PM ...

11

ke ka ILa

I()

ka ILa

I(l) = ka(l)I

La(l)

I R = ka

R ILa

R

I G = ka

G ILa

G

I B = ka

B ILa

B

Page 12: PowerPoint Presentation › ... › shading-1pp.pdf · PowerPoint Presentation Author: Brian Curless Created Date: 10/26/2017 4:56:19 PM ...

12

Page 13: PowerPoint Presentation › ... › shading-1pp.pdf · PowerPoint Presentation Author: Brian Curless Created Date: 10/26/2017 4:56:19 PM ...

13

Page 14: PowerPoint Presentation › ... › shading-1pp.pdf · PowerPoint Presentation Author: Brian Curless Created Date: 10/26/2017 4:56:19 PM ...

14

Page 15: PowerPoint Presentation › ... › shading-1pp.pdf · PowerPoint Presentation Author: Brian Curless Created Date: 10/26/2017 4:56:19 PM ...

15

kd

IL

N

L

B

I = ke+ k

aI

La+ k

dI

LB _____

= ke+ k

aI

La+ k

dI

LB( )

B =1 if N × L > 0

0 if N × L £ 0

ìíï

îï

Page 16: PowerPoint Presentation › ... › shading-1pp.pdf · PowerPoint Presentation Author: Brian Curless Created Date: 10/26/2017 4:56:19 PM ...

16

V

Page 17: PowerPoint Presentation › ... › shading-1pp.pdf · PowerPoint Presentation Author: Brian Curless Created Date: 10/26/2017 4:56:19 PM ...

17

N

I =I

Lif V = R

0 otherwise

ìíï

îï

Page 18: PowerPoint Presentation › ... › shading-1pp.pdf · PowerPoint Presentation Author: Brian Curless Created Date: 10/26/2017 4:56:19 PM ...

18

R V

ns

(x)+ max(0, x).

ns

Ispecular

~ B(R × V)+

ns

Page 19: PowerPoint Presentation › ... › shading-1pp.pdf · PowerPoint Presentation Author: Brian Curless Created Date: 10/26/2017 4:56:19 PM ...

19

L V

N H

(x)+ max(0, x).

Ispecular

~ B(N ×H)+

ns

Page 20: PowerPoint Presentation › ... › shading-1pp.pdf · PowerPoint Presentation Author: Brian Curless Created Date: 10/26/2017 4:56:19 PM ...

20

ks

ns

H L V

V

I = ke+ k

aI

La+ k

dI

LB(N ×L) + k

sI

LB(N ×H)

+

ns

= ke+ k

aI

La+ I

LB k

d(N ×L)+ k

s(N ×H)

+

nsé

ëêùûú

Page 21: PowerPoint Presentation › ... › shading-1pp.pdf · PowerPoint Presentation Author: Brian Curless Created Date: 10/26/2017 4:56:19 PM ...

21

Page 22: PowerPoint Presentation › ... › shading-1pp.pdf · PowerPoint Presentation Author: Brian Curless Created Date: 10/26/2017 4:56:19 PM ...

22

a b c

fatten

=1

a +br + cr2

fatten

=1

r2

Page 23: PowerPoint Presentation › ... › shading-1pp.pdf · PowerPoint Presentation Author: Brian Curless Created Date: 10/26/2017 4:56:19 PM ...

23

L

S

a L S

b

e

fspot

=L ×S( )

e

a + br + cr2a £ b

0 otherwise

ì

íïï

îïï

Page 24: PowerPoint Presentation › ... › shading-1pp.pdf · PowerPoint Presentation Author: Brian Curless Created Date: 10/26/2017 4:56:19 PM ...

24

ka kd

I = ke+ k

aI

La, j+

Lj×S

j( )b j

e j

aj+ b

jr

j+ c

jr

j

2I

L, jB

jk

dN ×L

j( )+ ks

N ×Hj( )

+

nsé

ëêù

ûúj

å

Page 25: PowerPoint Presentation › ... › shading-1pp.pdf · PowerPoint Presentation Author: Brian Curless Created Date: 10/26/2017 4:56:19 PM ...

25

Pij

C Pij

Page 26: PowerPoint Presentation › ... › shading-1pp.pdf · PowerPoint Presentation Author: Brian Curless Created Date: 10/26/2017 4:56:19 PM ...

26

Page 27: PowerPoint Presentation › ... › shading-1pp.pdf · PowerPoint Presentation Author: Brian Curless Created Date: 10/26/2017 4:56:19 PM ...

27

Page 28: PowerPoint Presentation › ... › shading-1pp.pdf · PowerPoint Presentation Author: Brian Curless Created Date: 10/26/2017 4:56:19 PM ...

28

Page 29: PowerPoint Presentation › ... › shading-1pp.pdf · PowerPoint Presentation Author: Brian Curless Created Date: 10/26/2017 4:56:19 PM ...

29

zz

i, j

i, j

i, j

A

i, j A

z A i, j

A i, j

z i, j

i, j z

i, j

Page 30: PowerPoint Presentation › ... › shading-1pp.pdf · PowerPoint Presentation Author: Brian Curless Created Date: 10/26/2017 4:56:19 PM ...

30

z

Page 31: PowerPoint Presentation › ... › shading-1pp.pdf · PowerPoint Presentation Author: Brian Curless Created Date: 10/26/2017 4:56:19 PM ...

31

Page 32: PowerPoint Presentation › ... › shading-1pp.pdf · PowerPoint Presentation Author: Brian Curless Created Date: 10/26/2017 4:56:19 PM ...

32

Page 33: PowerPoint Presentation › ... › shading-1pp.pdf · PowerPoint Presentation Author: Brian Curless Created Date: 10/26/2017 4:56:19 PM ...

33

#version 400

in vec3 position;

in vec3 vertex_color;

out vec3 color;

uniform mat4 modelview;

uniform mat4 projection;

void main() {

color = vertex_color;

gl_Position = projection * modelview * vec4(position, 1.0);

// color = vec3(1.0, 0.0, 0.0);

// gl_Position = vec4(1.0, -1.0, 0.0, -1.0);

}

Page 34: PowerPoint Presentation › ... › shading-1pp.pdf · PowerPoint Presentation Author: Brian Curless Created Date: 10/26/2017 4:56:19 PM ...

34

#version 400

in vec3 color;

out vec4 frag_color;

void main() {

frag_color = color;

}

Page 35: PowerPoint Presentation › ... › shading-1pp.pdf · PowerPoint Presentation Author: Brian Curless Created Date: 10/26/2017 4:56:19 PM ...

35

uniform

in

out

in out

out

Page 36: PowerPoint Presentation › ... › shading-1pp.pdf · PowerPoint Presentation Author: Brian Curless Created Date: 10/26/2017 4:56:19 PM ...

36

Page 37: PowerPoint Presentation › ... › shading-1pp.pdf · PowerPoint Presentation Author: Brian Curless Created Date: 10/26/2017 4:56:19 PM ...

37

Page 38: PowerPoint Presentation › ... › shading-1pp.pdf · PowerPoint Presentation Author: Brian Curless Created Date: 10/26/2017 4:56:19 PM ...

38

Page 39: PowerPoint Presentation › ... › shading-1pp.pdf · PowerPoint Presentation Author: Brian Curless Created Date: 10/26/2017 4:56:19 PM ...

39

Page 40: PowerPoint Presentation › ... › shading-1pp.pdf · PowerPoint Presentation Author: Brian Curless Created Date: 10/26/2017 4:56:19 PM ...

40

Page 41: PowerPoint Presentation › ... › shading-1pp.pdf · PowerPoint Presentation Author: Brian Curless Created Date: 10/26/2017 4:56:19 PM ...

41

Page 42: PowerPoint Presentation › ... › shading-1pp.pdf · PowerPoint Presentation Author: Brian Curless Created Date: 10/26/2017 4:56:19 PM ...

42

Page 43: PowerPoint Presentation › ... › shading-1pp.pdf · PowerPoint Presentation Author: Brian Curless Created Date: 10/26/2017 4:56:19 PM ...

43

→vi1,vi

2,vi3

vi ← v

out cblinn-phong

out vi

c

blinn-phong¬ shade with L,V,N,k

d,k

s,n

s

color ¬ cblinn-phong

p

Page 44: PowerPoint Presentation › ... › shading-1pp.pdf · PowerPoint Presentation Author: Brian Curless Created Date: 10/26/2017 4:56:19 PM ...

44

vi ← v

out neout veout vi

→vi

1,vi

2 ,vi

3

Page 45: PowerPoint Presentation › ... › shading-1pp.pdf · PowerPoint Presentation Author: Brian Curless Created Date: 10/26/2017 4:56:19 PM ...

45

uniform

Page 46: PowerPoint Presentation › ... › shading-1pp.pdf · PowerPoint Presentation Author: Brian Curless Created Date: 10/26/2017 4:56:19 PM ...

46

ns [0, 100]

ka + kd + ks < 1

ka (~0.1)

ns kd ks

Metal large

Small, color

color of

metal

Large, color

color of

metal

Plastic medium

Medium,

color of

plastic

Medium,

white

Planet 0 varying 0

Page 47: PowerPoint Presentation › ... › shading-1pp.pdf · PowerPoint Presentation Author: Brian Curless Created Date: 10/26/2017 4:56:19 PM ...

47

N L

fr w

w

win

fr (win

,wout

) or fr (win®w

out)

fr (win

,wout

)

win

I = ILB k

d(N ×L)+ k

s(N ×L) N ×

L + V

L + V

æ

è

çç

ö

ø

÷÷

+

nsé

ë

êê

ù

û

úú

= ILB(N ×L) k

d+ k

sN ×

L + V

L + V

æ

è

çç

ö

ø

÷÷

+

nsé

ë

êê

ù

û

úú

= ILB(N ×L) f

r(L,V)

Page 48: PowerPoint Presentation › ... › shading-1pp.pdf · PowerPoint Presentation Author: Brian Curless Created Date: 10/26/2017 4:56:19 PM ...

48

Page 49: PowerPoint Presentation › ... › shading-1pp.pdf · PowerPoint Presentation Author: Brian Curless Created Date: 10/26/2017 4:56:19 PM ...

49

Wool cloth and silk cloth [Irawan and Marschner, 2012]

Hair illuminated from different angles [Marschner et al., 2003]

Page 50: PowerPoint Presentation › ... › shading-1pp.pdf · PowerPoint Presentation Author: Brian Curless Created Date: 10/26/2017 4:56:19 PM ...

50

Page 51: PowerPoint Presentation › ... › shading-1pp.pdf · PowerPoint Presentation Author: Brian Curless Created Date: 10/26/2017 4:56:19 PM ...

51