gpt4 book ai didi

graphics - Obj格式纹理坐标问题

转载 作者:行者123 更新时间:2023-12-05 01:37:32 24 4
gpt4 key购买 nike

据我所知,纹理坐标范围应为 [0,1]
但在这个 obj 文件中,纹理坐标似乎在 [0,2] 范围内

vt 2.0000 2.0000 0.0000
vt 1.7500 2.0000 0.0000
vt 1.7500 1.9750 0.0000
vt 2.0000 1.9750 0.0000
vt 1.7500 1.9500 0.0000
vt 2.0000 1.9500 0.0000
vt 1.7500 1.9250 0.0000
vt 2.0000 1.9250 0.0000
vt 1.7500 1.9000 0.0000
vt 2.0000 1.9000 0.0000
vt 1.5000 2.0000 0.0000
vt 1.5000 1.9750 0.0000
vt 1.5000 1.9500 0.0000
vt 1.5000 1.9250 0.0000
vt 1.5000 1.9000 0.0000
vt 1.2500 2.0000 0.0000
vt 1.2500 1.9750 0.0000
vt 1.2500 1.9500 0.0000
vt 1.2500 1.9250 0.0000
vt 1.2500 1.9000 0.0000
vt 1.0000 2.0000 0.0000
vt 1.0000 1.9750 0.0000
vt 1.0000 1.9500 0.0000
vt 1.0000 1.9250 0.0000

为什么这里的纹理坐标可以大于 1 ?有人可以向我解释一下吗?谢谢!

你看到纹理看起来很奇怪
enter image description here

最佳答案

[0,1] 之外的 UV 纹理值预计将被平铺。

我从来没有在任何非正式的 OBJ 规范中明确地看到过这一点,但它模仿了 OpenGL 的行为。

这是来自 OpenGL redbook 的相关引述:

You can assign texture coordinates outside the range [0,1] and have them either clamp or repeat in the texture map. With repeating textures, if you have a large plane with texture coordinates running from 0.0 to 10.0 in both directions, for example, you'll get 100 copies of the texture tiled together on the screen. During repeating, the integer part of texture coordinates is ignored, and copies of the texture map tile the surface. For most applications where the texture is to be repeated, the texels at the top of the texture should match those at the bottom, and similarly for the left and right edges.

关于graphics - Obj格式纹理坐标问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7782221/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com