kcoley / gltf2usd

command-line utility for converting glTF 2.0 models to USD
MIT License
263 stars 39 forks source link

Black Shadow Visible When Viewed from Some Angle #107

Closed ShantanuSriv closed 5 years ago

ShantanuSriv commented 5 years ago

@kcoley When viewing the usdz model from some angles, it shows black shadow at the bottom but none of those are actually present in the glTF model.

Here is one example of it: glTF Model:

screen shot 2018-11-19 at 3 18 27 pm

converted-usdz Model:

image uploaded from ios

Can you please look into the issue?

ShantanuSriv commented 5 years ago

@kcoley do you have any fix for this?

kcoley commented 5 years ago

Hi @ShantanuSriv. The shadow generation happens in AR Quicklook on Apple’s side. It gets mentioned in this keynote video:

https://developer.apple.com/videos/play/wwdc2018/603/

It looks to be incorrect based on your screenshot. Does it look bad when viewed in AR mode on a table or floor as well?

ShantanuSriv commented 5 years ago

@kcoley No, this is not a problem which I see in AR Quicklook only -- this is when I load the file in the normal viewer. Plus, this same issue is visible in AR Quicklook. So, it's not an issue which is specific to AR Quicklook.

I remember that a similar issue was showing up earlier too - #95

kcoley commented 5 years ago

@ShantanuSriv interesting. Is there any geometry below the furniture model that is a single sided mesh? I’m wondering if it is the back face of geometry that renders black in a viewer but does not render in three js viewer?

ShantanuSriv commented 5 years ago

Mesh geometry

"meshes": [ { "primitives": [ { "attributes": { "POSITION": 1, "NORMAL": 2, "TEXCOORD_0": 3 }, "indices": 0, "mode": 4, "material": 0 } ], "name": } ],

Material

"materials": [ { "pbrMetallicRoughness": { "baseColorFactor": [ 1.0, 1.0, 1.0, 1.0 ], "baseColorTexture": { "index": 2, "texCoord": 0 }, "metallicFactor": 1.0, "roughnessFactor": 1.0, "metallicRoughnessTexture": { "index": 1, "texCoord": 0 } }, "normalTexture": { "index": 0, "texCoord": 0 }, "occlusionTexture": { "index": 1, "texCoord": 0 }, "emissiveFactor": [ 0.0, 0.0, 0.0 ], "alphaMode": "BLEND", "name": "Material #25" } ]

Please tell me,if you need any more info on this.

ShantanuSriv commented 5 years ago

@kcoley do you have update on it?

ShantanuSriv commented 5 years ago

The issue is resolved. It was a device specific issue.

kcoley commented 5 years ago

Hi @ShantanuSriv just got back from vacation, but glad the issue is resolved