Hi there,
I’d love to know is there’s any method to colorize like building heightmaps the Google Tiles on Unreal such as this example:
There’s unfortunately no simple or out-of-the-box way to do what you’re looking to achieve. The issue comes down to the different nature of the Google P3DT dataset and the CityGML, KML, and other similar file types being discussed in the article you linked. For example, the OSM 3D Buildings dataset is built from hand-edited and curated data assembled by the Open Street Map community. Each building is a discrete item in the dataset, so we can store information about it and use that information for things like styling.
Google’s Photorealistic 3D Tiles dataset, on the other hand, is assembled using photogrammetry - an algorithm that creates 3D models using a set of pictures of the scene taken from various angles and sources (usually aerial imagery). This means that it doesn’t really have a concept of a “building.” Somebody could go in and annotate that dataset to mark which things are buildings and which are just trees or other features, but to my knowledge nobody’s done that work, at least where it’s publicly available and in a format that we can use.
Now, with all that being said, there’s a few ways you can kind of achieve what you’re asking for:
- Create a material that colorizes everything based on its height. You could set a threshold at ground level so that only things above a certain height are colorized. There’s some issues with this approach. The main one is that “ground level” varies wildly from place to place. You can use the EGM96 support to get some indication of where “sea level” is for the area you’re talking about, but this would still be an issue if, for example, there’s a mountain near your city. This would also colorize every object above “ground level,” which would almost certainly include trees, cars, and other non-building objects.
- You can fake it by overlaying the OSM 3D Buildings tileset over the top of your Google P3DT tileset. This would get you that visual illustrated in the article you linked. Of course, this would mean your buildings would be untextured colored polygons instead of fully detailed 3D models like in the P3DT dataset, and might cause issues where the Google P3DT buildings poke through the OSM 3D Buildings and cause visual artifacts.
I don’t think either of these are particularly good solutions, so I think the short answer (now that you’ve read all this) is, no, there’s not currently a method to achieve this.