如何修复图像纹理未从 Blender 传输到 Unity 的问题

发布于 2025-01-09 16:48:00 字数 285 浏览 0 评论 0原文

我在 Blender 中对一个对象进行了纹理处理,因为它在 Unity 中无法正确纹理化,然后将对象和纹理导入到 Unity 中。

我不知道如何解决这个问题,我将两张照片放在这里。

导入前的搅拌纹理

Unity 中的对象

I textured an object in Blender because it wouldn't texture properly in Unity, and then imported the object and texture to Unity.

I don't know how to fix this, I'll put both pictures here.

Blender Texture Before Import

Object In Unity

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

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

发布评论

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

评论(3

怎樣才叫好 2025-01-16 16:48:00

好的,根据您的屏幕截图..

  1. 您将选择所有内容,然后添加一个名为“Solidify”的修改器,然后将其设置为非常小的值,例如 0.03。 (Unity 不喜欢只是平面的对象)。

    仔细检查所有法线是否朝外。如果您不知道该怎么做,请告诉我...

  2. 进入编辑模式,选择所有边缘,然后右键单击,选择“标记为接缝”。

  3. 打开 UV 编辑器窗口(应为分屏,一侧为编辑模式,另一侧为 UV 视图)。在编辑侧选择全部,然后转到 UV 下拉菜单并单击“展开”。然后,您应该看到您的物体在 UV 窗口一侧展开成平面。有不同的展开选项,例如智能 UV 展开等。我认为“展开”对我来说很有效,但是尝试一下,可能会有一些东西以扭曲程度较小的方式显示您的对象形状。

  4. 此时,因为你的模式基本上是重复的。如果导出 OBJ 文件并将其统一,然后添加图像文件(确保其尺寸完全为正方形),它应该以 Albedo 纹理形式接收图像文件,效果比屏幕截图中的要好得多。您可以使用“平铺”和“X/Y 偏移”,直到它看起来正确为止(不过您可能会遇到旋转问题。

但是

  1. 如果您想非常具体地排列它,您可以从然后使用 Photoshop 或其他照片编辑器更改/旋转并排列纹理,以便当您选择一侧时,在编辑窗口中的搅拌器中正确排列 UV + 编辑器。将在 UV 窗口中突出显示相应的平面平面,基于此你应该能够弄清楚应该向上/向下旋转什么,等等。然后,当你更改该 2d 图像并将其拖动到 Unity 中时,它将调整并环绕对象。

Okay, so based on your screenshots..

  1. You're going to select everything then add a modifier called "Solidify", then set this to something very small like .03. (Unity doesn't like objects that are just planes).

    double check all your normals are facing out. Let me know if you don't know how to do this...

  2. Go into edit mode select all edges, then right click, select "mark as seam".

  3. Open UV editor window (should be split screen with Edit mode on one side, UV view on the other). In the Edit side select all, then go to UV dropdown menu and click "unwrap". You should then see your object unfolded into flat planes over on the UV window side. There's different unwrap options, like smart UV unwrap, etc. I think just "unwrap" has worked for me, but play around and there may be something that shows your object shapes in a less distorted way..

  4. At this point, since your pattern is basically repeating. If you export the OBJ file and take it into unity, and you add the image file (make sure it's dimensions are perfectly square) it should receive the image file as an Albedo texture much better than in your screenshots. You can play with the 'tiling' and "X/Y offset" till it looks right (you might face issues with rotation though.

BUT

  1. If you want to line it up very specifically, you can export the UV layout as a png from the UV window in blender. Then use photoshop or another photo editor to change/rotate and arrange your texture so the sides line up properly. In blender in the Edit window (assuming you still have both UV + editor open) when you select a side it will highlight in the UV window the corresponding flat plane, based on this you should be able to figure out what should be rotated up/down, etc. Then when you change that 2d image and drag it into Unity, it will adjust and wrap around the object.
一曲爱恨情仇 2025-01-16 16:48:00

我对两者都很陌生,但我得到的建议是不要在搅拌机中进行纹理处理,而是在 Unity 中进行。

I'm pretty new to both, but the advice I've been given is to not do the texturing in blender, but instead to do it in Unity.

つ可否回来 2025-01-16 16:48:00

这是一篇 10 个月前的帖子,但如果有人好奇或遇到同样的问题,Blender 会导出比例为 100 的模型,因此您需要放大材质图块(在材质设置中)才能看到它。

然而,这是一个糟糕的解决方案,因为这样您就不会处理比例为 1 的对象,因此您实际上想要在搅拌机中导出 FBX 模型时检查“应用转换”

This is a 10-month-old post but incase anyone is curious or struggling the same, Blender exports models with a scale of 100 so you need to scale up the tile of the material (in material settings) to see it.

This is a bad solution however because then you are not working with objects on a scale of 1 so you actually want to check "Apply transformations" when exporting the FBX model in blender

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