简体   繁体   English

如何将 OpenGL 中的东西缩放到实际尺寸?

[英]How to scale things in OpenGL to real sizes?

I am trying to make a program in OpenGL 3.3.我正在尝试在 OpenGL 3.3 中编写程序。 Everything is working, but the problem is that everything looks too small.一切正常,但问题是一切看起来都太小了。 I measured out my field of view in real life and I came to the result of 46.9°.我在现实生活中测量了我的视野,得到了 46.9° 的结果。 So I applied that to my projection matrix like this:所以我将它应用于我的投影矩阵,如下所示:

projection = infinitePerspective(radians(46.9f), float(windowWidth) / float(windowHeight), 0.005f);

but it hasn't helped much.但这并没有太大帮助。

I made a screenshot for you that shows a one by one by one meter cube that is 3 meters away from the camera:我为您制作了一个屏幕截图,显示了距离相机 3 米的一个一米一米的立方体: 立方体 3 米外

If I measure out one meter in real life and view it from three meters away it looks way bigger than that.如果我在现实生活中测量一米并从三米远的地方查看它,它看起来会比这大得多。 Is there some coefficient needed to scale everything, so that it looks real?是否需要一些系数来缩放所有内容,使其看起来真实?

As it turns out, a real scale is impossible.事实证明,真正的规模是不可能的。 But with the right view angle it looks good.但是在正确的视角下,它看起来不错。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM