Change the appearance of a 3D object scene layer with different renderers.

Use case
A scene layer of 3D buildings hosted on ArcGIS Online comes with a preset renderer that defines how the buildings are displayed in the application. However, the fill color may sometimes blend into the basemap, making the buildings difficult to distinguish. To enhance visualization, you can apply a custom renderer with a more contrasting fill color, helping the 3D buildings stand out more clearly. Additionally, you can use a unique value renderer to represent different building uses, or a class breaks renderer to visualize building ages - valuable insights for urban planning and analysis.
How to use the sample
Wait for the scene layer to load. The original scene layer displays 3D textured buildings. Tap on the renderer picker and choose a different renderer to change how the buildings are visualized. Each renderer applies different symbology to the scene layer. Setting the renderer to nil will remove any applied symbology, reverting the buildings to their original textured appearance.
How it works
- Create an
ArcGISSceneLayerfrom a service URL. - Add the scene layer to an
Sceneand display it in aSceneView. - Create different renderers:
- A
SimpleRendererwith aMultilayerMeshSymboland a fill color and edges. - A
UniqueValueRendererusing a string field and differentMultilayerMeshSymbolfor each unique value of the building usage. - A
ClassBreaksRendererusing a numeric field and differentMultilayerMeshSymbolfor each value range of the year the building was completed.
- A
- Set the scene layer’s
rendererproperty to the selected renderer. - Set the scene layer’s
rendererproperty tonil, resulting in displaying the original texture of the buildings.
Relevant API
- ArcGISSceneLayer
- ClassBreaksRenderer
- MaterialFillSymbolLayer
- MultilayerMeshSymbol
- SceneView
- SimpleRenderer
- SymbolLayerEdges3D
- UniqueValueRenderer
About the data
This sample displays a Helsinki 3D buildings scene hosted on ArcGIS Online, showing 3D textured buildings in Helsinki, Finland.
Tags
3D, buildings, renderer, scene layer, symbology, visualization