Visibility
When viewing aspects of a larger digital twin it is often necessary to hide certain parts of the model. For example, to show the location of an asset on a floor in a building it may be beneficial to hide the floors above so that the asset becomes fully visible. Hiding or showing parts of the model can also be used to display changes in the model during the building life cycle. Certain areas may be expanded or renovated and these changes may only become visible at a certain point in time. This allows you to go back in time and see the digital twin in an earlier state, such as at the start of its construction.
Topics
A small apartment building has three floors, or storeys, a basement and a roof. We create a topic for each storey that links to the node in the GLTF/IFC file. The subtopic visible
specifies if the floor is visible. Value 1
represents visible, and 0
represents invisible. A value between 0
and 1
could be used to set the transparency, so that the objects linked to the node become somewhat visible.
units.B03.geometry = Apartments.gltf
units.B03.storey_1.node = IfcStorey_1
units.B03.storey_1.visible = 1
units.B03.storey_2.node = IfcStorey_2
units.B03.storey_2.visible = 1
Model
A model is created by including the main topic units.B03
, which loads all the subtopics for the storeys as well. To change the visibility, you can click on one of the floors in the 3D model, and then change the visibility to 0
.
Explanation
When the GLTF of the apartment building is rendered, the database of topics is searched for a subtopic .node
with a value equal to the name of the node. If found, the database is searched for a subtopic .visible
. If found, the visibility of the node is set to the value. If the visibility is set to 0
, all nodes below the selected node are invisible as well.