Skip to content

Cookie preferences

We use cookies for our own analytics, to see how our campaigns perform and, if you allow it, to load content from other services such as the Google site search. We never sell your data. Necessary cookies keep the site working and cannot be switched off. See our Cookie Policy for details and our Privacy Policy for how we handle personal data.

Security, load balancing and remembering your cookie choice.

Show us which pages people read and how they find the site, so we can improve it (Google Analytics).

Show us which of our ad campaigns bring visitors to the site and remember the campaign or partner link you arrived from (Google Ads, partner program). We do not use these cookies to build advertising profiles.

Load the site search from Google when you use it. Google sets its own cookies and shows ads in the search results.

© 2026 The ThingsBoard Authors
Try for free

ThingsBoard Cloud

Choose your data region

Your data stays in the region you choose, for residency and compliance. No credit card required.

Rather run it yourself? Install on your own servers

3D Model Viewer

  • Widget
  • 597 installs
  • v1.0.0
  • Jun 15, 2026
  • MIT license
  • v4.2+

Renders a GLB 3D model on a ThingsBoard dashboard and binds each entity in the datasource to a named mesh via its meshId attribute. Color, tooltip, and label functions are evaluated per entity to update mesh appearance and overlays from live telemetry. A ‘Use for level’ data-key flag drives a fill-level animation — ideal for cutaway silos, tanks, and other volumetric containers. Mesh clicks fire an action that can be wired to dashboard state changes for drill-down navigation.

Widget Type
  • Latest
Category
  • Controls
Use Cases
  • Smart Energy
  • Smart Metering
  • Smart Building
  • Smart City
  • Smart Office
  • Tank Level Monitoring
  • Waste Management

Who it’s for

Industrial operators, SCADA engineers, and plant managers ask “how do I show my plant floor, silo yard, or tank farm as a live 3D model where each asset changes color based on real telemetry?” This widget turns a GLB 3D model into an interactive scene that reacts to live device data.

What it does

The widget loads a GLB model and maps each entity in your datasource to a named mesh inside it. An entity with meshId = "Silo.003" and fillLevel = 72 lights up the Silo.003 mesh in a color returned by your color function and shows a fill-level animation driven by the fillLevel key. Clicking a mesh fires an action that can navigate to a drill-down dashboard for that asset.

  • Per-entity mesh coloring driven by a JavaScript color function that receives live telemetry and attribute values
  • In-scene tooltips and labels from configurable functions evaluated per entity on every data update
  • Fill-level animation for one designated key, used to visualize grain volume in silos or fluid level in tanks
  • Mesh click action wired to dashboard state transitions for drill-down navigation
  • Renders the meshes one GLB holds; it is a scene view rather than a per-asset detail view

The Silo Monitoring solution template installs a dashboard built around this widget, which is the quickest way to see it working against real entities:

Silo monitoring pinkevych.d

How to set up

Data keys

KeyRoleTypeDescription
meshIdMesh mappingAttributeMust match the mesh name in the GLB (e.g. Silo.001); required on every entity

Any further keys on the datasource are passed to the color, tooltip and label functions as fields of entity, so they are read by whatever those functions do with them rather than by the widget itself — add the ones your functions branch on. One of them can additionally drive the fill-level animation: name it in Level mesh id and turn on Use level, and the widget reads it as a 0–100 % figure.

Widget settings

SettingDefaultEffect
Model sourcePublic URLWhere the GLB comes from — a direct URL, or a resource uploaded to Resources library → General and referenced by id
Model URLthe silos_scene model from the models repository belowThe GLB the scene is built from
Mesh typeSiloPrefix that selects which mesh group the widget binds to — Silo for yard meshes, Sensor for cutaway meshes. One GLB may hold both
Camera X / Y / Z2.5 / 2.5 / 2.5Initial camera position; use the p shortcut (see Tips) to capture exact values after orbiting to the view you want
Use level / Level mesh idoff / Grain_VolumeTurns on the fill-level animation and names the mesh it drives
Color functiononf(ctx, entity, entities) returning the hex color for the entity’s mesh
Tooltip functiononf(ctx, entity, entities) returning the HTML tooltip shown on mesh click
Label functionofff(ctx, entity, entities) returning the in-scene label drawn next to the mesh

How to customize

  • To change what color a mesh shows — edit the color function; it receives the entity with all its data keys, so you can branch on alarm state, threshold, or any attribute.
  • To switch between yard and cutaway views — change the Mesh type prefix to select a different group of meshes from the same GLB.
  • To use your own GLB model — upload it to ThingsBoard resources or host it at a public URL, then update Model source. Ensure mesh names follow the Prefix.001, Prefix.002, … convention so they match your entities’ meshId attributes.
  • To label the meshes in the scene — turn on Label function and return the markup you want drawn beside each mesh.

Tips

  • To find the best camera position: orbit the model to the framing you want in the live dashboard, press p, then open the browser DevTools console — the widget logs the exact set(x, y, z) values ready to paste into the Camera fields.
  • The widget requires WebGL / hardware acceleration. If the canvas stays blank and the console shows THREE.WebGLRenderer: A WebGL context could not be created, enable hardware acceleration in browser settings (support can be checked at get.webgl.org).
  • The shipped Model URL points at the thingsboard-silo-glb-models repository, which also holds the sensor cutaway model and a generator for other silo counts — mesh names there follow the Silo.001 / Sensor.001 convention out of the box.

Share Your Widget with the Community

Built a custom widget? Export it as a JSON from ThingsBoard and publish it to the IoT Hub through a simple 4-step wizard (Upload, Listing, Readme, Review & Submit). Share it with thousands of ThingsBoard developers worldwide and get featured in the catalog.