Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SceneKit issues on iOS #29

Open
lanxinger opened this issue Oct 9, 2024 · 6 comments
Open

SceneKit issues on iOS #29

lanxinger opened this issue Oct 9, 2024 · 6 comments

Comments

@lanxinger
Copy link

Just wanted you to also be aware that currently the output doesn't render properly with the latest SceneKit framework on iOS/iPadOS and VisionOS.

It is displaying correctly everywhere else other than SceneKit.

I have reported this to Apple under FB15101924. So far no response on the ticket but it continues to be a problem on iOS 18.1 beta 6.

SceneKit Render:
Screenshot 2024-09-11 at 14 27 15

Preview:
Preview

RealityView (which is a new swiftUI based renderer) inside Xcode:
RealityView_Xcode

Xcode import:
Xcode_Import

usdchecker:
usdchecker

Modelfile (rename to .usdz since it's not allowed on github):
model.zip

@pablode
Copy link
Owner

pablode commented Oct 19, 2024

Thanks for the report!

@lanxinger
Copy link
Author

lanxinger commented Dec 16, 2024

@pablode So it seems that there is a metallic map getting assigned during the conversion.

I opened the model with Reality Convert on macOS and you can see the metallic slot being assigned with the roughness map.

Screenshot 2024-12-16 at 11 12 27

I am not sure if this assigment is intended or a mistake during the conversion process as there was no metalness property defined in the source gltf model.

Screenshot 2024-12-16 at 11 14 18

@pablode
Copy link
Owner

pablode commented Dec 30, 2024

Interesting. Going to do a code review. Can you provide me with the source glTF file?

@lanxinger
Copy link
Author

Thank you @pablode

here is the .glb zipped up since github doesn't accept it directly:
link.zip

I see in blender the model does have a metallic map assigned but the factor is set to 0 rendering it non metallic:

image

@pablode
Copy link
Owner

pablode commented Dec 30, 2024

According to the glTF spec, the metallic factor is multiplied with the texture values. This is done in UsdPreviewSurface using the UsdUVTexture scale input. It seems SceneKit just ignores this input. This is why the other renderers work.

Screenshot 2024-12-30 at 16 09 58

I guess one optimization would be to drop the texture. However, I think this should be done by in advance by gltf-transform rather than in the converter.

@lanxinger
Copy link
Author

thank you @pablode . Yes I think the easiest would be to write a small script for gltf-transform and remove the metallic texture node entirely before running the conversion with guc. Appreciate all the help on this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants