Analytical Computation of Acoustic Bidirectional Reflectance Distribution Functions

The Room Acoustic Rendering Equation introduced in [1] formalizes a variety of room acoustics modeling algorithms. One key concept in the equation is the Acoustic Bidirectional Reflectance Distribution Function (A-BRDF) which is the term that models sound reflections. In this paper, we present a method to compute analytically the A-BRDF in cases with diffuse reflections parametrized by random variables. As an example, analytical A-BRDFs are obtained for the Vector Based Scattering Model, and are validated against numerical Monte Carlo experiments. The analytical computation of A-BRDFs can be added to a standard acoustic ray tracing engine to obtain valuable data from each ray collision thus reducing significantly the computational cost of generating impulse responses.


Introduction
Computers have been used for over thirty years to model room acoustics.Nowadays, computational acoustics modeling has become a common practice in many different disciplines: the acoustic design of buildings such as auditoria or concert halls [2] [3], outdoor acoustics [4], audio post-production in Digital Cinema [5] or audio for video-games and other interactive applications [6]- [8].
The most used techniques in computational room acoustics are the so-called geometrical methods which are based on the geometrical theory of acoustics [9].The general approach of the geometrical methods is to find significant paths along which sound can travel from a source to a receiver through the environment.The most important geometrical methods that have been applied to acoustics are: image source method [10] [11], ray tracing [12], beam tracing [13]- [15] and radiosity [16]- [18].Some of these (sometimes in combination) are the basis of many room acoustics commercial softwares such as EASE [19], Odeon [20], Catt-Acoustics [21] or Ramsete [22].Recently, Siltanen et al. introduce the Room Acoustic Rendering Equation [1] which is a model for acoustic energy propagation.This approach, borrowed from computer graphics, integrates several geometrical methods within the same theoretical framework.One key concept in the equation is the Acoustic Bidirectional Reflectance Distribution Function [23] (A-BRDF) which is the term that models sound reflections.
In the present paper, we develop a method to compute the analytical solution for the A-BRDF in cases where sound reflections are diffuse, and diffusion is parametrized by one (or more) random variables.The method makes use of various properties of continuous probability functions, and exploits the relation between two and three dimensional probability densities.
The method is applied to the Vector Based Scattering Model [24] (VBS), which is one of the existing ways to efficiently include diffusion in a ray tracing algorithm by means of random vectors.Analytical results are obtained and shown to coincide with the large number of rays limit of the corresponding Monte Carlo simulation.
The paper is organized as follows: Section 2 briefly reviews the Room Acoustic Rendering Equation and the application of BRDFs to acoustics.Section 3 introduces the general methodology to compute analytically the A-BRDF.Section 4 presents the analytical computation of the A-BRDF for the Vector Based Scattering Model, and the comparison with the corresponding Monte Carlo results.Finally, future work and conclusions are discussed in Section 5.

Acoustic BRDF
Let us briefly review the Room Acoustic Rendering Equation (RARE) introduced in [1], which models the propagation of acoustic energy through the environment both in diffusive and general non-diffusive conditions.Following the notation in [1], the RARE reads: where 3 G ⊂  is the set of all surface points in the enclosure, ( ) , l x′ Ω is the outgoing time-dependent radiance from point x′ in the direction Ω , ( ) 0 , l x′ Ω is the radiance emitted by the surface from x′ in the direction Ω , and ( ) , , R x x′ Ω is the reflection kernel where x is the location of the previous reflection.The reflection kernel is a product of three terms: where ( ) is the A-BRDF, and Ω stands for the direction of the rays.Henceforth, directions will also be specified either using unit-norm vectors or using a specific coordinate system on the sphere, ( ) , θ φ , the zenital and azimuthal angles, respectively, as shown in Figure 1.
All the physics of the problem is contained in the A-BRDF, which can be expressed as the following ratio (see Figure 1 where o L is the radiance at a point x′ , exiting along the outgoing direction o Ω ; and i E is the irradiance at the same point incident along the direction i Ω .Again, x represents the location of the previous reflection of the sound ray.The A-BRDF can be interpreted as the probability that sound energy incident from a direction i Ω is reflect- ed in the direction o Ω .As such, the A-BRDF must also be normalized in order to avoid an artificial increase of the acoustic energy in the system.For the sake of simplicity of notation, in the rest of this paper we will not consider explicit dependence of the A-BRDF on the reflection position x′ , and hence write ( )

General Methodology
In this section we present a method to compute analytically the A-BRDF in cases where reflections suffer diffusion parameterized by a random variable, i.e. in cases where the vector o  along the outgoing direction, o Ω , is determined using a random vector, r  , ( ) yields the differential probability that the vector lies in the interval ( ) We have chosen a random vector in 3   rather than a single random variable, to cover more general cases, such as the VBS model discussed in the next section.We have also included dependence on the incident direction of the sound ray, represented by the unitary vector î with direction i Ω1 (see Figure 2).To compute the A-BRDF in such cases, we will use Equation ( 4), which relates the outgoing direction and the random vector r  , to obtain a relation between the probability density of the outgoing direction, and In other words, we will use Equation ( 4) to obtain the probability that the outgoing ray is in a small neighborhood ( ) Ω Ω + Ω , which is precisely the information provided by ( ) ρ Ω Ω .The relation between probability densities can be obtained recalling the way differential forms transform under a change of coordinates, ( ) ( ) ( ) which yields the following relation Here, ( ) is the Jacobian of the transformation defined by Equation ( 4).Ω Ω + Ω .Thus, to obtain ( ) ρ Ω Ω , all that is left to do is an integration over all possi- ble moduli: Note that the need for this last integration arises from the fact that relations of the form (4) are often written in a manner where the outgoing vector is not guaranteed to have unit norm, as will be shown in the next section.
The general method presented here can also apply to cases where the random vector is unitary, which is the case of VBS.In such cases, the probability density of the random unit vector ( ) r is actually two-dimensional, and it can be seen as the restriction to the unit sphere of the three-dimensional probability density ( ) where r r =  .This relation guarantees that probabilities can be indistinctly computed integrating ( ) p r  over two or three-dimensional intervals, respectively, ( ) ( )

A-BRDF for the Vector Based Scattering Model
Although several ray tracing simulations propagate rays using only specular reflections, one of the existing choices in room acoustic simulations is to include a diffusion model to determine the direction of the outgoing rays.The Vector Based Scattering (VBS) [24] is a method for room acoustics ray-tracing computations that makes use of a specific model to parameterize diffusion of sound waves by obstacles.Within VBS, the vector along the outgoing ray, o  , is calculated via a linear combination of two vectors ( ) where ŝ is a unit vector along the specular direction, r is a random unit vector, and is the diffusion coefficient of the material (see Figure 3).Clearly, ŝ is entirely determined by the incident vector î , and thus, Equation (10) is an explicit example of the general Equation (4).
In this case, the random vector r is uniformly distributed along the hemisphere whose equator is the plane of collision, and which contains the incoming and outgoing rays.The problem of determining the outgoing direction can be thought of that of adding a random vector of length d to the outgoing unit vector, after rescaling by 1 d − (see Figure 3).

Analytic Computation of A-BRDF
In this section, we focus on a slight variation of the VBS model whereby the random vector r is uniformly distributed along a whole unit sphere, rather than a hemisphere (Figure 4).This variation simplifies the presentation of the computations and allows for a deeper analysis of the results.The extension to the common case of the upper hemisphere, although straightforward, is more cumbersome, and will be presented elsewhere.
To obtain the A-BRDF we need to use Equation (7), which in turn depends on the relation between probability densities in Equation (6).The VBS is an example where the random vector has unit norm, and therefore requires Equation ( 8), ( ) ( ) ( ) ( ) where r r =  , the Dirac δ -term ensures that the random vector is unitary (see Equation ( 8)), and the choice ensures that the probability is normalized to one: ( ) To complete the computation in Equation ( 6), we need the Jacobian of the transformation (10), which turns out to be constant, ( ) ( ) ( ) ( )  To continue, we need to invert Equation (10) and express the modulus r  as a function of the outgoing and incident rays: where ˆô s γ ≡ ⋅ is the cosine between the specular and the outgoing directions.Note that expressing r  as a function of o  does not guarantee that r  is unitary; this fact is only ensured by the delta-function in Equation ( 13).The expression for the probability density of the outgoing vector is then given by: 2 .
The last step to obtain the A-BRDF consists on inserting Equation (15) in Equation ( 7) and integrating over the radial coordinate.From (15), it is clear that, in this case, the A-BRDF depends on the incident and outgoing directions only through the combination γ .We shall thus write ( ) ρ γ in the remainder of the paper.From ( 7): ) This integral is straightforward using a general formula for integrals containing Dirac's delta functions: ( where the sum is over all roots * i x of the function ( ) f x in the interval ( ) , a b .In our case, ( ) Each of these roots contributes to the integral in Equation ( 16) only when they are real and positive, the latter restriction due to the fact that the integral range is ( ) 0, ∞ .Thus, given that o o + − > , depending on the value of , d γ we obtain one of the following results The condition that both solutions be real is ( ) which basically states that unless diffusion is high enough, there are outgoing angles that are unattainable for some incident directions.Indeed, it can be seen that Equation (20) (21) 2 We have used the equality ( ) ( ) Figure 5 shows various plots of the analytical results for the A-BRDF, Equations ( 21) and (22).The two extreme limits work as expected: when 1 d → , all outgoing directions are equally probable (Lambert diffusion limit); whereas when 0 d → , only outgoing directions close to specularity ( 0 θ = ) are attainable.
The results for 1 2 1 d < < are also intuitive: the probability density of the outgoing ray is maximum at spe- cularity, and decreases progressively away from it.The maximum is less pronounced as we increase the diffusion coefficient attaining a uniform distribution for 1 d .The results 1 2 d < might look anti-intuitive at first sight.Besides the existence of a limit angle L θ ex- plained above, it is worth remarking that the maximum of the probability density does not lie at specularity, but very close to the limit angle.Indeed, the probability density diverges at L θ .As shown in the next section, this divergence is actually integrable, and therefore leads to finite and meaningful measurable probabilities.To understand physical origin of this divergence note that, when 1 2 d < , the outgoing vector o  lies on the sphere centered at ( ) , as shown in Figure 3.The limit angle corresponds to a line with origin at the reflection point, and which is tangent to the sphere.The probability density that o  lies in the interval ( ) , θ θ δθ + is basically the fraction of area of the sphere that lies between those two angles.At strict tangency, no matter how small δθ , there is always a finite area lying in the range. 3

Analysis and Numerical Validation
In this section we will validate Equations ( 21) and ( 22) by showing that Monte Carlo experiments reproduce the same results in the limit of large number of rays.To avoid subtleties with the divergences explained above, we will compare probability distributions rather than probability densities; the former contains the same information as the latter, but it is necessarily absent of divergences.
The probability of having an outgoing ray contained in a finite solid angle Σ can be obtained from the probability density via Given that, as described above, ( ) ρ Ω Ω depends only on the cosine angle cos γ θ = , we will compare with Monte Carlo experiments the probability ( ) 0 F θ that the outgoing ray has an angle θ with respect to the 3 A simpler analogous problem is that of finding the fraction of length of the unit circle 2 2 1 x y + = that lies in a small interval ( ) + .
The answer diverges at 1 x = ± despite the fact the total length is, obviously, finite.At those points, const.x = lines intersect the circle tangentially.
specular direction less than 0 θ , irrespective of the rotational angle φ , ( ) ( ) Our analytical prediction for ( ) 0 F θ follows from (21) and ( 22): where ( ) ( ) G γ is the indefinite integral of ( ) ρ γ , which can be computed analytically.For 1 2 d ≥ , ( ) ( ) ( ) whereas for 1 2 , ( ) ( ) We will now show that Equations ( 26) and ( 27) provide same result as Monte Carlo experiments in the limit of large number of rays.In order to do so, consider a single plane characterized by a diffusion coefficient d.To simplify the experiment, let us set the direction of the incident sound ray to be orthogonal to the plane, which leads to a specular vector, ŝ , that coincides with the normal to the plane.For a given value of the diffusion coefficient, N random 3-vectors j r are produced and added to the specular vector following the VBS Equation (10), thus obtaining N outgoing rays j o  .Figure 6 shows the histogram (red points) corresponding to the outgoing directions of the vectors j o  and its comparison to the analytical results (blue continuous lines).A large number of random rays The usefulness of the analytic results presented here is more apparent when the convergence of the Monte Carlo results is considered.Figure 7 shows a set of plots for fixed diffusion 0.6 d = and varying number of random rays: .These plots can be used to estimate the needed number of rays that would be needed, if analytical results were not available, to fulfill each particular ray-tracing precision criteria.

Use of Analytical A-BRDFs in Acoustic Ray Tracing Engines
Acoustic ray tracing enginges find propagation paths between a source and receiver by generating rays emanating from the source position and following them through the environment until a set of rays reach the receiver [12].The final objective is to make use of the rays that reach the receiver to obtain the Impulse Response that characterizes the acoustic field of the room.A large number of rays is needed in order to obtain accurated results.For instance, AURA module included in EASE acoustic simulator software generates around 10 5 rays for medium size rooms [25].The computation of analytical solutions for the A-BRDF can be added to a standard acoustic ray tracing engine in order to reduce significantly the amount of rays needed to obtain the same results.The proposed methodology provides valuable data at each collision for all the rays that are generated and followed through the enclosure.
The resulting ray tracing algorithm incorporates an extra step every time a ray collides with the environment.In addition to compute the outgoing ray direction, it makes use of the analytical solution for the A-BRDF to compute the contribution of the collision to the final Impulse Response.
Figure 7 shows that the analytical solution of the A-BRDF gives the same result that can be obtained by throwing a large number of rays (10 4 rays were needed in our plots to match the analytical solution).Accordingly, the addition of the anaylical solution to the ray tracing algorithm notably reduces the amount of rays needed to obtain the same accuracy in the resulting Impulse Responses.

Conclusions
A method to derive analytical solutions for the Acoustic Bidirectional Reflectance Distribution Function (A-BRDF) in cases of diffuse reflections parametrized by random variables has been presented and discussed.The method works for generic relations between outgoing, incoming and random vectors of the form (4), and makes use of various properties of continuous probability functions, exploiting the relation between two and three dimensional probability densities.
The method has been applied to the well-known Vector Based Scattering Model, for which exact analytical A-BRDF has been obtained, Equations ( 21) and (22).The results provide, by means of only one analytical for-mula evaluation, the same results as the corresponding Monte Carlo simulation in the limit of large number of rays.
The computation of analytical solutions for the A-BRDF can be added to a standard acoustic ray tracing engine by introducing an extra step in the algorithm to compute the contribution of every ray collision with the environment to the final Impulse Response.That is, instead of only using the information coming from the rays that reach the listener position to compute the Impulse Response, valuable data can be obtained from each collision that contributes to the computation of the Impulse Response thus reducing significantly the computational cost, as shown in Figure 7.The use of this methodology can imply a reduction of about 10 3 -10 4 rays in any of the existing comercial acoustic ray tracing engines.Further work will focus on the application of the method discussed here to other ray tracing diffusion models for acoustics and on the computation of real time Impulse Responses for simple environments through the method introduced in this paper.

Figure 1 .
Figure 1.The A-BRDF returns the ratio of reflected radiance, 0 L , to the incident irradiance, i E , at point 0 x .

Figure 2 . 3 ,
Figure 2. The outgoing ray o  will be function of the incident ray î and other parameters.

Figure 3 .
Figure 3. Scheme of the VBS, with r randomly generated within the upper hemisphere.

Figure 4 .
Figure 4. Scheme of the VBS, with r randomly generated within the whole sphere.
to avoid the use of square roots inside delta-functions.whereas both o + and o − are positive if 1 2 d < , which yields

Figure 5 .
Figure 5. Analytical results of the A-BRDF for diffusion values larger (a) and lower (b) than 1/2.