多边形中点的纹理坐标
我有一个多边形,其中每个顶点都有纹理坐标。如何计算多边形中任意点的纹理坐标? (我知道点坐标。) 谢谢
对不起我的英语...
I have a polygon, where each vertex has texture coordinates. How can I calculate texture coord for any point lying in the polygon? (I know points coordinates.)
Thanks
p.s. sorry for my english...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不关心观点,因为它足够简单。只需找到该点的重心坐标并对顶点纹理坐标进行线性插值即可。 这是一个关于此的很好的教程
但是,如果您尝试在使用透视投影的场景,您可能还需要担心透视校正。 这里有一些关于此问题的阅读内容
I you don't care about perspective than it's simple enough. simply find the barycentric coordinates of the point and do a linear interpolation of the vertices texture coordinates. Here's a nice tutorial about this
If however you're trying to do this in a scene where with a perspective projection, you'll probably want to worry about perspective correction as well. Here's some reading about this issue