Top Banner
1 1 2 3 4 P P P
13

PowerPoint Presentation · 2017. 10. 27. · 12 45 uniform 46 n s [0, 100] k a + k d + k s < 1 k a (~0.1) n s k d k s Metal large Small, color color of metal Large, color color of

Jan 27, 2021

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
  • 1

    1 2

    3 4

    P

    P

    P

  • 2

    5

    6

    7

    8

    P

    N P

    L ILP

    V P

    P

    I p

    N = L = V =1

  • 3

    9

    I

    ke

    I = ke

    10

    ka

    ILa

    I = ke+ k

    aI

    La

    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

    12

  • 4

    13 14

    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

    ìíï

    îï

    16

    V

  • 5

    17

    N

    I =I

    Lif V = R

    0 otherwise

    ìíï

    îï

    18

    R V

    ns

    (x)+ max(0, x).

    ns

    Ispecular

    ~ B(R × V)+

    ns

    19

    L V

    N H

    (x)+ max(0, x).

    Ispecular

    ~ B(N ×H)+

    ns

    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é

    ëêùûú

  • 6

    21 22

    a b c

    fatten

    =1

    a +br + cr2

    fatten

    =1

    r2

    23

    L

    S

    a L S

    b

    e

    fspot

    =L ×S( )

    e

    a + br + cr2a £ b

    0 otherwise

    ì

    íïï

    îïï

    24

    ka kd

    I = ke+ k

    aI

    La, j+

    Lj×S

    j( )b je j

    aj+ b

    jr

    j+ c

    jr

    j

    2I

    L, jB

    jk

    dN ×L

    j( )+ ks N ×H j( )+n

    ëêù

    ûúj

    å

  • 7

    25

    Pij

    C Pij

    26

    27 28

  • 8

    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

    30

    z

    31 32

  • 9

    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);

    }

    34

    #version 400

    in vec3 color;

    out vec4 frag_color;

    void main() {

    frag_color = color;

    }

    35

    uniform

    in

    out

    in out

    out

    36

  • 10

    37 38

    39 40

  • 11

    41 42

    43

    →vi1,vi

    2,vi3

    vi ← v

    out cblinn-phongout vi

    c

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

    d,k

    s,n

    s

    color ¬ cblinn-phong

    p

    44

    vi ← vout neout veout vi

    →vi

    1,vi

    2 ,vi

    3

  • 12

    45

    uniform

    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

    47

    N L

    fr w

    w

    win

    fr (win ,wout ) or fr (win ®wout )

    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)

    48

  • 13

    49

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

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

    50

    51