Skip to content

Commit 3844eba

Browse files
committed
add notes 1 ~ 8
1 parent ea01013 commit 3844eba

19 files changed

+458
-432
lines changed

GAMES101_Lecture_16.pdf

12.5 MB
Binary file not shown.

Notes.md

Lines changed: 0 additions & 420 deletions
Large diffs are not rendered by default.

Notes1.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[主办方主页](http://games-cn.org/)
2+
[课程主页](https://sites.cs.ucsb.edu/~lingqi/teaching/games101.html)
3+
[PPT](http://games-cn.org/graphics-intro-ppt-video/)
4+
5+
# Lecture01
6+
7+
图形学的应用
8+
- VideoGames
9+
- Movies
10+
- Animations
11+
- Design
12+
- Visualization
13+
- Virtual Reality
14+
- Agumented Reality
15+
- Digital Illustration
16+
- Simulation

Notes10.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Lecture 10
1+
# Lecture 10 Geometry 1
22

33
## 一些经典模型
44
犹他茶壶

Notes11.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Lecture 11
1+
# Lecture 11 Geometry 2
22

33
显式几何表示方式: 三角形顶点, 贝塞尔曲面, 细分曲面, 非均匀有理B样条(NURBS), 点云,
44

Notes12.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Lecture 12 Gemometry3
1+
# Lecture 12 Gemometry 3
22

33
## Mesh Process
44
![image](https://raw.githubusercontent.com/lumixraku/NotesForGraphics/master/images/mesh1.png)

Notes15.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ PS: 仍然是微积分的思想, 把之前离散的取值(x=1, 2, 3 ..)
140140

141141
![image](https://raw.githubusercontent.com/lumixraku/NotesForGraphics/master/images/propability2.jpg)
142142

143+
如同离散随机变量所有概率的和等于1 一样, 连续随机变量的积分最终结果就是1
143144

144145
# Read More
145146

@@ -150,7 +151,7 @@ https://blog.csdn.net/anx8282/article/details/101860444?utm_medium=distribute.pc
150151

151152
https://www.cnblogs.com/mengdd/p/3237991.html
152153

153-
PDF 概率密度函数
154+
154155

155156

156157
## (Radiance versus irradiance

Notes16.md

Lines changed: 43 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,57 @@
1-
# Lecture 16 Ray tracing 4
1+
# Lecture 16 Ray tracing 4 Monte Carlo Path Tracing 蒙特卡洛路径追踪
22

33
# Monte Carlo Intergration 蒙特卡洛积分
44

5+
蒙特卡罗是为了解决定积分的问题
6+
7+
之前大学数学中学的求定积分的方法, 是先求出原函数再带入值. 对于一些复杂的函数是没有办法求到原函数的, 怎么办呢?
8+
59
## 黎曼积分
6-
黎曼积分(Riemann Integral),也就是所说的正常积分、定积分。 面积可以表达为无数条细长的长方体的和.
10+
Riemann Integral,黎曼积分的核心思想就是试图通过无限逼近来确定这个积分值. 把积分区域分割为无数个细长的条.
11+
12+
## 蒙特卡罗积分
13+
目的: 求定积分 蒙特卡洛则是在积分区域内不断的采样, 采样很多次, 最后求平均值, 也就是面积.
14+
15+
![image](https://raw.githubusercontent.com/lumixraku/NotesForGraphics/master/images/monte.jpg)
16+
17+
PS: 这里的 N 是采样次数 N越大, 得到的结果越准
718

8-
蒙特卡洛则是在积分区域内不断的采样, 最后求面积.
19+
PS: 蒙特卡罗适合任何形式的积分.
920

10-
目的: 求定积分
1121

12-
# Path tracing
22+
# Path tracing 路径追踪
23+
24+
和之前的 Ray Tracing 有什么不同呢?
1325

1426
## whitted style raytracing.
15-
不断的弹射光线 在任何弹射的位置和光源连接一条线
27+
28+
这种ray tracing 的特点是
29+
1630
- 当光线到光滑物体表面 沿着镜面方向反射 OR 折射方向折射
1731
- 打到漫反射物体, 光线就停住
1832

33+
问题1 whitted形式的ray tracing 对于完全镜面的材质是OK的, 但是对于 glossy 材质的物体则有问题.
34+
35+
![image](https://raw.githubusercontent.com/lumixraku/NotesForGraphics/master/images/whittedProblem.jpg)
36+
37+
38+
39+
```
40+
什么是 glossy
1941
2042
一般把完全镜面叫做 specular (mirror reflection)
21-
没有镜面那么光滑(金属材质) glossy
43+
44+
没有镜面那么光滑(金属材质) glossy
45+
46+
```
47+
48+
问题2 同样, 对于漫反射, 其实也没有停下来, 光线还是会存在弹射, 反射到不同的方向上.
49+
50+
![image](https://raw.githubusercontent.com/lumixraku/NotesForGraphics/master/images/whittedProblem2.jpg)
51+
52+
满发射和漫反射之间的情况就没有考虑到.
53+
54+
55+
56+
# Read More
57+
关于蒙特卡罗积分的详细介绍 [Wyman的博客](https://www.qiujiawei.com/monte-carlo/)

Notes2.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
2+
# Lecture02
3+
4+
## 点乘
5+
点积是数量积
6+
7+
![image](https://raw.githubusercontent.com/lumixraku/NotesForGraphics/master/images/dot1.jpg)
8+
```
9+
A·B = |A| |B| cos(θ).
10+
|A| cos(θ)是A到B的投影
11+
12+
```
13+
满足交换律和结合律
14+
15+
点乘的笛卡尔坐标系(直角坐标系)表示形式
16+
17+
![image](https://raw.githubusercontent.com/lumixraku/NotesForGraphics/master/images/dot2.jpg)
18+
19+
20+
### 点乘的几何运用
21+
- Find angle between two vectors
22+
- Finding projection of one vector on another (向量分解)
23+
24+
![image](https://raw.githubusercontent.com/lumixraku/NotesForGraphics/master/images/dot4.jpg)
25+
26+
向量 b 在a上的投影 b’ 其方向和a 相同
27+
在得到b’ 后球另一个向量就容易了
28+
29+
### 点乘在图形中的运用
30+
- 向量方向的接近程度
31+
- 向量分解
32+
- 方向是否相反(根据点乘的结果是否大于0)
33+
34+
35+
36+
37+
## 叉乘
38+
- 叉乘的结果是一个向量, 且和两个向量正交(垂直)
39+
- 右手坐标系 右手螺旋定则 x 叉乘 y = z
40+
- (如果是左手坐标系 x 叉乘 y 得到 -z 叉乘就是应用右手螺旋定则)
41+
42+
### 叉乘的笛卡尔方程表示形式
43+
44+
第二种是叉乘表示成矩阵形式
45+
46+
![image](https://raw.githubusercontent.com/lumixraku/NotesForGraphics/master/images/cross1.jpg)
47+
48+
叉乘没有交换律 但是有结合律
49+
50+
51+
52+
### 叉乘在图形中的应用
53+
- 判定左右 (同一个起点的两个向量 如何判定谁在谁的左侧 a 叉乘 b 得到的结果z 是正 那么 b 在 a 的左侧)
54+
- 判定内外
55+
56+
57+
58+
## 矩阵
59+
点乘 叉乘的矩阵表示形式
60+
61+
![image](https://raw.githubusercontent.com/lumixraku/NotesForGraphics/master/images/matrix.jpg)
62+
63+
矩阵乘法没有交换律 但是有结合律分配律
64+
- 结合律: (λμ)A=λ(μA) ; (λ+μ)A =λA+μA. A(BC) = (AB)C
65+
- 分配律: λ (A+B)=λA+λB. A(B+C) = AB + AC
66+
67+
转置
68+
(AB)' = B'A'
69+
(A + B)' = A' + B'
70+
71+
72+
(AB)" = B"A" (暂时用" 表示 -1)
73+
AA" = I

Notes3.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
2+
# Lecture03 Transformation
3+
## 线性变换
4+
- Scale
5+
- Reflection Matrix
6+
- Shear Matrix
7+
- Rotation Matrix
8+
9+
旋转矩阵的推导
10+
11+
先考虑特殊点 (1, 0) 可以得到 A 和 C 之后在考虑特殊点(0, 1) 可以推算到 B D
12+
13+
![image](https://raw.githubusercontent.com/lumixraku/NotesForGraphics/master/images/rotate1.jpg)
14+
15+
## 齐次坐标
16+
17+
18+
![image](https://raw.githubusercontent.com/lumixraku/NotesForGraphics/master/images/homo.jpg)
19+
20+
![image](https://raw.githubusercontent.com/lumixraku/NotesForGraphics/master/images/homo1.jpg)
21+
22+
考虑到 ponit + point 的运算(这样w 分量就是2了), 于是又扩展了齐次坐标的定义
23+
24+
![image](https://raw.githubusercontent.com/lumixraku/NotesForGraphics/master/images/homo2.jpg)
25+
26+
## 2D变换的总结
27+
“仿射变换”就是:“线性变换”+“平移”
28+
29+
![image](https://raw.githubusercontent.com/lumixraku/NotesForGraphics/master/images/trans.jpg)
30+
31+
变换的顺序
32+
33+
下面表示最先做 A1 变换, 再做 A2 变换 ...最后到An
34+
35+
![image](https://raw.githubusercontent.com/lumixraku/NotesForGraphics/master/images/trans2.jpg)

Notes4.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Lecture04 Transformation Part II
2+
3+
## 3D 变换
4+
5+
6+
![image](https://raw.githubusercontent.com/lumixraku/NotesForGraphics/master/images/rotate3d.jpg)
7+
8+
PS 需要说明的是 这个3D变换是针对右手坐标系 左手坐标系的很多值和这里完全相反
9+
10+
## view transformation
11+
- view camera transformation
12+
- projection transformation
13+
- 正交投影
14+
- 透视投影
15+
16+
## view/camera transformation 视图变换 (也被称为 modelview transformation )
17+
定义相机的 pos lookat up direction (前两个已经可以定义出相机镜头方向 up direction 就是镜头的旋转情况)
18+
为了方便计算, 先让相机放在原点 看向 -z 的方向, up 方向是 y 的正方向 (相机所拍的物体跟着相机一起运动 这样相机所拍的场景和移动之前都是一样的)
19+
20+
![image](https://raw.githubusercontent.com/lumixraku/NotesForGraphics/master/images/view.jpg)
21+
22+
因此要做下面的旋转
23+
24+
![image](https://raw.githubusercontent.com/lumixraku/NotesForGraphics/master/images/view1.jpg)
25+
26+
PS 旋转矩阵是正交矩阵
27+
28+
29+
## 投影变换
30+
### 正交投影
31+
视锥体缩放到 [-1, 1] 的立方体中
32+
33+
![image](https://raw.githubusercontent.com/lumixraku/NotesForGraphics/master/images/project.jpg)
34+
35+
先平移到原点 再缩放到标准立方体
36+
37+
### 透视投影
38+
39+
![image](https://raw.githubusercontent.com/lumixraku/NotesForGraphics/master/images/project2.jpg)
40+
41+
![image](https://raw.githubusercontent.com/lumixraku/NotesForGraphics/master/images/project3.jpg)

Notes5.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Lecture 05 Rasterization 光栅化
2+
3+
Part I Triangle
4+
5+
6+
FOV
7+
![image](https://raw.githubusercontent.com/lumixraku/NotesForGraphics/master/images/fov.jpg)
8+
9+
这个图中红色的角度 垂直可视角度
10+
广角就是 FOV 比较大
11+
12+
![image](https://raw.githubusercontent.com/lumixraku/NotesForGraphics/master/images/fov2.jpg)
13+
14+
n 表示近平面
15+
16+
## 视椎体到屏幕 (After MVP)
17+
在得到了标准视椎体之后就需要投射到屏幕上
18+
19+
![image](https://raw.githubusercontent.com/lumixraku/NotesForGraphics/master/images/screen.jpg)
20+
21+
## 光栅化
22+
23+
通过采样来做光栅化
24+
25+
采样是把函数离散化过程
26+
27+
28+
三角形定义 (+0.5 就是中心)
29+
30+
![image](https://raw.githubusercontent.com/lumixraku/NotesForGraphics/master/images/inside1.jpg)
31+
32+
光栅化的时候需要判断点是否在三角形内
33+
34+
![image](https://raw.githubusercontent.com/lumixraku/NotesForGraphics/master/images/inside.jpg)
35+
判断 Q 点是否在各个边的左侧 (P1P1叉乘 P1Q 是否是y轴正方向 然后 P2P0 叉乘 P2Q ... 最后P0P1 逆时针 )
36+
37+
更快的三角形内点的一种方式
38+
39+
![image](https://raw.githubusercontent.com/lumixraku/NotesForGraphics/master/images/inside2.jpg)
40+
41+
每一行都找出边界的点(先找最左边 再找最右边)

0 commit comments

Comments
 (0)