Normal Transformation

Background

This was a question from a Canva interview. My day-to-day work mainly involves generative models, so I lacked experience with transforming a model's intrinsic normals and could not answer it.

It seems my day-to-day work has not exposed me to a broad enough range of techniques.

Proof

A normal n\mathbf{n} is orthogonal to every tangent t\mathbf{t}:

n⋅t=0\mathbf{n} \cdot \mathbf{t} = 0

Suppose the model undergoes a transformation M\mathbf{M}:

t′=Mt\begin{aligned} \mathbf{t}^{\prime} &= \mathbf{M} \mathbf{t} \end{aligned}

We need to find a normal transformation N\mathbf{N} such that

(Nn)TMt=0nTNTMt=0\begin{aligned} (\mathbf{N} \mathbf{n})^{T}\mathbf{M} \mathbf{t} &= 0\\ \mathbf{n}^{T} \mathbf{N}^{T} \mathbf{M} \mathbf{t} &= 0 \end{aligned}

Since nTt=0\mathbf{n}^{T} \mathbf{t} = 0, a sufficient condition for this equation to hold identically is

NTM=EN=(M−1)T\begin{aligned} \mathbf{N}^{T} \mathbf{M} &= \mathbf{E} \\ \mathbf{N} &= (\mathbf{M}^{-1})^T \end{aligned}

In other words, if a model is transformed by M\mathbf{M}, its normals must be transformed by (M−1)T(\mathbf{M^{-1}})^{T}.