Closed ShantanuSriv closed 5 years ago
Hi @ShantanuSriv. The only thing I was able to confirm working with iOS was alpha blend, which I believe to be the only alpha mode currently supported in usdz specification. I was not able to find anything about blend modes in the USD preview surface specification: https://graphics.pixar.com/usd/docs/UsdPreviewSurface-Proposal.html
I tested against these glTF models from the glTF-Asset-Generator project: https://github.com/KhronosGroup/glTF-Asset-Generator/tree/master/Output/Material_AlphaBlend
Is the bag supposed to be using alpha blend?
@ShantanuSriv also is the alpha value set to a very low value, if using alpha blending?
@kcoley
Is the bag supposed to be using alpha blend?
yes
@ShantanuSriv also is the alpha value set to a very low value, if using alpha blending?
@kcoley I have two base materials and both of them use the same alpha value of 1 in baseColorFactor[3], having same baseColorTexture but one with alphaMode Blend and the other one with Opaque.
@ShantanuSriv gotcha. As a test, can you remove the "Blend" line from the glTF file and try converting to see if the result is the same when converting to usd?
@kcoley sure, I will try that and see if it helps.
@kcoley I tried that but it completely takes away the transparency from it.
@ShantanuSriv interesting, do you know what the alpha values are in the texture?
@kcoley 1.0
@ShantanuSriv do you know if you can provide a simple mesh that can repro this issue?
@kcoley gltf sample which for the above images. Can you please look into this? 53264118_mid.zip
@ShantanuSriv I'll take a look
@ShantanuSriv this looks like a discrepancy between Mac OS and iOS.
Viewing the usdz model on iOS does yield a result similar to your photo:
However, rendering the model within XCode actually shows the pink hue on the texture:
I also get a similar result using Babylon.js's glTF viewer:
So this seems like it may be a bug in iOS. Maybe good to file an issue with Apple?
@kcoley thanks for all the help. Closing the issue for now.
@kcoley Transparency issue is resolved to a great extent but there is one issue which I am not able to find a solution for -- I think the blend mode is not working properly.
Here is the glTF rendered file:
In the glTF rendered file, I see a thin pinkish-layer in the middle area where there is transparency.
In the usdz-converted file:
I see complete transparency.
I think blend mode is not working fine with usdz. Do you have any proof of whether it's working fine? I remember you saying that alphaMode: Mask is not yet supported for usdz. Can you provide the source for it? I was not able to find it.
If this is an altogether different issue, can you please look into it? It's a bit urgent.
Thanks.