Sketchfab Configurator - Texture URL

Hi there,

I’m using your configurator-studio to get me 90% of the way there for developing my configurator app exporting the html, js & css.
https://labs.sketchfab.com/experiments/configurator-studio/

I am running into a problem with switching the textures. When I ‘add option’ ‘texture’ The configurator asks for a texture URL cors enabled to replace a material in the sketchfab model. The thumbnail shows up when i add my texture url but when clicked it doesn’t update the texture on the model.

I have tried hosting my textures on different platforms imageshack, goodbarber, onedrive (public enabled) but only the thumbnail shows up.

I tried using this url from wikipedia commons:
https://upload.wikimedia.org/wikipedia/commons/f/f8/Bf6poes.png
and it works fine - why does this url link work but not my image urls? any suggestions where I can host images that can be switched?

This is a link example to one of the textures urls i am trying to use (hosted on imageshack)
(https://imagizer.imageshack.com/v2/512x512q90/921/tipm01.png

This is the model I have been tring to upute the textures with
kitchen-bench-5ba9e5a2e3ac45019dcb414b8d603260

Kind regards,
Jimmy

Hi Jimmy,

The ImageShack image is not CORS-enabled. You can see this error message in the browser console when you try to switch to it in the configurator:

Access to fetch at 'https://imagizer.imageshack.com/v2/512x512q90/921/tipm01.png' from origin 'https://sketchfab.com' has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header contains multiple values '*, imageshack.com', but only one is allowed. Have the server send the header with a valid value, or, if an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

Imgur URLs should work.

Support King for a reason.

Thanks James, Imgur direct link worked.

*Just a side question more for another thread. Since sketchfab has worked on a shadow catcher in the viewer, is there a controlable/ geoloactable sun in the pipeline? maybe I can request for a later release in the sketchfab API. There seems to be all the parts there to support this feature - good for sun studies in arch vis

Thanks for yor time

1 Like

That should be possible with the setLight function. You can have a Directional light in the scene and update its matrix to emulate sun position.

It would be a bit tricky to work with matrices to do this, but I think it could be done.