<p>You're correct, we don't usually worry about pulling the inner product through a change of basis in graphics. As a practical matter, calculations that depend on angles and distances, such as lighting and shading, are always done in world space or in a space orthonormally related to it (e.g. camera space).</p>
<p>The place where non-orthonormal transformations show up is usually in local-to-world transforms of meshes—most frequently with skeletal animation, where things get deformed, or where bones are set up with non-orthonormal coordinates for rigging/animation reasons. However in those instances we are always bringing the vertices, normals, etc into world space or camera space to process. We neither push back the world inner product into the local spaces, nor do we want to pull a locally defined inner product into world space, as neither of those is really useful for the typical kinds of things we need to do.</p>
<p>(And for the normals, we <em>do</em> know how to use the inverse transpose matrix to transform those properly, thank goodness!)</p>
<p>The other big non-orthonormal transformation in graphics is the projection matrix, but again, we don't really ever want to use the inner product in post-projective space, so the issue doesn't really arise. We just keep all our inner product-ing in world space.</p>

CC BY-SA 4.0
2020-06-27T13:14:49.070Z
Correct me if I am wrong, but that means that the correct interpretation is that the models live in world space to begin with and are instead transformed ("deformed") with the `modelToWorld` matrix, instead of actually changing coordinate systems. As far as the normals go, I have no issue with that - they can be interpreted as covectors (up to a multiplicative factor) and thus do not require the metric tensor to lower the index.
lightxbulb
CC BY-SA 4.0
2020-06-27T15:56:23.063Z
I don't know if it makes sense to have a sharp semantic distinction between "transformations" and "changing coordinate basis". It very often makes sense to think of meshes, or individual triangles, etc as having local coordinates. We just avoid evaluating inner products in those coordinates.
Nathan Reed
CC BY-SA 4.0
2020-06-27T16:28:59.473Z
Coordinate system change implies that the metric tensor changes. If we go from a basis A to a basis B with a map F, then the metric tensor changes as: $g_{ij}' = \sum_{k,l}F^k_iF^l_jg_{kl}$, which affects how the inner product is computed in the new basis. Instead if we do not interpret this as acting on the basis, but rather only on the components of vectors (that is, the basis is preserved but points are translated, rotated, scaled), the inner product does not change (which seems to be the approach most often considered in CG).
lightxbulb
CC BY-SA 4.0
2020-06-27T06:28:30.160Z
2020-06-27T06:28:30.160Z
Nathan Reed
<p>Sometimes in CG literature a transformation is equated to a coordinate system change. This is fine as long as the transformation includes only a rotation and a translation. When scaling is involved, however, this seems like an incorrect interpretation. The problem is specifically with how lengths and angles are measured after the transformation. Angles and length are invariant to coordinate system change: <span class="math-container">$\langle a, b \rangle = \sum_{i,j}g_{ij}a^ib^j$</span>. In graphics, this is often substituted with the expression valid only for orthonormal bases: <span class="math-container">$\langle a, b \rangle = \sum_{i}a_ib^i$</span>, regardless of the supposed basis that <span class="math-container">$a,b$</span> are in (the index of <span class="math-container">$a$</span> is lowered as if the basis was orthonormal without involving the metric tensor). So while this makes sense as a transformation, I do not see how this is reconciled with the idea of a change of basis. Am I missing something, or is the interpretation wrong? (think of DX/GL's standard transformations between spaces in the rendering pipeline)</p>

<transformations>
Transformations and change of basis in CG
lightxbulb
# Transformations and change of basis in CG

(Asked by: username_0 on 2020-06-23)

Sometimes in CG literature a transformation is equated to a coordinate system change. This is fine as long as the transformation includes only a rotation and a translation. When scaling is involved, however, this seems like an incorrect interpretation. The problem is specifically with how lengths and angles are measured after the transformation. Angles and length are invariant to coordinate system change: $\langle a, b \rangle = \sum\_{i,j}g\_{ij}a^ib^j$. In graphics, this is often substituted with the expression valid only for orthonormal bases: $\langle a, b \rangle = \sum\_{i}a\_ib^i$, regardless of the supposed basis that $a,b$ are in (the index of $a$ is lowered as if the basis was orthonormal without involving the metric tensor). So while this makes sense as a transformation, I do not see how this is reconciled with the idea of a change of basis. Am I missing something, or is the interpretation wrong? (think of DX/GL's standard transformations between spaces in the rendering pipeline)

**Tags:** transformations


---

## 1 answers

### Answer by username_1 on 2020-06-27. Score: 2 | Accepted answer

You're correct, we don't usually worry about pulling the inner product through a change of basis in graphics. As a practical matter, calculations that depend on angles and distances, such as lighting and shading, are always done in world space or in a space orthonormally related to it (e.g. camera space).

The place where non-orthonormal transformations show up is usually in local-to-world transforms of meshes—most frequently with skeletal animation, where things get deformed, or where bones are set up with non-orthonormal coordinates for rigging/animation reasons. However in those instances we are always bringing the vertices, normals, etc into world space or camera space to process. We neither push back the world inner product into the local spaces, nor do we want to pull a locally defined inner product into world space, as neither of those is really useful for the typical kinds of things we need to do.

(And for the normals, we *do* know how to use the inverse transpose matrix to transform those properly, thank goodness!)

The other big non-orthonormal transformation in graphics is the projection matrix, but again, we don't really ever want to use the inner product in post-projective space, so the issue doesn't really arise. We just keep all our inner product-ing in world space.

> **Comments:**
> **username_0**: Correct me if I am wrong, but that means that the correct interpretation is that the models live in world space to begin with and are instead transformed ("deformed") with the `modelToWorld` matrix, instead of actually changing coordinate systems. As far as the normals go, I have no issue with that - they can be interpreted as covectors (up to a multiplicative factor) and thus do not require the metric tensor to lower the index.  
> **username_1**: I don't know if it makes sense to have a sharp semantic distinction between "transformations" and "changing coordinate basis". It very often makes sense to think of meshes, or individual triangles, etc as having local coordinates. We just avoid evaluating inner products in those coordinates.  
> **username_0**: Coordinate system change implies that the metric tensor changes. If we go from a basis A to a basis B with a map F, then the metric tensor changes as: $g_{ij}' = \sum_{k,l}F^k_iF^l_jg_{kl}$, which affects how the inner product is computed in the new basis. Instead if we do not interpret this as acting on the basis, but rather only on the components of vectors (that is, the basis is preserved but points are translated, rotated, scaled), the inner product does not change (which seems to be the approach most often considered in CG).  

---

