Anastassiya S. Kulikova
Moscow State University,
Faculty of Computational Mathematics
Moscow, Russia
e-mail: sergevna@mailru.com
Kirill Dmitiriev
Moscow State University,
Faculty of Computational Mathematics
Moscow, Russia
e-mail: kadmitr@gin.keldysh.ru
Contents
Keywords: Ray Tracing, Fuzzy reflections, Rendering..
1. Introduction Due to lack of literature on this subject I will mention only draft versions of fuzzy reflection implementation. There have been several approaches to rendering fuzzy reflections. The first algorithm perturbs the local normal at surface point where backward ray hit it (in fact, in every screen pixel). Second approach is to trace multiple rays inside of a cone, constructed around the direction of ideal specular reflection, and then calculate average. The latter approach is very slow because too many rays from every point are traced. The first approach is relatively fast, but it is not qualitative because it results in grainy look of surface. 2. Method description The approach suggested also treats the surface as a set of random micro-facets, assuming that their size is much less than pixel size, thus no granularity is visible. Under some conditions this approach is physically accurate (it depends on the reflecting properties of materials); in other cases it is expected to give a good approximation sufficient for a photo-realistic appearance. This method is implemented via two-pass rendering. The 1st pass is the usual backward ray tracing assuming specular reflection. This pass is used to fill in image buffer where all pixel contains:
> (1)
where L0(x,y) is the luminance of the original image at pixel (x,y), and L(x,y) is the resulting luminance which represents fuzzy reflections. Here f(x, xt, y, yt) are weight coefficients depending on the material properties and on the J > angle. As in our renderer the reflective properties of material were characterized by the shininess and shin strength, the following formula were suggested
f = 2 * ShinStrength * pow (cos (J > ), Shininess) (2)
In renderers where specular characteristics of material are determined by Phong coefficient (glossiness), the following formula is suggested
f = pow ( cos (J > ), p) (3)
Where p is Phong coefficient and J > (x,x,y,y) is the angle between direction from intersection point to the end of "its" ray (=specular ray) and ray fired from this point to the end of ray for neighbour pixel (x,y):

Figure 1: The thick green line is glossy reflector; thick blue line is the object reflected in it; blue arrows show local normals and solid black arrows show specularly reflected rays which were traced in the 1st pass; the dashed arrow is the ray representing fuzzy reflections and J > is the angle between it and specular direction.
From the Figure 1 one can calculate that
> (3)
We assume that the reflecting surface is glossy, so that nearly all reflected energy contains in cone J > £ > Q > < 10° > . In this case contribution of far pixels is negligible, and we can confine the sum in (1) to the neighbourhood of pixel (x, y). The latter comprises pixels (x, y) such that the rays fired to them from camera deviate from ray fired to the central pixel (x, y) be angle less than
a > = Q > /(1 + s/r) (4)
where s is the distance from camera to intersection point on glossy surface (point a) and r is the distance from the latter to the end of ray (point b). From the angular size we can easily estimate the radius in pixels:
r > = a > ´ > (image size)/(view angle) (5)
Thus, we obtain the following formula for determining the blurred color
> (1’)
(or equally we can use round instead of rectangular area)
The filter function is evaluated at the centres of pixels. It would be better to evaluate f(x,x,y,y) as average over pixel, but that is too expensive.
3. Basic Optimizations
When realized as described above the algorithm considerably decreases rendering speed. The following optimizations were made . They do not lead to drawbacks in quality, but allow for fast rendering.
The filtering (1) may be expensive in case of large filter size. The following means can be used to accelerate that:
|
|
|
Figure 2: Sample scene, no fuzzy reflections |
|
|
Figure 3: Sample scene, surface roughness 50%. |
|
|
|
Figure 4: Sample scene, surface roughness 100%. |