UnityGLTF icon indicating copy to clipboard operation
UnityGLTF copied to clipboard

Transparent materials turn opaque

Open MephestoKhaan opened this issue 6 years ago • 4 comments

I have added a model to my iOS device that was working fine with old versions of this plugin. But now the glass is turning opaque. I am not changing the default shader.

I can even reproduce it in editor in a really weird way: https://gyazo.com/bcf71dce29334f6c0a3c28ed7c15147a

As soon as I unfold the material... they all turn opaque

MephestoKhaan avatar Aug 28 '18 20:08 MephestoKhaan

Any news here? This is a major problem for our application.

boblaublaw avatar Sep 18 '18 21:09 boblaublaw

For starters, to fix the editor problem in OBJLoader line 147 where it says

currentMaterial.SetFloat("_Mode", 3);

it should be mode 2 (there are only 3 modes ).

But that still does not fix in in the device

MephestoKhaan avatar Sep 19 '18 10:09 MephestoKhaan

I'm guessing that this could be a bug in Unity. We correctly set the RenderType to Transparent in StandardMap.cs line 297. But then the Unity inspector seems to set it to opaque again.

AdamMitchell-ms avatar May 23 '19 21:05 AdamMitchell-ms

hey, dont know whether it is related but i sensed another weird thing that when the unity automatically set the rendertype to opaque for a material which should be transparent, if i click on anything of the material details in the inspector in UnityEditor Mode, the material suddenly jump to be transparent and sometimes it is the other way round. anyway what is the proper pipeline of importing a glb with different types of alpha settings?

blkot avatar Mar 21 '21 08:03 blkot

Please update to the latest version and open a new issue if the problem persists. Thanks!

pfcDorn avatar Feb 09 '24 08:02 pfcDorn