35
Rendering Rendering Problem Problem László Szirmay-Kalos

Rendering Problem László Szirmay-Kalos. Image synthesis: illusion of watching real world objects Le(x,)Le(x,) pixel f r ( ’, x, ) S We(x,)We(x,)

Embed Size (px)

Citation preview

Page 1: Rendering Problem László Szirmay-Kalos. Image synthesis: illusion of watching real world objects Le(x,)Le(x,) pixel f r (  ’, x,  ) S We(x,)We(x,)

RenderingRendering ProblemProblem

László Szirmay-Kalos

Page 2: Rendering Problem László Szirmay-Kalos. Image synthesis: illusion of watching real world objects Le(x,)Le(x,) pixel f r (  ’, x,  ) S We(x,)We(x,)

Image synthesis: illusion of Image synthesis: illusion of watching real world objectswatching real world objects

Le(x,)

pixel

fr (’, x, ) S

We(x,)

monitor

Color perception

Tone mapping

Page 3: Rendering Problem László Szirmay-Kalos. Image synthesis: illusion of watching real world objects Le(x,)Le(x,) pixel f r (  ’, x,  ) S We(x,)We(x,)

Measuring the light: FluxMeasuring the light: Flux

Power going through a boundary [Watt] Number of photons

Spectral dependence: d

Page 4: Rendering Problem László Szirmay-Kalos. Image synthesis: illusion of watching real world objects Le(x,)Le(x,) pixel f r (  ’, x,  ) S We(x,)We(x,)

Color perceptionColor perception

perception: r, g, b

400 700500 600

r(g(b(

r, g, b

Page 5: Rendering Problem László Szirmay-Kalos. Image synthesis: illusion of watching real world objects Le(x,)Le(x,) pixel f r (  ’, x,  ) S We(x,)We(x,)

Perception of Perception of non-monochromatic lightnon-monochromatic light

r = r d ir i i

g = g d b = b d

Page 6: Rendering Problem László Szirmay-Kalos. Image synthesis: illusion of watching real world objects Le(x,)Le(x,) pixel f r (  ’, x,  ) S We(x,)We(x,)

Representative wavelengthsRepresentative wavelengths

r = r d ir i i

r = T eir i i

e

Light propagation:Linear functional:

= T e

Page 7: Rendering Problem László Szirmay-Kalos. Image synthesis: illusion of watching real world objects Le(x,)Le(x,) pixel f r (  ’, x,  ) S We(x,)We(x,)

Measuring the directions: 2DMeasuring the directions: 2D

2D caseDirection:

angle from a reference direction

Directional set:angle [rad] arc of a unit circle

Size: length of the arcTotal size: 2

Page 8: Rendering Problem László Szirmay-Kalos. Image synthesis: illusion of watching real world objects Le(x,)Le(x,) pixel f r (  ’, x,  ) S We(x,)We(x,)

Measuring the directions: 3DMeasuring the directions: 3D

Direction:angles , from two reference directions

Directional set: solid angle [sr] area of a unit sphere

Size: size of the areaTotal size: 4

Page 9: Rendering Problem László Szirmay-Kalos. Image synthesis: illusion of watching real world objects Le(x,)Le(x,) pixel f r (  ’, x,  ) S We(x,)We(x,)

Size of a solid angleSize of a solid angle

d

d

d

sin ddsin d d

Page 10: Rendering Problem László Szirmay-Kalos. Image synthesis: illusion of watching real world objects Le(x,)Le(x,) pixel f r (  ’, x,  ) S We(x,)We(x,)

Solid angle in which a surface Solid angle in which a surface element is visibleelement is visible

dA

d

r

d dA cos r2

Page 11: Rendering Problem László Szirmay-Kalos. Image synthesis: illusion of watching real world objects Le(x,)Le(x,) pixel f r (  ’, x,  ) S We(x,)We(x,)

Radiance: Radiance: LL(x,(x,)) Emitted power of a unit visible area in a

unit solid angle [Watt/ sr/ m2]

d

dA

d

L(x,) = ddA cos d

Page 12: Rendering Problem László Szirmay-Kalos. Image synthesis: illusion of watching real world objects Le(x,)Le(x,) pixel f r (  ’, x,  ) S We(x,)We(x,)

Light propagation between Light propagation between two infinitesimal surfaces: two infinitesimal surfaces:

Fundamental law of photometryFundamental law of photometry

d

dA

d

dA’

’r

dL dA cos dL dA cos dA’ cos ’

r2

L

emitter receiver

Page 13: Rendering Problem László Szirmay-Kalos. Image synthesis: illusion of watching real world objects Le(x,)Le(x,) pixel f r (  ’, x,  ) S We(x,)We(x,)

Symmetry relation of the Symmetry relation of the source and receiversource and receiver

d

dA

d’dA’

’r

dL dA cos dA’ cos ’

r2=L dA’ cos ’ d’

d’

emitter receiver

Page 14: Rendering Problem László Szirmay-Kalos. Image synthesis: illusion of watching real world objects Le(x,)Le(x,) pixel f r (  ’, x,  ) S We(x,)We(x,)

Light-surface interactionLight-surface interaction

x

d

w(’,x,) d = Pr{photon goes to d | comes from ’}

Probability density of the reflection

Page 15: Rendering Problem László Szirmay-Kalos. Image synthesis: illusion of watching real world objects Le(x,)Le(x,) pixel f r (  ’, x,  ) S We(x,)We(x,)

Reflection of the total Reflection of the total incoming lightincoming light

x

d

’d’

ref (d) = e (d) + in (d’) w(’,x,) d

in (d’) ref (d)

Page 16: Rendering Problem László Szirmay-Kalos. Image synthesis: illusion of watching real world objects Le(x,)Le(x,) pixel f r (  ’, x,  ) S We(x,)We(x,)

Rewriting for the radianceRewriting for the radianceref (d) = L dA cos de(d) = Le dA cos din(d’) = Lin dA cos ’ d’

Visibility functionh(x,-

L(x,)

x

’Lin =L(h(x,-’,’)

Page 17: Rendering Problem László Szirmay-Kalos. Image synthesis: illusion of watching real world objects Le(x,)Le(x,) pixel f r (  ’, x,  ) S We(x,)We(x,)

Substituting and dividing bySubstituting and dividing by dAdA cos cos dd

L(x,)=Le(x,)+L(h(x,-’,’) cos ’d’

= fr (’,x,)

x

w(’,x,) cos

w(’,x,) cos

Bidirectional Reflectance Distribution FunctionBRDF: fr (’,x,) [1/sr]

Page 18: Rendering Problem László Szirmay-Kalos. Image synthesis: illusion of watching real world objects Le(x,)Le(x,) pixel f r (  ’, x,  ) S We(x,)We(x,)

Rendering equationRendering equation

L(x,)=Le(x,)+L(h(x,-’,’) fr(’,x,) cos’d’

L = Le + L

fr (’,x,)

h(x,-L(x,)

x

L(h(x,-,)

Page 19: Rendering Problem László Szirmay-Kalos. Image synthesis: illusion of watching real world objects Le(x,)Le(x,) pixel f r (  ’, x,  ) S We(x,)We(x,)

Rendering equationRendering equation

Fredholm integral equation of the second kind

Unknown is a function Function space: Hilbert space, L2 space

– scalar product:

L = Le + L

<u(x,),v(x,)> = Su(x,) v(x,) cos ddx

Page 20: Rendering Problem László Szirmay-Kalos. Image synthesis: illusion of watching real world objects Le(x,)Le(x,) pixel f r (  ’, x,  ) S We(x,)We(x,)

Function spaceFunction space

Linear space (vector space)– addition, zero, multiplication by scalars

Space with norms

– ||u||2 = <u,u >, ||u||1 = <|u|,1>,

– ||u|| = max|u|, Hilbert space: scalar product: L2 space: finite square integrals

Page 21: Rendering Problem László Szirmay-Kalos. Image synthesis: illusion of watching real world objects Le(x,)Le(x,) pixel f r (  ’, x,  ) S We(x,)We(x,)

Measuring the light: radianceMeasuring the light: radiance Sensitivity of a measuring device: We(y,’)

L(y,’)

We(y,’): effect of a light beam of unit power emitted at y in direction ’

Light beam reaches the device: 0/1 „probability”

Scaling factor

Page 22: Rendering Problem László Szirmay-Kalos. Image synthesis: illusion of watching real world objects Le(x,)Le(x,) pixel f r (  ’, x,  ) S We(x,)We(x,)

Measured valuesMeasured values

Single beam :(d’) We(y,’) = L(y,’)cos dA d’ We(y,’)

Total measured value:SWe(y,’)d SL(y,’)We(y,’) cos d’dy = < L, We > = M L

Page 23: Rendering Problem László Szirmay-Kalos. Image synthesis: illusion of watching real world objects Le(x,)Le(x,) pixel f r (  ’, x,  ) S We(x,)We(x,)

Simple eye modelSimple eye model

r

p

y’

’y

Pupil: ep

Pupil: e

Real worldComputerscreen

pixelLp

Lp=e cosep

We(y,’)=C=e cosep if y is visible in p and ’ points from y to e0 otherwise

Page 24: Rendering Problem László Szirmay-Kalos. Image synthesis: illusion of watching real world objects Le(x,)Le(x,) pixel f r (  ’, x,  ) S We(x,)We(x,)

Simple eye model: pinhole Simple eye model: pinhole cameracamera

Lp M L =SL(y,’)We(y,’) cos d’dy

y L(y, ’) C · cos · ’ · dy =

p L(h(eye, p ),-p) C · cos · e cose /r2 · r2dp/cos =

p L(h(eye, p ),-p) · Ce cose dp

r

p

y’

’y

Pupil: e d’= de cos e /r2

dy= r2dp / cos

Pinhole camera: e, ’ 0

Camera constant: p Proportional to the radiance!

Page 25: Rendering Problem László Szirmay-Kalos. Image synthesis: illusion of watching real world objects Le(x,)Le(x,) pixel f r (  ’, x,  ) S We(x,)We(x,)

Why radianceWhy radiance

The color of a pixel is proportional to the radiance of the visiblepoints and is independent of the distance and the orientationof the surface!!

Lp = pL(h(eye, p ),-p) /p dp

r

pixel=L A cos d/r2

A r2 / cos

Page 26: Rendering Problem László Szirmay-Kalos. Image synthesis: illusion of watching real world objects Le(x,)Le(x,) pixel f r (  ’, x,  ) S We(x,)We(x,)

Integrating on the pixelIntegrating on the pixel

f

pixel

p

dp= dp cos p /|eye-p|2 = dp cos3 p /f 2

dp/p dp / Sp

Sp

p

Page 27: Rendering Problem László Szirmay-Kalos. Image synthesis: illusion of watching real world objects Le(x,)Le(x,) pixel f r (  ’, x,  ) S We(x,)We(x,)

Integrating on the visible surfaceIntegrating on the visible surface

r

pixel

dp= dy cos /|eye-y|2 = dy g(y)

y

Page 28: Rendering Problem László Szirmay-Kalos. Image synthesis: illusion of watching real world objects Le(x,)Le(x,) pixel f r (  ’, x,  ) S We(x,)We(x,)

Measuring functionMeasuring function

SL(y,’)We(y,’) cos d’dy =

= pL(h(eye, p ),-p) /p dp=

= SL(y,’) · cos /|eye-y|2 /p dy

We(y,’)=

(-yeye)/|eye-y|2 /p if y is visible in the pixel

0 otherwise

g(y)

Page 29: Rendering Problem László Szirmay-Kalos. Image synthesis: illusion of watching real world objects Le(x,)Le(x,) pixel f r (  ’, x,  ) S We(x,)We(x,)

Potential: Potential: WW(y,(y,’)’)

The direct and indirect effects in a measuring device caused by a unit beam from y at ’

The product of scaling factor C and the probability that the photon emitted at y in ’ reaches the device

y

Page 30: Rendering Problem László Szirmay-Kalos. Image synthesis: illusion of watching real world objects Le(x,)Le(x,) pixel f r (  ’, x,  ) S We(x,)We(x,)

Duality of Duality of radiance and potentialradiance and potential

Light propagation = emitter-receiver interaction

– radiance: intensity of emission– potential: intensity of detection

Page 31: Rendering Problem László Szirmay-Kalos. Image synthesis: illusion of watching real world objects Le(x,)Le(x,) pixel f r (  ’, x,  ) S We(x,)We(x,)

Potential equationPotential equation

y

C · Pr{ detection} = C · Pr{ direct detection} + C · Pr{ indirect detection}

Pr{ indirect detection} = Pr{ detection from the new point | reflection to }· Pr{ reflection to } d

Page 32: Rendering Problem László Szirmay-Kalos. Image synthesis: illusion of watching real world objects Le(x,)Le(x,) pixel f r (  ’, x,  ) S We(x,)We(x,)

Potential equationPotential equation

W(y,’)=We(y,’)+W(h(y,’,) fr(’,h(y,’,)cosd

W = We + ’W

y

h(y,’

fr (’,h(y,’,)

W(y,’)

Page 33: Rendering Problem László Szirmay-Kalos. Image synthesis: illusion of watching real world objects Le(x,)Le(x,) pixel f r (  ’, x,  ) S We(x,)We(x,)

Measuring the light: potentialMeasuring the light: potential

Measured values of a single beam =e(d’) W(y,’) = Le (y,’)cos dA d’ W (y,’)

Total measured value = M’W= SW (x,)de SLe(x,) W(x,) cos

ddx = < Le , W>

y’

e(d’)

Page 34: Rendering Problem László Szirmay-Kalos. Image synthesis: illusion of watching real world objects Le(x,)Le(x,) pixel f r (  ’, x,  ) S We(x,)We(x,)

Operators of the rendering Operators of the rendering and potential equationsand potential equations

Measuring a single reflection of the light:

Adjoint operators:

1 < Le , W> = < Le , ’We >

1 < L , We> = < Le ,We >

< Le , ’We > = < Le ,We >

Page 35: Rendering Problem László Szirmay-Kalos. Image synthesis: illusion of watching real world objects Le(x,)Le(x,) pixel f r (  ’, x,  ) S We(x,)We(x,)

Rendering problem: <S,Le,We ,fr>

= SWe(x,) d SL(x,) We(x,) cos ddx

Le(x,)

pixel

fr (’, x, )

S

We(x,)

= L