GEOG 497
3D Modeling and Virtual Reality

Roof Shapes

Print

Roof Shapes

In the CityEngine CGA grammar rules, basic roof shapes such as flat, hip, gable, pyramid, and shed are defined. Examples of basic rules for different roof shapes are as shown in the figure below:

Screenshot of hip roof with slope 30 degrees, built on top of an extruded L-lot. Overhang distance is set to 2.
Roof Hip
Screenshot of shed roof with roof slope 10 degrees, built on top of an extruded L-lot. The edge index is set to 3 and roof orientation and pivot setting are visible.
Roof Shed
Screenshot of a pyramid with roof slope 30 degrees, built on top on an extruded L-lot. Shows the setting of the pivot and scope.
Roof Pyramid

However, roof structures of campus buildings are complex. For more realistic and sophisticated roof types, new specific rules should be written for each complex building and this inverts the aim of procedural modeling which is facilitating the modeling process instead of hand modeling each building. Instead of writing complex rules or assigning one roof type for each building footprint, a combination of roof types is used for each building. In other words, each section of a building with a different height value has a roof type assigned to it. This has been possible by the use of LiDAR information. Each building is divided into different roof sections based on different heights and types. For instance, the following figure has a complex roof type. The middle parts are flat with various heights. The edges are shed and need a different rule to be applied.

Screenshot of complex roof types
Complex Roof Types

A ‘roof type’ attribute has been created for the building footprints shapefile based on Google Earth images. To select different shapes with similar roof types in CityEngine, a simple python scripting is written. The python editor is executed inside CityEngine and is convenient for writing scripts and executing. The figure below is the window for creating a python module and the next figure shows a sample python code for selecting roof types of the same value.

Screenshot of create a new python module
Create a new python module
Screenshot of python script for 'select by attribute on roof type'
Python script for select by attribute-based on roof type

The script then can be run by pressing F9 or selecting Run Script from the Python menu. Then for selected shapes, the rule parameter of roof type is modified. You can see selected shapes and roof type options in the figure below.

Screenshot of shape selection based on roof type 'flat'
Shape selection based on roof type ‘Flat’.

Screenshot of generated roof types for campus buildings

Generated roof types for campus buildings