Losing texture when converting DAE files to SCN files

I have an app where I have a bunch of dae files stored online. They're optimized for iOS using


xcrun scntool --convert file.dae --format c3d --output file_optimized.dae --force-y-up


I download both the model and the textures to have the same file structure as on my mac. Which ends up like this:

modelName/
     model/
          model.dae
     textures/
          textures.png (All required texture files are in here)


However, when I load them into my iOS app, they show up fully white with the following error:

[SceneKit] Error: Failed loading : <C3DImage 0x1c00f6900 src:file:///path/to/local/file/on/my/mac/../textures/diffuse.png [0.000000x0.000000]>


The files work fine on my mac, both in Preview and in Xcode, and they show the URI to the textures like this:

../textures/diffuse.png


How would I fix this?

Accepted Reply

Managed to fix this by manually overriding the material properties with the image files I downloaded.

Replies

Managed to fix this by manually overriding the material properties with the image files I downloaded.

Hi !


I ran into the exact same problem. I could not find any solution.

How did you manage a workaround around this ? Are you catching the error then applying material ?


Thanks for your help !