Youtube Video

Context

Before we dive into the process, let's understand the context. We’ve created a simple tower facade panels, and each panel has a designated material. We've also added two attributes:  Area and Z coordinate. Our goal is to color the elements in the 3D Viewer based on these attributes using conditional formatting.

::: tip
We won’t cover how to extract user attributes in this tutorial. If you want to learn more about that, refer to our Power BI playlist on YouTube.
:::

Speckle Model Used

Accessing Conditional Formatting Dialog

To access the conditional formatting dialog:

  • Select 3D Viewer Visual
  • In the Visualizations pane, select Format Your Visual tab.
  • Expand Object Display
  • Click the fx button to open the dialog.

Coloring by Gradient

  • In the conditional formatting dialog, select Gradient as the Format Style.
  • What field should we base this on: Select the field to base the formatting on. We will select the Z coordinate.
  • Summarization: Specify the aggregation type you want for the selected field. We’ll stick with the Sum.
  • How should we format empty values: Select a value to format empty values. We’ll keep them as zero.
  • Define Colors: Select the colors for the minimum and maximum values. Optionally, you can define a middle value too.
  • Click OK.

That’s it! Now, take a look at the 3D Viewer Visual. Panels are colored based on the Z Coordinate. Transition from blue to yellow to red indicated the range of Z coordinates, from min to max.

Modifying Colors

Our current Color By input, doesn’t allow you to modify the colors. This will definitely change in the future and we’ll support overriding the colors. But as a workaround, you can use conditional formatting, especially for numerical values.

Conclusion

There you have it! You now know how to use conditional formatting feature of 3D Viewer Visual. This adds an extra layer of insights to your models, making them more engaging and informative.

If you have any questions of a feedback, Speckle Community is the perfect place.