一种将 3d 模型的多个纹理组合成一个的工具? [英] A tool to combine multiple textures of a 3d model into one?

查看:28
本文介绍了一种将 3d 模型的多个纹理组合成一个的工具?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一些 OBJ 格式的 3D 模型,带有 MTL 材料和 JPG/PNG 纹理.基本上它们看起来像这样:

I have some 3D models in OBJ format with MTL material and JPG/PNG textures. Basically they look like this:

  • 在 OBJ 中:
mtllib material_file.mtl

... # some vertices and texture vertices

usemtl material_0
... # some faces

usemtl material_1
... # some faces

... # more

  • 在 MTL 中:
  • newmtl material_0
    ... #Ka, Kd, Ks, etc.
    map_Kd texture_1.png
    
    newmtl material_0
    ... #Ka, Kd, Ks, etc.
    map_Kd texture_2.png
    
    ... # more
    

    但是,现在我需要渲染和体素化这些模型以提供给神经网络,其预处理工具仅支持带有单个 PNG/JPG 纹理文件的 OBJ.所以我需要将这些纹理合并到一个文件中.

    However, now I need to render and voxelize these model to feed to a neural network, whose preprocessing tool only supports OBJ with a single PNG/JPG texture file. So I need to combine these textures into a single file.

    有什么工具可以做到这一点吗?如果我可以在脚本中使用它会更好.

    Is there any tool for that? It would be preferable if I can use it in a script.

    推荐答案

    Atlas_texture_packer 似乎是将多个纹理合二为一的有效工具:https://github.com/lucars83/Atlas_Texture_Packer

    The Atlas_texture_packer seem to be efficient tool to combine multiple textures into one: https://github.com/lucars83/Atlas_Texture_Packer

    另一个是https://murlengine.com/usersguide/en/atlas_generator.php 需要XML文件形式的纹理文件信息.

    Another is https://murlengine.com/usersguide/en/atlas_generator.php which needs the information about texture files in the form of XML file.

    告诉我什么对你有用!

    这篇关于一种将 3d 模型的多个纹理组合成一个的工具?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆