2
$\begingroup$

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)

$\endgroup$
2
$\begingroup$

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.

$\endgroup$
3
  • $\begingroup$ 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. $\endgroup$
    – lightxbulb
    Jun 27 '20 at 13:14
  • $\begingroup$ 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. $\endgroup$ Jun 27 '20 at 15:56
  • $\begingroup$ 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). $\endgroup$
    – lightxbulb
    Jun 27 '20 at 16:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.