The ShapeDiverDisplayExternalGeometry component displays static meshes stored in a publicly accessible URL without running them through Grasshopper. This is ideal for optimization purposes when the definition needs to display several times the same identical geometry or when you want to enhance the scene of your definition without compromising the performance.
In order to be able to use this component, the requirements of your file and the URL where it gets stored are:
- The file must use the binary glTF format. All glTF v2.0 files are compatible (using the .gltf extension), but not all advanced features are supported. You can also export gltf files directly from Rhino using the exporter that is included in the ShapeDiver plugin. Read more about the exporter here.
- The URL must be publicly accessible. You can dynamically change this URL by using our ShapeDiverTextInput component.
- You must add the correct metadata to your URL file with Content-Type = application/octet-stream and if the file is compressed Content-Encoding = gzip.
- Make sure the CORS configuration of the bucket allows access. An example of CORS configuration would be:
The geometry placeholder gets displayed in the Rhinoceros viewport as a visual guide to position and orient the external geometry in the ShapeDiver viewer. Ideally, this geometry should be the same one that is stored in the URL so that you can accurately know how the final result will look in the ShapeDiver viewer.
If you require to display your external geometry in an specific position or several positions of your scene, or you need to scale, rotate or do other kind of transformations, you can attach those transformations to your file URL via Grasshopper with our XFormExtGeo C# script. Each transformation will create a new object in your scene so don't forget to Compound your transformations if you want all of them to be applied to a single object.
Test your External Geometry URL
If you want to test if your URL has the right settings, paste it in the next demo model and see if you get the expected result (Be aware that the original scale of the next demo model is 1.8 units high so if your model is way bigger it may not be displayed in the viewer):