3D空间(模型/世界,视图/眼睛,投影) [英] 3D Spaces (Model/World, View/Eye, Projection)

查看:240
本文介绍了3D空间(模型/世界,视图/眼睛,投影)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这不是问题,但是我对3D空间对应什么感到非常困惑.我曾经听过模型",视图",投影"空间,但是在我的工作中,他们使用世界",眼睛",投影".我没有意识到世界"和眼睛"是模型和视图的同义词,因此,如果有人对此有任何困惑,我会发现以下澄清内容对您有所帮助(希望对您有所帮助).

This isn't a question but I was very confused about what 3D space corresponded to what. I was used to hearing Model, View, Projection space but at my job they use World, Eye, Projection. I didn't realize that World and Eye were synonyms for model and view so if anyone has any confusion on this i found the following clarification to help (hopefully it will help you).

局部空间:这些是在3Ds Max等渲染程序中构成3D模型的坐标.它为3D模型本身定义了顶点的空间.

Local Space: These are the coordinates that make up the 3D model in a rendering program like 3Ds Max or any other. It defines the space of the vertices for the 3D Model itself.

模型/世界空间:将本地空间坐标乘以模型/世界矩阵会将其带入模型/世界空间.我们所想象的3D世界是模型/世界空间,没有考虑任何视角.

Model/World Space: Multiplying local space coordinates by the Model/World matrix will bring them into Model/World Space. Model/World Space is the 3D world as we imagine it without any perspective taken into account.

视图/眼睛空间:将模型/世界空间坐标乘以视图/眼睛矩阵会将其带入视图/眼睛空间.这是将坐标放置在屏幕上的位置,偏离了正在使用的透视图.因此,如果您使用透视投影,这将使所有坐标看起来像它们具有深度.

View/Eye Space: Multiplying Model/World space coordinates by the View/Eye matrix will bring them into View/Eye Space. This is where the coordinates are placed on the screen biased off of the perspective that's being used. So if your using perspective projection this will position all the coordinates to look like they have depth.

投影矩阵:将视图/眼睛"空间坐标与投影矩阵"相乘将获得3D透视点,并将其正确映射到2D视口(又称屏幕).

Projection Matrix: Multiplying the View/Eye space coordinates by the Projection matrix will take the 3D perspective points and map them properly to the 2D Viewport (aka the screen).

视口/同质空间:乘以投影矩阵后,需要将您的点映射到真实平面".这本质上是一种归一化;我们将每个x,y,z坐标除以w分量.还调整了坐标,以将原点从屏幕中心移动到左上角.

Viewport/Homogeneous Space: After multiplying by the Projection matrix, your points need to be mapped to the "real plane". This is essentially a normalization; we take each x,y,z coordinate and divide it by its w component. The coordinates are also adjusted to move the origin from the center of the screen to the top left.

请随时提出建设性的批评,我欢迎任何建议.这是我使用的一些其他信息 http://antongerdelan.net/opengl/raycasting.html

Please feel free to provide constructive criticism, I'm open to any suggestions. Here is some additional information I used http://antongerdelan.net/opengl/raycasting.html

推荐答案

只是一个想法,但是您可以添加最后一个阶段视口空间"(或类似方式).

Just as an idea, but you could add a final stage "Viewport Space" (or something along those lines).

您在投影矩阵"阶段已经暗示了这一点,但这是应用于投影矩阵之后的顶点的单独转换,其中x,y和z坐标除以它们的w分量,将它们映射到真实平面" ",然后从同构坐标中调整坐标,以将(0,0)(原点)从屏幕中心移到左上角.

You hinted at it in the Projection Matrix stage, but it is a separate transformation applied to the vertices after the projection matrix in which the x, y and z coordinates are divided by their w component to map them to the "real plane", from homogeneous coordinates, and the coordinates are adjusted to move (0,0), the origin, from the center of the screen to the top left.

这篇关于3D空间(模型/世界,视图/眼睛,投影)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆