140 likes | 227 Views
Iluminação local. MC-930 Tópicos em Computação Gráfica Luiz M. G. Gonçalves. Iluminação local. Estudo de como os diferentes nmateriais refletem luz Optica Geometrica (yes:-) Ondas (not in this class) Como a BRDF f r encapsula as propriedades de reflectância de um material. Terms.
E N D
Iluminação local MC-930 Tópicos em Computação Gráfica Luiz M. G. Gonçalves
Iluminação local • Estudo de como os diferentes nmateriais refletem luz • Optica • Geometrica (yes:-) • Ondas (not in this class) • Como a BRDF fr encapsula as propriedades de reflectância de um material
Terms • Flux – Power of light energy passing through a surface per unit time, measured in watts = joules/sec • Irradiance (E) – Incoming power (flux) per unit area (W/m2) • Radiosity (B) – Outgoing power (flux) per unit area (W/m2)
Hemisphere r • Use a hemisphereW over surface to measure incoming/outgoing flux • Measured using the solid angle w • Unit is steradian (sr) = area of r2 on sphere • Area of sphere = 4pr2 • Number of steradians in a hemisphere = 2p
dq1 Diminuindo(Foreshortening) dq2 dA1 dA2 • Light arriving on a surface at an angle is distributed differently, dq1=dq2 but dA1dA2 dA1 = dA2 cosq2 • Intensity (I) – Power (flux) per unit solid angle (W/sr) • Irradiance is the foreshortened incident intensity Ei = Ii cosqi dwi
The Reflectivity • Measures the portion of incident irradiance (Ei) that is reflected as intensity (Ir) r = dIr /dEi • The reflected intensity is the forshortened incident intensity scaled by the reflectivity Ir = rIi cosqidwi • Ranges from 0 to 1 (conservation of energy)
Radiance • Radiance (L) – Power per unit solid angle per unit foreshortened area (W/(srm2)) • Radiance is the intensity per area forshortened L = dI/(dA cos q) • Or the irradiance per solid angle forshortened L = dE/(dw cos q)
The Bidirectional Reflectance Distribution Function (BRDF) • Measures the portion of incident irradiance (Ei) that is reflected as radiance (Lr) fr = dLr/dEi • Ranges from 0 to
6-D BRDF fr(qi, fi, qr, fr, u, v) Incident direction qi, fi Reflected direction qr, fr Surface parameterization u,v 4-D BRDF fr(qi, fi, qr, fr) Homogeneous material Anisotropic, depends on incoming azimuth e.g. hair, brushed metal, ornaments 3-D BRDF fr(qi, qr, fi – fr) Isotropic, independent of incoming azimuth e.g. Phong highlight 1-D BRDF fr(qi) Perfectly diffuse e.g. Lambertian Parameterizations
BRDF Attributes • Reciprocity fr(qi, fi, qr, fr) = fr(qr, fr, qi, fi) • Materials are not a one-way street • Incoming to outgoing pathway same as outgoing to incoming pathway • Conservation of Energy • When integrated, must add to less than one • Materials must not add energy • Materials must absorb some amount of energy
Modeling BRDF’s • Mathematical derivation • Use laws of physics, geometry • Statistical model of idealized material • Simulation • Model material directly • Render light reflected onto hemisphere • Measurement • Reflect real light off of real material • Gonioreflectometer
Illumination via Reflectivity Ir = kara Ia (NL) +S (kdrd Id +ksrs Is) (NL) dw • Constants kd + ks = 1 • Intensities • Ia = average color of reflected light in scene • Id = color of material • Is = color of light source • Reflectivities • Constant: ra = 1/ (NL) • Lambertian: rd = 1 • Phong: rs = (VR)n/ (NL)
Iluminação usando a BRDF • Equação de reflectância • radiância refletida é • a soma da radiância incidente sobre todo o hemisfério • diminuída • escalada pela função BRDF
Reflexão difusa q • rd = (N L) • Uniforme • Envia mesma quantidade de luz em todas as direções • Quantidade depende do ângulo de incidência • Perfeita • toda luz incidente é refletida • não há absorção