ShapeDiver external geometry

I have found your tutorial regarding the displaying external geometry. I try to do it, but without success.
I am not developer, so I didn’t catch some points.
How to add correct metadata to my URL? (point 2)
Do I have to use amazon server? Currently I use cpanel and wordpress.
I also didn’t understand point 4 (CORS configuration). Where I can find it to check it?
At the end, I tried your definition with replaced URL for model and texture and get messages:
Texture image download failed>SecureChannelFailure
Color texture download failed
Color texture saving failed

1 Like

About the metadata and CORS configuration, you should definitely be able to do that using cPanel or directly by editing configuration files with an FTP client. I am not directly familiar with your setup, but here are a couple of links that should help:
How to enable CORS? (you should be able to add/modify your .htaccess file using the cPanel File Manager)
How to configure custom MIME types in cPanel?

About the texture image, it looks like a problem on your server, maybe it is not https-ready. Try to replace https with http in the url and see if it works. Alternatively, you should be able to configure your server for https.

I tried to use external geometry and to test it here: https://support.shapediver.com/hc/en-us/articles/360023743572-Component-Display-External-Geometry but without success.

  1. I creare .glb model and uploaded on Amazon S3
    Here is the link: https://s3.eu-central-1.amazonaws.com/test-external1/testexternal.glb stored on public bucket

  2. I made URL public

  3. I add meta data meta data as Content-Type = application/octet-stream for mentioned glb file
    (I also tried with model/gltf-binary without success)

  4. I click on “make public” in order to enable CORS ( I also tried to paste

  5. I paste https://s3.eu-central-1.amazonaws.com/test-external1/testexternal.glb in “file url” model paramters of your test external geometry.

After that, “businessman” 3d model disappeared and my model wasnt shown.
I also tried with your XFormExtGeo grasshopper definition, I uploaded it successfully, but I got only ShapeDiver logo on screen.

What I am doing wrong, how to make it works?

I tested your link in the demo, the console tells me it is a CORS issue:

It is not enough to set the document as ‘public’ in AWS, you also have to manually define the CORS configuration as described in the article. In your bucket got to Permissions -> CORS configuration and paste the header from the article:

<CORSConfiguration>
<CORSRule>
 <AllowedOrigin>https://app.shapediver.com</AllowedOrigin>
 <AllowedMethod>GET</AllowedMethod>
 <MaxAgeSeconds>3600</MaxAgeSeconds>
 <AllowedHeader>access-control-allow-origin</AllowedHeader>
</CORSRule>
</CORSConfiguration>

That being said, i uploaded your file on our bucket with all the right settings and the loading still fails. I tried to add a Content-Encoding ‘gzip’ metadata in case you used the compressing option but that doesn’t seem to work either. Can you send me (in private message) the CAD file you are working with and tell me which settings you used to export it to glb with the export plugin?

I sent you login details for my s3 bucket to check settings few weeks ago as well as email reminders, but still don’t have any answer nor explanation. Can you send any info regarding shapediver external geometry?

I will get back to you asap about your issue, I haven’t had the time to dig into it yet, sorry for the delay.

Dear @mathieu1,

I seem to have the same issue as @Bojan_T.
Having followed the description on https://support.shapediver.com/hc/en-us/articles/360023743572-Component-Display-External-Geometry very carefully, I still can’t get external geometry to get displayed.
I did also take care of the CORS configuration as described.

I think I got everything right with AWS, here is a link to the file:
https://planenkonfigurator.s3.eu-central-1.amazonaws.com/Sphere_Mesh2.glb
Any idea what is still worng?

The glb. file was created using the shapediver Export Plugin for Rhino. I noticed that I can’t open this file with the Windows 3D Viewer as opposed to other glb files.

So, my suspicion was, that there is something wring with the exported glb-file. I subsequently exported a glb-file from the Windows 3D-Viewer Library and uploaded it to my AWS bucket.
https://planenkonfigurator.s3.eu-central-1.amazonaws.com/Basset+Hound.glb
Unfortunately, that doesn’t work either.

Thanks for your help in advance,

best, Simon

Having the same problem I’m hoping for some additional info in this thread.

@Simon_Vorhammer I digged into your glbs and there are some issues (CORS works, well done!):

It’s perfectly fine to use glTF 2.0 assets if you follow these rules:

  • CORS must be configured correctly for the assets
  • for glTF 2.0 assets always make sure the file name ends with .gltf, both for binary and non-binary glTF 2.0 assets
  • use Content-Type application/octet-stream or model/gltf-binary for binary glTF 2.0
  • use Content-Type model/gltf+json or application/json for non-binary glTF 2.0

Using filenames that end with .glb will active the binary glTF 1.0 loader, which expects binary glTF 1.0 files as exported by our export plugin for Rhino.

In the very near future we will release an updated export plugin for Rhino which supports both the legacy binary glTF 1.0 as well as binary glTF 2.0

In one of the next releases of the viewer we will also lift the file naming requirements as explained above, i.e. the viewer will detect automatically whether an asset is a glTF 1.0 or glTF 2.0, the Content-Type will still have to be configured correctly however.

Hope this has shed some light on the problem you are facing, and will allow you to resolve it.

Hi @snabela,

thank you for you extensive reply! I am working together with @Simon_Vorhammer and the external meshes are functioning as intended. However, we are getting the following error in the browser console:

'sdgtfloader: got invalid data for ShapeDiver formats. Returning pure glTF-based object only.' ( GLBLoader.js:796:8)

The error is called through the following lines of code:

if (!sdgTFObject.hasOwnProperty('accessors')) {
    console.warn(
 'sdgtfloader: got invalid data for ShapeDiver formats. Returning pure glTF-based object only.'
);
    resolve(outputGeometry);
    return;
}

I am not really sure what it means for an gltTF object to not have an accessor but could this be related to us still working with glTF 1.0? The geometries were exported months ago still using the old shapediver export app (that exported glTF 1.0). As already mentioned, the external meshes are doing their job just fine right now and the only drawback for now seems to be this warning.

Thank you!

David

Hi @DAUD, I will be able to review this in detail tomorrow. Could you share one of your glTF files with me such that I can try to reproduce this?
You are getting a warning but the loader works as expected apart from that, is that correct?

Hey @Snabela,

correct, we are only getting a warning but everything works as expected. By now, we also tried changing to the glTF 2.0 version using the updated shapediver glTF export plugin and that got rid of the warning. Thank you for your help anyways!

Old version (glTF 1.0 exporter, everything works fine but we get a warning)
https://planenkonfigurator.s3.eu-central-1.amazonaws.com/AWS-Files_100K_Total_SV_191212/Reifen_Mesh_SV_191212.glb

New version: (glTF 2.0 exporter, everything works fine)
https://planenkonfigurator.s3.eu-central-1.amazonaws.com/glTF_Test_200324/ReifenMesh_glTF2.gltf

David

Many thanks for providing the glTF 1.0 which produces the warning. I reviewed it and all seems fine. The warning seems to be unnecessary and we will remove it in a future version of the viewer. Please let us know should you have further questions.