问题描述
我需要制作球形广告牌(即设定深度),但要考虑透视投影 - 理想情况下包括偏离中心的截屏。
我没有能够找到任何成功的人参考 - 尽管有很多解释为什么标准广告牌没有视角扭曲。不幸的是,对于我的申请来说,缺乏并不是一个表面缺陷;这对算法来说非常重要。
我自己做了一些调查:
事实上,I没有找到一个好的解决方案,我找不到任何人。任何人都有想法?
在浏览这个问题时甚至没有进行远程处理,我偶然发现了,这非常接近。链接教程展示了如何计算光栅化球体的边界椭圆;获得深度(最糟糕的是,使用raycast)应该很容易推导出来。
I need to make spherical billboards (i.e., setting depth), but taking into account perspective projection--ideally including off-center frusta.
I wasn't able to find any references to anyone succeeding at this--although there are plenty of explanations as to why standard billboards don't have perspective distortions. Unfortunately, for my application, the lack isn't a cosmetic defect; it's actually important to the algorithm.
I did a bit of investigation on my own:
Point of fact, I didn't find a good solution, and I couldn't find anyone who has. Anyone have an idea?
While browsing around not even remotely working on this problem, I stumbled on http://iquilezles.org/www/articles/sphereproj/sphereproj.htm, which is pretty close. The linked tutorial shows how to compute a bounding ellipse for a rasterized sphere; getting the depth (at worst, using a raycast) should be fairly easy to derive.
这篇关于模拟球形广告牌的变形的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!