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 format of the geometry must be .glb, a binary form of glTF format. If you don't have this format, you can download our Rhinoceros exporter sdGltfExporter here. Be aware that this is a beta version and some of the setting options are not usable. The settings that you can work with depending on your needs are: Zip (For compressing the file), Materials (Set it to No if you want to apply the materials externally using our ShapeDiverSimpleMaterial or ShapeDiverMaterial components), MaterialSource, Normals, TextureCoord and VertexColors.
- 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):