Building Data Overlays

Hi all,

I am looking at implementing Cesium 3D tiles to replace our current workflow within our unity projects.

In the past I have used drone photogrammetry, which I have then manually cut up and implemented a building measures system that would colour up the buildings depending on what data it is looking at, for example building age, costs, tenancy ect.

To achieve this was fairly simple as each building would have its own mesh and material that I could then apply a recolour script to and change to certain colour when a certain metric button is hit.

(see examples below)

As Cesium is streaming in the 3D assets, I would like to find away to filter the buildings I am interested in by colour.

What would be the best way to achieve this?

I have seen this example using and Cesium JS which is pretty much the effect I am after, but I would like to build this with in Unity.

Is it possible to drape the building footprints over certain buildings to achieve this highlighted/recoloured effect within unity?

Any help or direction on this would be much appreciated.

Many Thanks

Ok, yep, there are a lot of details here. Where to begin…

First of all, when you have a single 3D Tiles tileset composed of multiple distinct features (buildings, or whatever you like), there’s a whole system for that. Here’s a high-level overview of it:

And here’s the spec:

So with that in place, it’s possible for a client to distinguish individual features in a larger tileset, and do interesting things with that. In all of our clients, including Cesium for Unity, you can determine which feature was clicked and display its properties. See level 5 of the Cesium for Unity Samples:

In CesiumJS, you can also use this feature information for styling. For example, you can color a particular feature a particular color, or select a color based on the value of a feature’s property. There’s a whole styling language, which is pretty cool. Unfortunately this is quite challenging to implement in game engines like Unity, because they’re not big fans of materials that aren’t defined until runtime. We might get there someday.

In Cesium for Unreal, we have an alternative system that allows you to define a custom material that accesses this feature data, and you can shade based on it how you like. So that would likely solve your problem, but we haven’t implemented it in Unity yet. Soon.

The only thing I can think of that might work today in Unity, is the raster overlay system. You mentioned draping building footprints over a tileset, and that’s exactly what the raster overlay system allows you to do. Currently we can load tiled, georeferenced raster images from a Web Map Service (WMS) or from a Tile Map Service (TMS). It’s also relatively easy to add new sources (but you’ll need to do it in the Cesium for Unity C++ code, as it’s not yet exposed to C#).

With a raster overlay, you can color the buildings, of course. Or you can access the overlay colors in a Material/Shader and do custom things with it.


Thanks for the quick response, I will take a look at the information and let you know how it goes.