如何修复图像纹理未从 Blender 传输到 Unity 的问题
我在 Blender 中对一个对象进行了纹理处理,因为它在 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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
好的,根据您的屏幕截图..
您将选择所有内容,然后添加一个名为“Solidify”的修改器,然后将其设置为非常小的值,例如 0.03。 (Unity 不喜欢只是平面的对象)。
仔细检查所有法线是否朝外。如果您不知道该怎么做,请告诉我...
进入编辑模式,选择所有边缘,然后右键单击,选择“标记为接缝”。
打开 UV 编辑器窗口(应为分屏,一侧为编辑模式,另一侧为 UV 视图)。在编辑侧选择全部,然后转到 UV 下拉菜单并单击“展开”。然后,您应该看到您的物体在 UV 窗口一侧展开成平面。有不同的展开选项,例如智能 UV 展开等。我认为“展开”对我来说很有效,但是尝试一下,可能会有一些东西以扭曲程度较小的方式显示您的对象形状。
此时,因为你的模式基本上是重复的。如果导出 OBJ 文件并将其统一,然后添加图像文件(确保其尺寸完全为正方形),它应该以 Albedo 纹理形式接收图像文件,效果比屏幕截图中的要好得多。您可以使用“平铺”和“X/Y 偏移”,直到它看起来正确为止(不过您可能会遇到旋转问题。
但是
Okay, so based on your screenshots..
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...
Go into edit mode select all edges, then right click, select "mark as seam".
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..
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
我对两者都很陌生,但我得到的建议是不要在搅拌机中进行纹理处理,而是在 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.
这是一篇 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