CAPITULO 5. ALTERNATIVAS DE SOLUCIÓN PARA MINIMIZAR LA SALIDA FUERA DE SERVICIO DE LA
5.7 CÁLCULO DE SOBRETENSION Y TASA DE CONTORNEAMIENTO CON MEJORAS DE PAT Y
5.7.1 SOBRETENSIONES POR IMPACTO EN POSTE CON MEJORA DE PUESTA A TIERRA
IBL was used to simulate perfect specular effects such as reflection and refraction in the seminal work by Blinn and Newell [21]. The reflected/refracted vector at a surface pointxis used to look-up in the environment map, and the colour at that address is used as reflected/refracted value, see Figure 2.41. This method allows very fast reflection/refraction, see Figure 2.44.a and Figure 2.44.b. However, there are some drawbacks. Firstly, concave objects cannot have internal inter-reflections/refractions, because the environment map does not take into account local features, see Figure 2.42.a. Secondly, reflection/refraction can be distorted since there is a parallax between the evaluation point and the point where the environment map was captured, see Figure 2.42.b.
(a) (b)
(c) (d)
Figure 2.40: The Computer Science environment map encoded using the projection mappings: a) Mirrored spherical map. b) Angular map. c) Latitude-longitude map. d) Cube map unfolded into a horizontal cross.
(a) (b)
Figure 2.41: The basic Blinn and Newell [21] method for IBL: a) The reflective case, the view vector
v is reflected around normalnobtaining vector r=v−2(n·v)n, which is used to look-up into the environment map and get the colour value t. b) The refractive case, the view vectorvcoming from a medium with index of refraction n1enters in a medium with index of refraction n2<n1. Therefore,vis
refracted following the Snell law, n1sinα1=n2sinα2, obtainingr. This vector is used to look-up into
(a) (b)
Figure 2.42: The basic Blinn and Newell [21] method for IBL: a) The pointxinside the concavity, erroneously uses t1instead of t2as colour for refraction/reflection. This is due to the fact the environment
map does not capture local features. b) In this case, both reflected/refracted rays for the blue and red objects are pointing to the same direction, but from different starting points. However, the evaluation does not take into account the parallax, sox1andx2shares the same colour t1.
In parallel Miller and Hoffman [136] and Green [71] extended IBL for simulating diffuse ef- fects, see Figure 2.44.c. This was achieved by convolving the environment map with a low-pass kernel: E(n) = Z Ω(n)L(ω)(n·ω)dω (2.79) (a) (b)
Figure 2.43:The Computer Science environment map filtered for simulating diffuse reflections: a) The original environmental map. b) The convolved environment map using Equation 2.79.
whereLis the environment map,nis a direction in the environment map,Ω(n)is the positive hemisphere of n. For an example of a convolved environment map see Figure 2.43. In this case, the look-up vector for a point is the normal. Nevertheless, this extension inherits the same problems of the Blinn and Newell’s one: no inter-reflection and parallax issues.
Debevec [44] proposed a general method for IBL which takes into account arbitrary BRDF and inter-reflections. In addition he used HDR environment maps, which encode real-world irradiance data. The proposed method is based on ray tracing, and the evaluation, for each pixel, is divided into the following cases:
(a) (b) (c)
Figure 2.44: An example of classic IBL using environment maps applied to the Stanford’s Happy Buddha model [73]: a) Simulation of a reflective material. b) Simulation of a refractive material. c) Simulation of a diffuse material.
1. No intersections: the ray of a pixel does not hit an object in its traveral of the scene. In this case the colour of the pixel is set to the one of the environment map using the direction of the ray as look-up vector.
2. Pure Specular: the ray of a pixel intersects an object with a pure specular material. In this case the ray is reflected and/or refracted according to the material properties.
3. General Material: the ray of a pixel intersects an object with a general material de- scribed by a BRDF. In this case a modified Rendering Equation [91] is evaluated as:
L(x,ω) =Le+
Z
ΩL(ω
0)f
r(ω0,ω)V(x,ω0)n·ω0dω0 (2.80)
wherexandnare respectively the position and normal of the hit object,Le is the emit-
ted radiance at pointx, Lis the environment map, fr is the BRDF,ω0 is the out-going
direction, andω is the view vector. V is the visibility function, a Boolean function that determines if a ray is obstructed by an object or not.
The use of ray tracing efficiently remove the inter-reflections/refractions limitations of the first approaches. Furthermore, visibility is evaluated allowing shadows and a more realistic visual- isation, see Figure 2.45.
The evaluation of IBL using Equation 2.80 is computationally very expensive. For instance, if all directions stored in an environment map are used in the evaluation the complexity for a single pixel isO(n f(m))wherenis the number of pixel of an environment map, and f(m) =
(a) (b)
Figure 2.45:An example of IBL evaluating visibility applied to Stanford’s Happy Buddha Model [73]: a) IBL evaluation without shadowing. b) IBL evaluation with Debevec’s method [44].
logmis the complexity for computing the visibility in a scene with mobjects. To lower the complexity there are two methods: light source extraction or Monte-Carlo integration.
Light Source Extraction
A simple method for the evaluation of Equation 2.80 is to generate a finite set of directional light sources from the environment map. The idea is to place a light source in an area with high luminance values.
The main techniques are: structured importance sampling (SIS) [4], k-means sampling (KMS) [97], Penrose tiling sampling (PTS) [148], median-cut sampling (MCS) [170]. The main dif- ference in all these methods is how lights are placed. In SIS, a light is placed in the centre of a stratum generated byk-centre on a segmented environment map. In KMS, lights are generated randomly on the environment map and then they are relaxed using Lloyds’s method [119]. In PTS, the image is decomposed using Penrose tiles, where smaller tiles are applied to areas with high luminance, and a light source is placed for each vertex of the a tile. Finally in MCS, light sources are placed in the weighted centre of each region that the image is hierarchically decomposed by a 2D-tree, that divides regions on the total luminance power of it.
After the generation of light sources, Equation 2.80 is evaluated as:
L(x,ω) =Le+ N
∑
i=1
whereN is the number of generated light sources,−ω0
i is the direction of the generated light
source, andCi is the colour of it. For an example see Figure 2.46.
(a) (b)
Figure 2.46:An example of evaluation of Equation 2.81 using MCS [170] with different N: a) N=16. Note that aliasing artifacts can be noticed. b) N=256, aliasing is alleviated.
The light sources extraction does not present noise, so they can be used in animated scenes. However, the method can present aliasing if only few light sources are generated, depending on radiance distribution and the dynamic range of the environment map.
Monte-Carlo Integration and Importance Sampling
Another popular method for IBL is to use Monte-Carlo integration, which uses random sam- pling for evaluating complex multidimensional integrals as in the case of Equation 2.80. For example, an 1D f(x)function needs to be integrated in the domain[a,b]is usually solved as:
Iab=
Z b
a
f(x)dx=F(a)−F(B) F0(x) = f(x) (2.82) However, it can happen that F(x) is not possible to integrate analytically as in the case of Normal distribution, or f(x)is known only in few points of the domain. In Monte-Carlo inte- gration [163], integration is calculated by averaging the value of f(x)inNpoints distributed in a domain, assuming Riemann integrals:
ˆ Iab= b−a N N
∑
i=1 f(xi) Iab= lim N→+∞ b−a N N∑
i=1 f(xi) (2.83)wherex1,x2, ...,xNare random uniformly distributed points in[a,b], because deterministic cho-
integrate a multidimensional function are needed equidistant point grids, which are very large
Nd, whereN is the number of points for a dimension and d is the number of dimensions of
f(x).
The convergence in the Monte-Carlo integration Equation 2.83 is determined by variance, σ ∝N−12, which means thatN has to be quadruplicated to half the error. A technique that
reduces variance is called importance sampling. The idea is to integrate by taking pointsxithat
contribute more to the final integral. This is achieved by using a probability density function
p(x)with a similar shape of f(x):
ˆ Iab= 1 N N
∑
i=1 f(xi) p(xi) (2.84) (a) (b)Figure 2.47: A comparison between Monte-Carlo integration methods for IBL: a) Monte-Carlo inte- gration using 4 samples per pixel. b) Importance Sampling Monte-Carlo integration using 4 samples per pixel.
Note that the variance is still the same, but a good choice of p(x)can make it arbitrarily low. The optimal case is when p(x) = fI(x)
ab . To create samples, xi, according to p(x) the inversion
method can be applied. This method calculates the cumulative distribution functionP(x) of
p(x), then samples, xi, are generated byxi=P−1(yi)whereyi ∈[0,1]is a uniformly random
distributed number.
Importance sampling can be straightforwardly applied to the IBL problem, extending the prob- lem to more than one dimension [162]. Good choices of p(x) are the luminance of the envi-
(a) (b)
Figure 2.48: An example of stereo IBL by Corsini et al. [36] using the Michelangelo’s David model: a) Three Michelangelo’s rendered using a single environment map. b) Three Michelangelo’s rendered using a stereo environment map. Note that shadows directions change for each model. Images are courtesy of Massimiliano Corsini.
ronment map image,l(ω0), or the BRDF, fr(ω,ω0), or a combination of both. For an example
of the evaluation of IBL using Monte-Carlo integration see Figure 2.47. Monte-Carlo methods are unbiased, they converge to the real value of the integration, but they have the disadvantage of noise, that can be alleviated with importance sampling.