My recent paper builds on this Linearly Transformed Cosines paper by Eric Heitz. Infact, this was a collaboration with Eric himself! Linearly Tranformed Cosines or LTCs are a transformation of the rendering integral under specific assumptions, which lead to analytic solutions of it. One of the outcomes of my new work was the relaxation of the isotropic assumption of LTCs, allowing the use of anisotropic BRDFs.

Although I have read the original paper countless times and worked on an extension of it, I still was puzzled by the LTC jacobian derivation given in the appendix of the original paper:


Figure 1: LTC jacobian derivation from the original paper.


The derivation must be pretty obvious to a lot of people but to me it wasn’t so. This post is an attempt to give a detailed and intuitive derivation of this expression (Eq. 18 above). Why is this important? Well, in my view small details like these expand your horizon, and you can only hope to get new ideas if you throughly understand what’s already out there. Also, its always fun to understand things from a mathematical perspective, even if you are a intuitive-first person like I am.

I would like to note that figures in this post have been directly taken from the original paper.


Definitions

Its best if you have read and are confortable with Eric’s original paper. However, I am still defining things here to ensure consistency.

Direction vectors on the unit sphere are given by ω=(x,y,z). Do(ωo) is the source (clamped cosine) distribution. D(ω) is the target (~ GGX BRDF) distribution. Given an LTC matrix M, the direction vectors ω of D are obtained by from the direction vectors ωo of Do by:

ω=Mωo||Mωo||.

The magnitude at the transformed direction is given by:

D(ω)=Do(ωo)ωoω.

Here, ωoω is the determinant of jacobian of the transformation (which is frequently referred to as just the jacobian). This is what we will derive in this post.

Another thing we will find useful is the solid angle subtended by a small facet having area A, which is given by:

ω=A(r^n^)r2,

where ω is a small solid angle, r^ is the normalized position vector of the facet, n^ is the surface normal of the facet and r2 is the distance to the facet.

Finally, we will find use of the cross product under linear transforms property:

Mω1×Mω2=|M|MT(ω1×ω2)=|M|MTωo


Derivation

First things first. Note that D and Do are distributions in 2D, although they appear to be distributions in 3D. To see why, note that these are distributions on the unit sphere. Hence, we can write ω=(sinθcosϕ,sinθsinϕ,cosθ), in turn making D and Do dependent on only θ,ϕ (thus two dimensional).

From the definition of jacobian determinants, ωoω measures how a differential area around ωo changes. Since this differential area in on the unit sphere, it is basically the solid angle. The LTC jacobian thus measures change in solid angle under the LTC transform.

Our problem now boils down to determining how a differential solid angle changes under M.

Let’s take the differential solid angle ωo in Do. Since this is small enough, it can also be considered as a planar facet. Now, define two vectors ω1,ω2, which together with ωo form an orthonormal basis. (Figure 2, left)

Figure 2: Left: Orthonormal basis in Do; Right: The same basis transformed by M.


Transforming these vectors by LTC M results in a new set of vectors (Figure 2, right). The area of the facet ωo is now changed to ωoA, where A is the area of parallelogram defined by vectors Mω1 and Mω2.

A subtelty you may want to note, is that in Figure 2 left, the area of the parallelogram given by ω1 and ω2 is 1, thus the differential area is only ωo. This changes in Figure 2 right, since the area of the parallelogram is not 1 anymore, and thus the differential area is ωoA.

Alright! Now how about the differential solid angle ω after the LTC transform? Its essentialy the solid angle subtended by a small facet! We know this directly (see definitions section):

ω=ωoA(r^n^)r2.

The terms r^,n^ and A are simple to define in this case.

The area is A=Mω1×Mω2, which is a standard formula.

The unit position vector is r^=MωoMωo (the division just normalizes since r^ is a unit vector).

And finally, the normal vector is n^=Mω1×Mω2Mω1×Mω2 (again, division for normalization).

Lets first simplify the dot product r^n^ by plugging in the above definitions:

r^n^=(MωoMωo)TMω1×Mω2Mω1×Mω2

Using coss product under linear transforms property:

r^n^=(Mωo)TMωo|M|MTωoMω1×Mω2       =|M|(Mωo)TMTωoMωoMω1×Mω2

Using the fact that (Mωo)T=ωoTMT:

      =|M|ωoTMTMTωoMωoMω1×Mω2       =|M|ωoTωoMωoMω1×Mω2

ωoTωo is equal to 1, since ωo is a unit vector.

r^n^=|M|MωoMω1×Mω2

Finally, substitue into and simplify the expression for ω:

ω=ωoA(r^n^)r2 ωωo=A(r^n^)r2 ωωo=Mω1×Mω2Mωo2|M|MωoMω1×Mω2 ωωo=|M|Mωo3.

This is what we are looking for! :smile:


Conclusion

This is a pretty intuitive proof, given that you think and go about it the right way. Hope this post helps some of you in your own research journey!