glTF from dropbox

Are there any special things to take care of when loading an external glTF from Dropbox?
I cannot seem to get it working, for example in the test model on this page:

Loading external geometry from Dropbox is not going to work due to the CORS policy, I’m afraid. Dropbox, as many other online storage providers, doesn’t provide the flexibility to define MIME types and CORS configurations so we recommend using a service such as Amazon S3 to store your external geometry.

Alternatively, you can use the SDGeomteryInput component to import OBJ or DXF models from Dropbox. Importing TXT, CSV, JSON, JPG or PNG file formats works as well because of our backend implementation which passes them through to the client, hence CORS is not an issue. More in this documentation article:

Thanks, clear!

Is there any downside of using this method compared to glTF’s?

The downside is that the static meshes run through the Grasshopper definition and slow down your model which in not desirable especially if you just need them for display. Depending on the size of the meshes, this might be negligible so test it and see if you are happy. But if you experience a significant drop in performance the external geometry as glTF is the way to go.

1 Like

My file shows fine in the test model, but if I download this model and upload it myself, the same test file doesn’t show…

Any ideas?

I just tested with the external geometry below and it works fine, give it a go and let me know if it works for you.

When exporting glTF, use these options

(Zip=No Materials=No MaterialSource=DisplayColor Normals=No TextureCoord=No 
VertexColors=No ObjectNames=No glTFv1Extension=ShapeDiver Version=glTF2)

and then set following metadata on upload to S3:

Content-Type = application/octet-stream
Content-Encoding = gzip

Also, double check the CORS configuration.

Thanks I got it working!
I guess I got Content-Type at binary/ instead of application/

It still surprises me the geometry did show in the test model though…

What does this do?

This should only be included if Zip is set to “Yes” when exporting, correct?


That’s necessary only for glTF v1 exports, we recommend to use the v2, more here.

1 Like