LenK
LenK

Reputation: 3098

USDZ models have holes in SceneKit but not QuickLook

Some of the NASA .usdz spherical models, when displayed in an iOS SceneKit app, show "holes" in the rendered textures, apparently at vertices in the model.

The models display correctly with NO holes in QuickLook (on both iOS 12.3.1 and MacOS 10.14.6 Beta), which I believe are also using SceneKit.

However, Xcode (10.2.1 and 11.0 Beta 2), like an iOS app, show holes when editing the .usdz file as well as in an exported .scn file.

Is there some SceneKit option that will resolve this problem? In other words, what magic is QuickLook doing to "fix" this?

Here's an example model of Mars from NASA: https://solarsystem.nasa.gov/resources/2372/mars-3d-model/

Here's a screenshot of the Mars model via QuickLook on MacOS: enter image description here

Here's a screenshot of the Mars model with holes as viewed in Xcode and which looks the same in a SceneKit app on iOS: enter image description here

Upvotes: 1

Views: 584

Answers (1)

mnuages
mnuages

Reputation: 13462

this can happen when subdivision surfaces are used but the SCNSceneSourceLoadingOptionPreserveOriginalTopology wasn't specified when importing the model. Make sure you set this option to YES when loading a scene.

This could also be an issue with the exporter. If the model is already sufficiently detailed then subdivision surfaces were probably not intended. If nothing is specified in the USDZ file then Catmull-Clark subdivision is the default setting but several exporters don't explicitly specify none when they should.

Upvotes: 2

Related Questions