In your Grasshopper definition, there are several ways to display geometry and output information to the ShapeDiver online viewer. For technical and security reasons, the number of these outputs is limited in several ways, which we describe below.
Limitations regarding geometry outputs
Definition of file parts
These limitations concern all types of geometry which can be displayed in the ShapeDiver viewer. We call "file part" each piece of individual geometry which makes it to the viewer. This name comes from the fact that each individual object is stored in a separate small file which is downloaded by the viewer and loaded in the scene. This geometry can come from your Grasshopper definition through any component with the preview turned on, the Grasshopper Custom Preview component or the dedicated ShapeDiverDisplayGeometry components. In the first two cases, each component will always produce one single file part, with all the geometry merged into a single mesh. For that reason, it is unlikely that using these components will ever break the limitations.
However, the ShapeDiverDisplayGeometry component gives more control over the data structure that travels to the viewer, which is really useful for some API use cases and for applying advanced materials. More precisely, this component will create a separate file part for each branch of a tree connected to it.
Number of file parts per output
ShapeDiver only allows 64 file parts per output component (ShapeDiverDisplayGeometry or ShapeDiverDisplayExternalGeometry). Always make sure you need to keep your objects separate in a tree. Otherwise, think about flattening your data structure to reduce the number of file parts in the model.
Total number of file parts
Additionally, there is a limit on the total number of file parts in the definition, for all output components combined. ShapeDiver only allows a total of 256 file parts per definition.
Number of transformations per output
In order to make the model faster and lighter, ShapeDiver lets users attach transformations to a single piece of geometry before sending it to a ShapeDiverDisplayGeometry output. That way, only one file part needs to be downloaded to the viewer, and its transformed instances are created directly in the scene.
Using transformations is a good way to load a lot of objects in a scene without hitting the limitation regarding file parts. However, there is also a limitation of transformations for each output: ShapeDiver only allows to attach up to 1024 transformations per output component.
Limitations regarding all outputs
Definition of data parts
Data parts are all the pieces of information and geometry that are loaded in the viewer. This includes the file parts described in the section above, but also some other data types:
- 2D and 3D Text tags (they are compatible with ShapeDiver). In this case, each tag represents one data part, regardless if it is a single element, a list or a tree. The example below shows how to create a list of tags, each representing one data part:
- Data sent to ShapeDiverDataOutput components. This component will preserve the data structure (trees and lists) for ease of access with the API. However, one ShapeDiverDataOutput component only counts for one data part as a whole. Feel free to use them extensively. The example below shows a case where a list of points is sent to a data output, which are compiled in one data part:
Total number of data parts
The total number of data parts allowed is 1024 per definition.
Number of data parts per output
Each output is limited to 256 data parts. In practice, this is mostly a limitation regarding text tags, since file parts are already limited to 64 per output.
Size of a data output
This limitation concerns the raw data size of single data outputs. Each data output is limited to 400kb. This includes the text sent in the body of emails from ShapeDiverEmailExport components.
Limitations regarding textures
For optimal performance, texture images used in a definition should be square and with a size a power of two (128x128px, 256x256px, etc...). If textures don't follow these requirements, they will be resized by our servers.
More importantly, the ShapeDiver viewer currently supports only textures files smaller than 4mb.