4
Supplemental Document: Anisotropic Spherical Gaussians Kun Xu 1 Wei-Lun Sun 1 Zhao Dong 2 Dan-Yong Zhao 1 Run-Dong Wu 1 Shi-Min Hu 1 1 Tsinghua University, Beijing 2 Program of Computer Graphics, Cornell University This supplemental document provides additional evaluations and comparisons for the paper entitled Anisotropic Spherical Gaus- sians. 1 Approximating an SG using an ASG with equal bandwidths The traditionally used Spherical Gaussian (i.e. the von Mises- Fisher distribution), is defined as Giso(v; p) = exp(2ν (v · p - 1)), where p is the lobe direction, and ν is the bandwidth. In practice, it can be approximated by an ASG with equal band- widths: Giso(v; p) G(v;[x, y, p], [ν, ν ]), where x, y are two arbitrary directions that form a local frame with p. To evaluate its accuracy, we compare our approximation (an ASG with equal bandwidths) to the ground truth (a von Mises-Fisher distribution) in Fig. 1. Note that in all configurations, our approximations match the reference very well. -π/2 0 π/2 0 0.5 1 ν= 10 ν= 5 ν= 2 -→ θ origin. SG approx. ASG -π/6 0 π/6 0 0.5 1 ν= 1000 ν= 100 ν= 30 -→ θ origin. SG approx. ASG Figure 1: Comparison of ASGs with equal bandwidths to SGs. θ denotes the angle between direction v to lobe direction p. 2 Proof of Eq. 5 Below, we will give the derivations of the analytic solution of the integral R π 2 θ=0 e -k sin 2 θ sin θ cos θ dθ, which is used in Eq.5 in the paper. Z π 2 θ=0 e -k sin 2 θ sin θ cos θ dθ (1) = 1 2 Z π 2 θ=0 e - k(1-cos 2θ) 2 sin 2θ dθ (2) -→ substituting θ 0 =2θ = 1 4 Z π θ 0 =0 e - k(1-cos θ 0 ) 2 dcos θ 0 (3) -→ substituting x = cos θ 0 = 1 4 Z 1 x=-1 e - k(1-x) 2 dx (4) = 1 2k e k(x-1) 2 1 -1 (5) = 1 2k (1 - e -k ) (6) 3 Derivation of Eq. 8 0 π/2 π 0 0.5 1 μ λ cos 2 φ + μ sin 2 φ -→ φ λ=3µ λ=5µ λ=10µ Figure 2: Plot of μ λ cos 2 φ+μ sin 2 φ . By observing the shape of the function 1/(λ cos 2 φ + μ sin 2 φ) in Fig. 2, we can find that it is also a lobe shape and hence can be reasonably approximated by a circular Gaussian (assuming λ μ): 1 λ cos 2 φ + μ sin 2 φ k1 + k2e -k 3 cos 2 φ (7) where k1,k2,k3 are three parameters to determine. Since the value of 1/(λ cos 2 φ + μ sin 2 φ) ranges in [1/λ, 1], we set k1 =1, k2 = (1- 1) to preserve its ranges. k3 is determined by preserving the second order derivative at the peak position φ = π/2, which results in k3 = λ-μ μ . 4 Rational approximation of 1D function F in Eq. 9 The 1D function F(a) is defined as F(a)= R 2π 0 e -a cos 2 φ dφ , which can be approximated by the square root of a rational func- tion: F(a) s p1a 3 + p2a 2 + p3a + p4 a 4 + q1a 3 + q2a 2 + q3a + q4 (8)

Supplemental Document: Anisotropic Spherical Gaussianskun/asg/...ASG 1 ASG 2 approx. ref. ASG 1 ASG 2 approx. ref. Example 1 Example 2 Example 3 Example 4 Example 5 Example 6 Example

  • Upload
    others

  • View
    19

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Supplemental Document: Anisotropic Spherical Gaussianskun/asg/...ASG 1 ASG 2 approx. ref. ASG 1 ASG 2 approx. ref. Example 1 Example 2 Example 3 Example 4 Example 5 Example 6 Example

Supplemental Document: Anisotropic Spherical Gaussians

Kun Xu1 Wei-Lun Sun1 Zhao Dong2 Dan-Yong Zhao1 Run-Dong Wu1 Shi-Min Hu11Tsinghua University, Beijing 2 Program of Computer Graphics, Cornell University

This supplemental document provides additional evaluations andcomparisons for the paper entitled Anisotropic Spherical Gaus-sians.

1 Approximating an SG using an ASG withequal bandwidths

The traditionally used Spherical Gaussian (i.e. the von Mises-Fisher distribution), is defined as Giso(v;p, ν) = exp(2ν(v ·p − 1)), where p is the lobe direction, and ν is the bandwidth.In practice, it can be approximated by an ASG with equal band-widths: Giso(v;p, ν) ≈ G(v; [x,y,p], [ν, ν]), where x, y aretwo arbitrary directions that form a local frame with p. To evaluateits accuracy, we compare our approximation (an ASG with equalbandwidths) to the ground truth (a von Mises-Fisher distribution)in Fig. 1. Note that in all configurations, our approximations matchthe reference very well.

−π/2 0 π/20

0.5

1

ν= 10 →

ν= 5 →

ν= 2 →

−→ θ

origin. SGapprox. ASG

−π/6 0 π/60

0.5

1

ν= 1000 →

ν= 100 →

ν= 30 →

−→ θ

origin. SGapprox. ASG

Figure 1: Comparison of ASGs with equal bandwidths to SGs. θdenotes the angle between direction v to lobe direction p.

2 Proof of Eq. 5

Below, we will give the derivations of the analytic solution of theintegral

∫ π2θ=0 e

−k sin2 θ sin θ cos θ dθ, which is used in Eq.5 in the

paper. ∫ π2

θ=0

e−k sin2 θ sin θ cos θ dθ (1)

=1

2

∫ π2

θ=0

e−k(1−cos 2θ)

2 sin 2θ dθ (2)

−→ substituting θ′ = 2θ

=1

4

∫ π

θ′=0

e−k(1−cos θ′)

2 dcos θ′ (3)

−→ substituting x = cos θ′

=1

4

∫ 1

x=−1

e−k(1−x)

2 dx (4)

=1

2kek(x−1)

2

∣∣∣∣1−1

(5)

=1

2k(1− e−k) (6)

3 Derivation of Eq. 8

0 π/2 π0

0.5

λ cos2 φ+ µ sin2 φ

−→ φ

λ=3µλ=5µλ=10µ

Figure 2: Plot of µλ cos2 φ+µ sin2 φ

.

By observing the shape of the function 1/(λ cos2 φ + µ sin2 φ)in Fig. 2, we can find that it is also a lobe shape and hence can bereasonably approximated by a circular Gaussian (assuming λ ≥ µ):

1

λ cos2 φ+ µ sin2 φ≈ k1 + k2e

−k3 cos2 φ (7)

where k1, k2, k3 are three parameters to determine. Since the valueof 1/(λ cos2 φ+ µ sin2 φ) ranges in [1/λ, 1/µ], we set k1 = 1/λ,k2 = (1/µ − 1/λ) to preserve its ranges. k3 is determined bypreserving the second order derivative at the peak position φ =π/2, which results in k3 = λ−µ

µ.

4 Rational approximation of 1D function F inEq. 9

The 1D function F(a) is defined as F(a) =∫ 2π

0e−a cos2 φ dφ,

which can be approximated by the square root of a rational func-tion:

F(a) ≈

√p1a3 + p2a2 + p3a+ p4

a4 + q1a3 + q2a2 + q3a+ q4(8)

Page 2: Supplemental Document: Anisotropic Spherical Gaussianskun/asg/...ASG 1 ASG 2 approx. ref. ASG 1 ASG 2 approx. ref. Example 1 Example 2 Example 3 Example 4 Example 5 Example 6 Example

ozh

xh

yhzh

zi y'i

y'h

y izi

x i

x'i (x')h

(a) (b) (c)

Figure 3: Spherical Warping.

where p1 = 0.7846, p2 = 3.185, p3 = 8.775, p4 = 51.51, q1 =0.2126, q2 = 0.808, q3 = 1.523, q4 = 1.305. The SSE error issmaller than 4.0× 10−5.

5 More evaluations on ASG operators

Product of two ASGs. In Fig. 5, we give more examples on ASGproduct approximations. In each example, we provide the two in-put ASGs (the 1st,2nd or the 5th,6th columns), our approximatedproduct represented by an ASG (the 3rd or the 7th columns), andthe ground truth product (the 4th or the 8th columns). Note that ourapproximated results are indistinguishable from the ground truth inall examples.

Convolution of an ASG and an SG. In Fig. 6, we give more ex-amples on ASG convolution approximations. In each example, weprovide the input ASG (the 1st or the 5th columns), the input SG(the 2nd or the 6th columns), our approximated convolution rep-resented by an ASG (the 3rd or the 7th columns), and the groundtruth convolution (the 4th or the 8th columns). Note that our ap-proximated results are indistinguishable from the ground truth inall examples.

6 Second Derivatives in Eq. 25

As shown in Fig. 3, at direction h = zh, we also define a de-fault local frame [x′h,y

′h, zh], making the tangent direction x′h per-

pendicular to view direction o (i.e. x′h = x′i). The three secondderivatives of the exponential order g(i) at peak position i = zi arecomputed as:

∂2g

∂x′2i=λ(xh · x′h)2 + µ(yh · x′h)2

4(o · zh)2(9)

∂2g

∂x′i∂y′i

=(µ− λ) · (xh · x′h) · (yh · x′h)

4(o · zh)(10)

∂2g

∂y′2i=µ(xh · x′h)2 + λ(yh · x′h)2

4(11)

7 Warping Comparison

Given a view direction o, in order to obtain the corresponding 2DBRDF slice to integrate with incident lighting and visibility func-tions, we have approximated a warped NDF (represented by ASGs)again using ASGs. In Fig. 4, we evaluate this approximation us-ing Ashikmin BRDF with different anisotropy ratio. As shown inthe figure, regardless of anisotropy ratio, the differences betweenour rendered images with warping approximation and the referenceimages are subtle.

with warp without warp reference

Figure 4: Warping Comparison of rendered spheres with AshikminBRDF model. First row: nu = 88.9,nv = 900 (anisotropy ratio:3); second row: nu = 20000,nv = 800 (anisotropy ratio: 5);third row: nu = 20000,nv = 200 (anisotropy ratio: 10). The firstand second columns give rendered results with and without warpingapproximations, respectively.

Page 3: Supplemental Document: Anisotropic Spherical Gaussianskun/asg/...ASG 1 ASG 2 approx. ref. ASG 1 ASG 2 approx. ref. Example 1 Example 2 Example 3 Example 4 Example 5 Example 6 Example

Inputs Results Inputs ResultsASG 1 ASG 2 approx. ref. ASG 1 ASG 2 approx. ref.

Exa

mpl

e1

Exa

mpl

e2

Exa

mpl

e3

Exa

mpl

e4

Exa

mpl

e5

Exa

mpl

e6

Exa

mpl

e7

Exa

mpl

e8

Exa

mpl

e9

Exa

mpl

e10

Exa

mpl

e11

Exa

mpl

e12

Exa

mpl

e13

Exa

mpl

e14

Figure 5: More Evaluations on ASG product operator. The bandwidth parameters in all examples are listed below. Example 1: λ1 = 3,µ1 = 3, λ2 = 3, µ2 = 3. Example 2: λ1 = 3, µ1 = 3, λ2 = 3, µ2 = 3. Example 3: λ1 = 10, µ1 = 1, λ2 = 50, µ2 = 1. Example 4:λ1 = 10, µ1 = 1, λ2 = 50, µ2 = 1. Example 5: λ1 = 10, µ1 = 1, λ2 = 50, µ2 = 1. Example 6: λ1 = 10, µ1 = 1, λ2 = 50, µ2 = 1.Example 7: λ1 = 1000, µ1 = 1, λ2 = 100, µ2 = 1. Example 8: λ1 = 1000, µ1 = 1, λ2 = 100, µ2 = 1. Example 9: λ1 = 1000, µ1 = 1,λ2 = 100, µ2 = 1. Example 10: λ1 = 1000, µ1 = 1, λ2 = 100, µ2 = 1. Example 11: λ1 = 1000, µ1 = 1, λ2 = 1, µ2 = 1. Example 12:λ1 = 1000, µ1 = 1, λ2 = 1, µ2 = 1. Example 13: λ1 = 100, µ1 = 1, λ2 = 5, µ2 = 1. Example 14: λ1 = 100, µ1 = 1, λ2 = 5, µ2 = 1.

Page 4: Supplemental Document: Anisotropic Spherical Gaussianskun/asg/...ASG 1 ASG 2 approx. ref. ASG 1 ASG 2 approx. ref. Example 1 Example 2 Example 3 Example 4 Example 5 Example 6 Example

Inputs Results Inputs ResultsASG SG approx. ref. ASG SG approx. ref.

Exa

mpl

e1

Exa

mpl

e2

Exa

mpl

e3

Exa

mpl

e4

Exa

mpl

e5

Exa

mpl

e6

Exa

mpl

e7

Exa

mpl

e8

Exa

mpl

e9

Exa

mpl

e10

Exa

mpl

e11

Exa

mpl

e12

Exa

mpl

e13

Exa

mpl

e14

Figure 6: More Evaluations on ASG convolution operator. The bandwidth parameters of the ASG (λ and µ) and the SG (ν) in all examplesare listed below. Example 1: λ = 100, µ = 1, ν = 1. Example 2: λ = 100, µ = 1, ν = 10. Example 3: λ = 100, µ = 1, ν = 100.Example 4: λ = 40, µ = 1, ν = 1. Example 5: λ = 40, µ = 1, ν = 10. Example 6: λ = 20, µ = 1, ν = 10. Example 7: λ = 10, µ = 1,ν = 100. Example 8: λ = 40, µ = 10, ν = 1. Example 9: λ = 40, µ = 10, ν = 20. Example 10: λ = 40, µ = 10, ν = 100. Example11: λ = 100, µ = 10, ν = 100. Example 12: λ = 100, µ = 10, ν = 10. Example 13: λ = 100, µ = 20, ν = 50. Example 14: λ = 100,µ = 50, ν = 20.