unity / blender / FBX / semi transparent

怎甘沉沦 提交于 2019-12-10 21:37:29

问题


Im getting a strange issue with importing .FBX into unity. It does not look like it's an issue with normals. I have noticed on unity the material is classed as 'transparent' and changing this to 'opaque' does fix the issue but i would like to find out whats going on here.

Unity: 2018.3.3f1

Blender: 2.80.0


回答1:


I've just run into a similar issue. I've not figured out why it's happening yet, but there seems to be a bug report out. Will update if I find out what's causing it.

Update 2019-02-13:

Haven't found the exact underlying cause but I've had a few minutes to test out a few things. It seems like blender is using the base colour's R channel as both the Red colour and an inverse Alpha channel value if the R value is anything other than 1.0 or 0, ignoring the Alpha channel completely, and keeping G and B channels as the values they should be.

Some examples:

All of the below assume a basic model (a cube, say), and no modifications to anything other than the Base Color property of the singular material applied to that model.

  • RGBA(1,1,1,1) in blender, Opaque RGBA(1,1,1,1) in Unity
  • RGBA(1,1,1,0) in blender, Opaque RGBA(1,1,1,1) in Unity
  • RGBA(0.9,1,1,1) in blender, Transparent RGBA(0.9,1,1,0.1) in Unity
  • RGBA(0.1,1,1,1) in blender, Transparent RGBA(0.1,1,1,0.9) in Unity
  • RGBA(0.1,0,0.1,1) in blender, Transparent RGBA(0.1,0,0.1,0.9) in Unity
  • RGBA(0,1,1,1) in blender, Opaque RGBA(0,1,1,1) in Unity

So, to reiterate:

  • changing Alpha has no effect on transparency for imported models.
  • R values of 0 or 1 equate to an Alpha value of 1
  • R values between 0 and 1 equate to an Alpha value of 1 - R
  • B and G values do not affect transparency

Hope this helps!




回答2:


When you apply texture to a model, make sure the base color is set to white (r - 1.0, g - 1.0, b - 1.0, A - 1.0), for some reason when you apply texture to a model, it will appear good in blender, but unity will take basic color of the model and apply the texture on top of it.

I tested this with having file extensions for 2.8 [replaced blender installation folder with 2.8 beta files] and by saving .blend file in my unity project, i had to click on model viewer to update materials but they appeared properly in the end.




回答3:


It appears this issue has been resolved by blender: https://developer.blender.org/T59850

If anyone is still having issues, try updating to the latest of Blender 2.8.



来源:https://stackoverflow.com/questions/54416997/unity-blender-fbx-semi-transparent

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!