The viewer will fail if the glTF model contains relative paths

I tried to view a model suggested in the Khronos glTF sample models repository in the PlayCanvas glTF Viewer.

However, an error occurs when loading the texture.
image

Probably the cause is that the glTF model references the texture with a relative path.
image

However, since the relative path meets the glTF specifications, it would be nice if it could be displayed without error in the Viewer.

I reproduced it on other models.
Even if the texture exists in the same folder, it seems to cause an error when referencing it with a relative path.

https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/SheenChair/glTF
https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/ToyCar/glTF

@slimbuck , one for you?

I can confirm the issue and have created an engine issue to track this.

Thanks!

2 Likes

Thanks for logging this issue @cx20. Please see Path fix by slimbuck · Pull Request #119 · playcanvas/playcanvas-viewer · GitHub

2 Likes

Thanks for the quick fix.

1 Like