当前位置:网站首页>[TA frost wolf \u may- hundred talents plan] 1.2.3 MVP matrix operation
[TA frost wolf \u may- hundred talents plan] 1.2.3 MVP matrix operation
2022-07-01 03:47:00 【zczplus】
【TA- Frost Wolf _may-《 Hundred people plan 》】1.2.2 Matrix computing
1.2.3 MVP Matrix computing
1.2.3.1 Learning goals
- take 3D The object is transformed into 2D Plane
- Prepare for the use of various spaces
1.2.3.2 MVP Definition of matrix
MVP The matrices are :
- Model Model
- View Observe
- Projection Projection
Five coordinates :
Vertex coordinates start in local space (Local Space), This is called local coordinates (Local Coordinate), It will then change to world coordinates (World Coordinate), Observation coordinate (View Coordinate), Cut coordinates (Clip Coordinate), And finally in screen coordinates (Screen Coordinate) The form ends .
1.2.3.3 M: Model space to world space
Model space takes itself as the origin , World space has an origin independent of the model itself .
There are three steps to transform from model space to world space ( The order cannot be changed ):
- The zoom
- rotate
- translation
The corresponding matrix transformation is carried out in turn to obtain the transformation matrix .
M Representation of matrix ( The rotation here only includes the rotation around y The rotation of the shaft , Do you need to add information about other axes ?):
1.2.3.4 V: From world space to visual space
Visual space : A space coordinate system centered on a camera .
From world space to camera space
↓
Pan the entire viewing space , Make the camera origin coincide with the elder martial sister's coordinate origin , And make the coordinate axes coincide
↓
The camera rotates first in world space , Retranslated
↓
In order to make the camera coincide with the world coordinates , Using inverse transformation
The transformation process :
- Pan the world space
- Rotate world space
- z The component is reversed ( The reason of left-handed coordinate system )
According to the above method, the transformation matrix is obtained by matrix transformation
V A matrix representation of a matrix :
1.2.3.5 P: Visual space to crop space
Be careful :
- Not a real projection , Prepare for projection
- Purpose : Determine whether the vertex is within the scope of the courseware
- P matrix : Yes x, y, z Scale the component , use w The component is the range value . If x,y,z It's all in range , Then the point is in the clipping space .
There are two ways of projection : - Perspective projection
- Orthographic projection
1.2.3.6 P: Perspective projection
P A matrix representation of a matrix :
The meaning of each parameter of perspective projection is shown in the figure below :

Use the above P matrix , The coordinates of the transformed visual cone are shown in the figure :
It can be obtained. , If a vertex is within the visual cone , Then its transformed coordinates must meet :x,y,z Both in -w To w Within the scope of .
1.2.3.7 P: Orthographic projection
Relevant schematic diagram of orthogonal projection and its parameter interpretation :
Orthographic projection P A matrix representation of a matrix :
summary
Model space 、 World space 、 The difference of visual field space :
- Model space is centered on the model itself , The origin of the coordinate axis is the origin of the coordinate , By scaling 、 rotate 、 translation **(Model matrix )** Set the model coordinates (Model Coordinate) Change to world coordinates (World Coordinate)
- World space is centered on the whole scene , By translation and rotation **(View matrix )**, as well as z The inverse of the component will set the world coordinates (World Coordinate) Convert to observation coordinates (View Coordinate)
- The visual field space takes the camera as the origin center , Through the projection matrix **(Projection matrix )** Observe the coordinates (View Coordinate) To crop coordinates (Clip Coordinate)
边栏推荐
- How do I use Google Chrome 11's Upload Folder feature in my own code?
- Explain spark operation mode in detail (local+standalone+yarn)
- 【快捷键】
- 242. 有效的字母异位词
- Valentine's Day is nothing.
- Promql select time series
- torch.histc
- 【EI会议】2022年第三届纳米材料与纳米技术国际会议(NanoMT 2022)
- [TA frost wolf _may - "hundred people plan"] 1.4 introduction to PC mobile phone graphics API
- FCN full Convolution Network Understanding and Code Implementation (from pytorch Official Implementation)
猜你喜欢

Binary tree god level traversal: Morris traversal

【TA-霜狼_may-《百人计划》】2.3 常用函数介绍

在线公网安备案保姆级教程【伸手党福利】

快速筛选打卡时间日期等数据:EXCEL筛选查找某一时间点是否在某一时间段内

【TA-霜狼_may-《百人计划》】1.2.3 MVP矩阵运算

RSN:Learning to Exploit Long-term Relational Dependencies in Knowledge Graphs

IPv4和IPv6、局域网和广域网、网关、公网IP和私有IP、IP地址、子网掩码、网段、网络号、主机号、网络地址、主机地址以及ip段/数字-如192.168.0.1/24是什么意思?

LeetCode 144二叉树的前序遍历、LeetCode 114二叉树展开为链表

AfxMessageBox和MessageBox的用法

Bilinear upsampling and f.upsample in pytorch_ bilinear
随机推荐
How to display scrollbars on the right side of the background system and how to solve the problem of double scrollbars
Feature Pyramid Networks for Object Detection论文理解
Leetcode 31 next spread, leetcode 64 minimum path sum, leetcode 62 different paths, leetcode 78 subset, leetcode 33 search rotation sort array (modify dichotomy)
4、【WebGIS实战】软件操作篇——数据导入及处理
整合阿里云短信的问题:无法从静态上下文中引用非静态方法
【EI检索】2022年第六届材料工程与先进制造技术国际会议(MEAMT 2022)重要信息会议网址:www.meamt.org会议时间:2022年9月23-25日召开地点:中国南京截稿时间:2
[深度学习]激活函数(Sigmoid等)、前向传播、反向传播和梯度优化;optimizer.zero_grad(), loss.backward(), optimizer.step()的作用及原理
FCN全卷积网络理解及代码实现(来自pytorch官方实现)
[small sample segmentation] interpretation of the paper: prior guided feature enrichment network for fee shot segmentation
The preorder traversal of leetcode 144 binary tree and the expansion of leetcode 114 binary tree into a linked list
【TA-霜狼_may-《百人计划》】1.3纹理的秘密
【TA-霜狼_may-《百人计划》】2.2 模型与材质空间
Addition without addition, subtraction, multiplication and division
Are you still wasting brain cells for self-study? This interview note is definitely the ceiling of station C
409. 最长回文串
165. 比较版本号
409. longest palindrome
pytorch中的双线性插值上采样(Bilinear Upsampling)、F.upsample_bilinear
Ouc2021 autumn - Software Engineering - end of term (recall version)
4. [WebGIS practice] software operation chapter - data import and processing