Realtime Rendering 1.1

1、A linear transform is one that preserves vector addition and scalar multiplication. Specifically,

  

2、Combining linear transforms and translations can be done using an affine transform.

  An affine transform is one that performs a linear transform and then a translation.

  The main characteristic of an affine matrix is that it preserves the parallelism of lines, but not necessarily lengths and angles.

  仿射变换保留了平行性,而没保留长度、角度特性。

3、All rotation matrices have a determinant of one and are orthogonal ,  the determinant of a rotation matrix is always one, since the matrix is orthogonal.

  旋转不会改变正交矩阵的三个正交基,所以旋转矩阵还是正交矩阵。

  

4、绕某点旋转。

  

  

5、This order change can cause incorrect lighting and backface culling to occur. To detect whether a given matrix reflects in some manner, compute the determinant of the upper left 3 × 3 elements of the matrix. If the value is negative, the matrix is reflective.

6、绕某个单位向量缩放。

  Assume that scaling should be done along the axes of the orthonormal, right-oriented vectors fx, f y, and f z.

  First, construct the matrix F as below:

    

    

7、There are six basic shearing matrices,3 and they are denoted Hxy(s), Hxz(s), Hyx(s), Hyz(s), Hzx(s), and Hzy(s). The first subscript is used to denote which coordinate is being changed by the shear matrix, while the second subscript indicates the coordinate which does the shearing.

  第一个下标指明被改变的坐标轴。

  比如 Hxz(s):

  

8、H′ij(s, t) = Hik(s)Hjk(t)。 Finally, it should be noted that since the determinant of any shear matrix |H| = 1, this is a volume preserving transformation.

  

9、变换的顺序非常重要,不同的顺序会导致不同的结果。

  

  通常的旋转顺序是:

    

10、a transform, consisting of concatenations of only translations and rotations, is called a rigid-body transform and has the characteristic of preserving lengths, angles, and handedness.

  

  The inverse of X is computed as X−1 = (T(t)R)−1 = R−1T(t)−1 = RTT(−t).  

  Thus, to compute the inverse, the upper left 3 ×3 matrix of R is transposed, and the translation values of T change sign.

11、法线不能用 Model 矩阵进行变换。比如下图:

  

  The proper method transform normal is to use the transpose of the matrix’s adjoint.  The traditional answer for transforming the normal is that the transpose of the inverse is computed [1277]. This method normally works. The full inverse is not necessary, however, and occasionally cannot be created. The inverse is the adjoint divided by the original matrix’s determinant. If this determinant is zero, the matrix is singular, and the inverse does not exist.

  转换法线只要 3x3 矩阵就够了,因为法线没有 translate。

12、旋转。

  

  interpolation between one set and another is not a simple matter,  two different sets of Euler angles can give the same orientation, so any interpolation should not rotate the object at all. 

13、旋转矩阵

  

  

  观察  4.20 可以发现:

  

  最终可以得到如下公式:

  

14、Matrix Decomposition,The task of retrieving various transforms from a concatenated matrix is called matrix decomposition.

  We have already presented two decompositions, those of deriving the translation and rotation matrix for a rigid-body transformation (see Section 4.1.6) and deriving the Euler angles from an orthogonal matrix (Section 4.2.2).

  It is trivial to retrieve the translation matrix, as we simply need the elements in the last column of the 4×4 matrix.

  We can also determine if a reflection has occurred by checking whether the determinant of the matrix is negative.

15、绕任意轴旋转。

  

16、根据给定r,计算出basis:r,s,t。

  find the smallest component (in absolute value) of r, and set it to 0. Swap the two remaining components, and then negate the first9 of these.

  选出绝对值最小的轴,将其置0。再将剩余两轴交换,将左起第一个非零值置为负。

  

  This matrix transforms the vector r into the x-axis (ex), s into the y-axis, and t into the z-axis.  the final transform for rotating α radians around the normalized vector r is then.

  

  

  Goldman公式:

  

17、 For every 3 × 3 rotation matrix,1 R, that rotates φ radians around any axis, the trace (see page 898 for a definition) is constant independent of the axis.

  

18、四元数的逆。

  

  

  

共轭复数有些有趣的性质:
  
  
 

  

  

  

  

19、单位四元数可以写成下面这样。

  

  

  

20、Put the four coordinates of a point or vector p = (px py pz pw)T into the components of a quaternion ˆp, and assume that we have a unit quaternion ˆq = (sinφuq, cos φ).

  

  rotates ˆp (and thus the point p) around the axis uq by an angle . Note that since ˆq is a unit quaternion, ˆq−1 = ˆq∗. This rotation, which clearly can be used to rotate around any axis

  ˆq and −ˆq represent the same rotation. That is, negating the axis, uq, and the real part, qw, creates a quaternion that rotates exactly as the original quaternion does.

  Given two unit quaternions, ˆq and ˆr, the concatenation of first applying ˆq and then ˆr to a quaternion, ˆp (which can be interpreted as a point p), is given by Equation 4.41:

  

21、A quaternion, ˆq, can be converted into a matrix Mq. (书上并未给出此公式的推导过程,而是直接给出此公式)

  

  Here, the scalar is s = 2/n(ˆq). For unit quaternions, this simplifies to:

  

  由 4.44 + 4.45 可以从M推导出四元数4.46:

  

  

  令  t = q2w −q2x −q2y −q2,可以得到避免除法的公式:

  

22、The algebraic form of Spherical linear interpolation:

  

  However, for software implementations, the following form, where slerp stands for spherical linear interpolation, is much more appropriate:

  

  

  

  The slerp function is perfectly suited for interpolating between two orientations and it behaves well (fixed axis, constant speed). This is not the case with when interpolating using several Euler angles.

23、 球面样条插值。Squad。 

  introduce quaternions ˆai and ˆai+1 between ˆqi and ˆqi+1.

  

  

24、After some algebraic and trigonometric simplification of Equation 4.43,the rotation matrix becomes [893]:

  

  In this equation, we have used the following intermediate calculations:

  

   As can be seen, all square roots and trigonometric functions have disappeared due to the simplifications, and so this is an efficient way to create the matrix.

25、Vertex Blending

  the entire mesh is often called a skin.

  p is the original vertex, and u(t) is the transformed vertex whose position depends on the time t. There are n bones influencing the position of p, which is expressed in world coordinates.  The matrix Mi transforms from the initial bone’s coordinate system to world coordinates. Typically a bone has its controlling joint at the origin of its coordinate system. The Bi(t) matrix is the ith bone’s world transform that changes with time to animate the object,

  

  the final location is interpolated from the set of computed points. The matrix Mi is not explicitly shown in some discussions of skinning, but rather is considered as being a part of Bi(t).

  the transformed point u will lie in the convex hull of the set of points Bi(t)M−1 i p, for all i = 0. . .n − 1 (fixed t).

26、Morphin(Vertex Morphing):混合顶点

  Morph targets:基Model + Diff。如下图:

  

  

  Skinning、Morph Target 一起使用可以达到非常好的效果。

  

  

27、正交矩阵的推导。

  

  

  下面的矩阵用于在左右坐标系间切换:

     

  DX中z值范围是[0,1],OpenGL中z值范围为[-1,1],可能通过以下矩阵来转换:

      

28、透视投影推导

    

    

    

29、透视投影中 z 值是非线性的。

  One effect of using a perspective transformation is that the computed depth value does not vary linearly with the input pz value. For example, if n′ = 10 and f′ = 110 (using the OpenGL terminology), when pz is 60 units down the negative z-axis (i.e., the halfway point) the normalized device coordinate depth value is 0.833, not 0.

  

  

  

  

Realtime Rendering 1.1的更多相关文章

  1. Rendering pipeline overview(读书笔记1 --- Real-Time rendering)

    1. Rendering pipeline的作用就是在给定的虚拟相机.三维物体.光源.着色方程式.纹理等的条件下产生(渲染)二维图像 2. pipeline包含很多个stage,其效率由最慢的stag ...

  2. Realtime Rendering 6

    [Realtime Rendering 6] 1.Lighting computations occur in two phases: 1)light phase. used to compute t ...

  3. Realtime Rendering 5

    [Real Time Rendering 5] 1.In radiometry, the function that is used to describe how a surface reflect ...

  4. 画面渲染:实时渲染(Real-time Rendering)、离线渲染(Offline Rendering)[转]

    实时渲染(Real-time Rendering) 实时渲染的本质就是图形数据的实时计算和输出.最典型的图形数据源是顶点.顶点包括了位置.法向.颜色.纹理坐标.顶点的权重等.在第一代渲染技术中(198 ...

  5. Real-Time Rendering (2) - 变换和矩阵(Transforms and Matrics)

    http://blog.csdn.net/silangquan/article/details/9970673 提要 在图形的计算中,比如旋转.缩放.平移.投影等操作,矩阵都扮演着极其重要的角色,它是 ...

  6. 基本变换(读书笔记5 --- Real-Time rendering)

    刚体变换 即变换不改变了被变换顶点之间的距离,以及偏手性(不会让左右手坐标系颠倒). 下面的平移变换.旋转变换即属于刚体变换 平移 从一个位置变到另一个位置可以用平移矩阵T来表示,这个矩阵将一个实体变 ...

  7. Shaders(读书笔记4 --- Real-Time rendering)

    1. vertex,pixel以及geometry shaders共享一个programming model,即common-shader core,在GPU架构中的unified shader可以和 ...

  8. Rasterizer Stage(读书笔记3 --- Real-Time rendering)

    rasterizer stage的目标:计算和设置每个像素的颜色.将屏幕空间的二维顶点和每个顶点的shading信息转换为屏幕上的像素. rasterizer stage可以分为几个阶段:triang ...

  9. Geometry Stage in Rendering pipeline (读书笔记2 --- Real-Time rendering)

    Geometry Stage一般包含下面几个阶段 1. Model & View Transform(模型和视图变换) --- 模型空间--> 世界空间 模型变换:每个模型经过模型变换来 ...

随机推荐

  1. day4----函数-闭包-装饰器

    本文档内容: 1 python中三种名称空间和作用域 2 函数的使用 3 闭包 4 装饰器 一 python中三种名称空间和作用域 1.1名称空间: 当程序运行时,代码从上至下依次执行,它会将变量与值 ...

  2. python:获取访问访问时的响应时间

    import time import os from datetime import datetime from selenium import webdriver from selenium.web ...

  3. VideoView播放视频——Android

    Android为开发人员提供了一种简单的播放视频媒体的方式,那就是VideoView,本篇博客就来讲讲VideoView如何播放视频,最后将以一个简单的Demo演示. VideoView VideoV ...

  4. asp.net在配置文件里设置多种编码方式的研究

    我们在做asp.net的程序时,在根目录下肯定会有一个web.config的文件, 有点开发经验的可能都知道,它是配置程序的全局信息的地方, 当然了,也可以在这里做更多的事情,下面我们来研究一下 ,如 ...

  5. swfupload文件上传配置文件大小

    在配置文件中加入: <system.web>         <httpRuntime executionTimeout="36000" maxRequestLe ...

  6. web 在线聊天的基本实现

    参考:https://www.cnblogs.com/guoke-jsp/p/6047496.html

  7. 静态方法@staticmethod

    staticmethod 返回函数的静态方法.该方法不强制要求传递参数,名义上在类里面归类管理,但是不能使用类的变量和实例的变量是类的工具包 如下声明一个静态方法: class Room: t = 1 ...

  8. Redis set 数据类型

    sadd() smembers sinter:返回集合的交集 sinterstroe:返回交集结果 sunion :去并集 sunionstore  取得并集 smove 从一个set集合移动到另一个 ...

  9. 20165304学习基础和C语言基础调查

    20165304学习基础和C语言基础调查 你有什么技能比大多人(超过90%以上)更好? 我觉得自己应该算是一个比较宅的人,因为在高中的时候我在外边租房子住,我爸妈都去上班,平时就只有我自己,当然只能自 ...

  10. day10-连接mysql虚拟机报错

    连接mysql时报:message from server: "Host '192.168.76.1' is not allowed to connect to this MySQL ser ...