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

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

问题描述

这不是一个问题,但我很困惑什么 3D 空间对应什么.我习惯于听到模型、视图、投影空间,但在我的工作中他们使用世界、眼睛、投影.我没有意识到 World 和 Eye 是模型和视图的同义词,所以如果有人对此有任何困惑,我发现以下说明可以提供帮助(希望它会帮助你).

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:将模型/世界空间坐标乘以 View/Eye 矩阵会将它们带入 View/Eye Space.这是将坐标放置在屏幕上的位置,偏离正在使用的透视图.因此,如果您使用透视投影,这会将所有坐标定位为看起来具有深度.

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天全站免登陆