Hello everyone! This is my first post here, and probably the answer to most of my questions is RTFM! In my defense, I spent some time checking out the viewer and the code base but couldn’t find a definitive answer to some of these questions. Hence, creating this post!
Background
I had a call today with @Ami_Nigam to discuss the new Rhino panel for the Pollination Rhino plugin we ran a test study and I was telling him about the new option to download the visualization as an HTML, and he told me that they would probably use Speckle instead. He baked the results to Rhino and used the Rhino connector to push (is this what you call it?) it to Speckle, and in a few seconds, we had the results showing up on the web → Speckle - That gave me an excuse to test the viewer after a long time, and I should say that it has come a long way! Great work Speckle team!
Then I started to think about two possibilities:
-
To write a translator from Pollination’s VisualizationSet schema to Speckle schema. That way it will be easier for Pollination and Ladybug Tools users to stream the results to Speckle. This is something that has come up a few times but there are workarounds to do it by baking the results and using the Speckle connectors.
-
[Maybe] using the Speckle viewer as the default viewer for Pollination instead of our Pollination viewer. This is a high-risk and major change but it will justify writing the translator, and it will also make our life easy in the future since we don’t have to develop and maintain a separate viewer.
You can check out the Pollination Viewer here: Webpack App. It is built using the vtkjs library and is using react as the framework which is compatible with our front-end and the rest of the development stack. Here is a self-contained HTML file with the viewer if you want to give it a try: visualization_detailed.html (3.2 MB)
Questions
Now even though the Speckle viewer has many nice features that the Pollination viewer doesn’t currently have like comments, nested layer structure, and shadows it has a few critical features that seem to be missing from the Speckle viewer.
1. Legends
Am I right that the Speckle viewer doesn’t support legends? Are there any examples of having legends with color-sets based on data attached to a geometry? In what we do, colors without legends are not that useful. If you check the example that I shared you can see that a single geometry can have different datasets attached to it, and each dataset can have its own legend parameters. This felt out of the current scope of the viewer. I saw a discussion or two that it has come up but I didn’t see any serious discussion about the details of how legends might be implemented.
2. Embedding viewer in other applications
We reuse the viewer almost everywhere. In Rhino, Revit, on the web, inside Streamlit apps, etc. I saw that there is an option to embed the viewer on a web page but is there an option to create a standalone HTML file that can be saved and loaded? That’s how we currently use the viewer inside the Revit plugin. I couldn’t find an example for this one.
3. Using the viewer without a server
This is a dumb one! Do we always need a Speckle server for streaming the geometries to the viewer or is there a static version of the viewer that can be embedded in an app without a server? From what I have seen so far, the answer is no but I hope that I’m wrong.
Thank you, and I hope tomorrow evening’s event to be a great one!