在3ds格式中,如何确定texutre的寻址模式?

发布于 2024-11-16 03:12:24 字数 197 浏览 3 评论 0原文

我对 3ds 文件中纹理的寻址模式有疑问。 (不是3ds max)

我成功加载了3ds文件的所有材质信息,如材质颜色、纹理文件名等。但我无法确定纹理的寻址模式。例如,砖块的纹理将被重复,但门的纹理不会重复。当然,我认为3ds文件有关于它们的寻址模式的信息,但我找不到它。 (也许是0xa351?)

在哪里可以找到有关3ds文件中纹理寻址模式的信息?

I have a trouble about texture's addressing mode in 3ds file. (not 3ds max)

I succeeded in loading all material information of 3ds file like material color, texture file name and so on. But I couldn't determine texture's addressing mode. For example, a texture of bricks will be repeated, but a texture of doors will not. Of course, I think 3ds file has a information about their addressing mode but I could not find it. (maybe 0xa351?)

Where do I find the information about texture's addressing mode in 3ds file?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

顾挽 2024-11-23 03:12:24

我认为你的猜测是正确的,正如这里他们所说的A351:

If read as a short int (ls byte first):

bit4 bit0: 00 tile (default) 11 decal  01 both
bit 1: mirror
bit 2: not used ? (0)
bit 3: negative
bit 5: summed area map filtering (instead of pyramidal)
bit 6: use alpha  (toggles RGBluma/alpha. For masks RGB means RGBluma)
bit 7: there is a one channel tint (either RGBluma or alpha)
bit 8: ignore alpha (take RGBluma even if an alpha exists (?))
bit 9: there is a three channel tint (RGB tint)
... not used (0)

我认为 tile 选项(位 0 和 4)可能就是您正在寻找的。我猜当 tile 打开时,texCoords 会重复,否则它们会被夹紧。

I think you're right with your guess, as here they say about A351:

If read as a short int (ls byte first):

bit4 bit0: 00 tile (default) 11 decal  01 both
bit 1: mirror
bit 2: not used ? (0)
bit 3: negative
bit 5: summed area map filtering (instead of pyramidal)
bit 6: use alpha  (toggles RGBluma/alpha. For masks RGB means RGBluma)
bit 7: there is a one channel tint (either RGBluma or alpha)
bit 8: ignore alpha (take RGBluma even if an alpha exists (?))
bit 9: there is a three channel tint (RGB tint)
... not used (0)

I think the tile option (bits 0 and 4) could be what you're looking for. I guess when tile is on, the texCoords are repeated and otherwise they're clamped.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文