[Script Info]
Title:
[Events]
Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
Dialogue: 0,0:00:00.25,0:00:03.34,Default,,0000,0000,0000,,Once you start looking under the hood, you'll get some sense of the lay of the
Dialogue: 0,0:00:03.34,0:00:06.77,Default,,0000,0000,0000,,land with matrices and how they relate to transforms. Here's a map of the sort
Dialogue: 0,0:00:06.77,0:00:11.25,Default,,0000,0000,0000,,of things you'll find. The upper left area of the matrix is where rotations and
Dialogue: 0,0:00:11.25,0:00:15.96,Default,,0000,0000,0000,,scales show up. If a transform changes only this area of the matrix, it's called
Dialogue: 0,0:00:15.96,0:00:19.98,Default,,0000,0000,0000,,a linear transformation. I'm not going to spend time on the formal definition of
Dialogue: 0,0:00:19.98,0:00:24.21,Default,,0000,0000,0000,,this term. The additional course materials include resources for more on the
Dialogue: 0,0:00:24.21,0:00:28.01,Default,,0000,0000,0000,,underlying math. The definition is fairly basic stuff about how addition and
Dialogue: 0,0:00:28.01,0:00:31.89,Default,,0000,0000,0000,,multiplication are preserved. But doesn't have much effect on how we actually do
Dialogue: 0,0:00:31.89,0:00:36.06,Default,,0000,0000,0000,,computer graphics. The upper right is where the translations accumulate. These
Dialogue: 0,0:00:36.06,0:00:39.54,Default,,0000,0000,0000,,translation values will get effected by multiplication with other matrices of
Dialogue: 0,0:00:39.54,0:00:43.90,Default,,0000,0000,0000,,course. Translations only effect points since vectors have zero for their fourth
Dialogue: 0,0:00:43.90,0:00:49.01,Default,,0000,0000,0000,,coordinate. 3JS provides a function called decompose to extract the translation,
Dialogue: 0,0:00:49.01,0:00:53.87,Default,,0000,0000,0000,,rotation and scale factors from a matrix. The translation and scale factors come
Dialogue: 0,0:00:53.87,0:00:58.56,Default,,0000,0000,0000,,back as vectors, as you might expect. The rotation comes back as a quaternion.
Dialogue: 0,0:00:58.56,0:01:02.87,Default,,0000,0000,0000,,Something we'll talk about when we get to animation. The short version is that a
Dialogue: 0,0:01:02.87,0:01:07.12,Default,,0000,0000,0000,,quaternion is a compact way to store the axis and angle of rotation for a
Dialogue: 0,0:01:07.12,0:01:11.71,Default,,0000,0000,0000,,rotation matrix. One useful property quarternions have is that you can easily
Dialogue: 0,0:01:11.71,0:01:15.86,Default,,0000,0000,0000,,interpolate between them, which is useful for interpolating between two
Dialogue: 0,0:01:15.86,0:01:20.10,Default,,0000,0000,0000,,different orientation. Notice that the bottom row is always 0, 0, 0 1. The
Dialogue: 0,0:01:20.10,0:01:24.60,Default,,0000,0000,0000,,transforms we covered here are called affine transforms. Parallel lines stay
Dialogue: 0,0:01:24.60,0:01:29.70,Default,,0000,0000,0000,,parallel when an affine transform is applied. In modeling you'll essentially
Dialogue: 0,0:01:29.70,0:01:34.30,Default,,0000,0000,0000,,always use affine transforms. So we never change this last row. Since GPUs are
Dialogue: 0,0:01:34.30,0:01:39.10,Default,,0000,0000,0000,,tuned to use four by four matrices Most of us just use four by fours everywhere
Dialogue: 0,0:01:39.10,0:01:43.58,Default,,0000,0000,0000,,for simplicites sake. When we discuss perspective cameras, we'll set the values
Dialogue: 0,0:01:43.58,0:01:48.23,Default,,0000,0000,0000,,in this last row. We'll then be using a projective transform. With affine
Dialogue: 0,0:01:48.23,0:01:52.52,Default,,0000,0000,0000,,transforms, when a points coordinates are multipied by the matrix. The fourth
Dialogue: 0,0:01:52.52,0:01:56.45,Default,,0000,0000,0000,,coordinate starts out as one and ends up as one. This last row in a projection
Dialogue: 0,0:01:56.45,0:02:00.32,Default,,0000,0000,0000,,matrix modifies that fourth coordinate to be something other than one. What that
Dialogue: 0,0:02:00.32,0:02:03.62,Default,,0000,0000,0000,,means is something we'll leave til a later lesson.