Friday, June 6, 2014

Levels of Detail - Building Interiors

I've been focusing on CityEngine CGA rules for building interiors lately. The aim was to create a rule file (or set of rule files) to create a generic layout of a building from 2D shapes at various levels of detail (LOD).

The image below shows various levels of detail of the same shape.


The levels are:

Level 0: The first image (although not actually a LOD) shows a plain 2D shape in its original form.

Level 1: This is simply an extrusion of the building footprint. As the shape does not have any height values associated with it (in this example), the rule file chooses a random height value.

Level 2: This LOD takes the extruded block from Level 1 and divides it into a roof (which creates a simple roof ledge) and sides (which are split horizontally into floors as well as vertically into windows and ledges). An attribute called floor_height is created and implemented by the rule file to split the sides into equal floors.

Level 3: The 3rd LOD creates a detailed 2D layout of each floor. Although in this example the floors are all identical, I plan to extend the rule by creating layouts floor based on floor number (for example creating commercial layouts for ground floors; office spaces for the three following floors and create a residential layout for the remaining floors. For this example all the floors are allocated as office spaces. Each room is color-coded according to the specified use: Blue - Office ; Yellow - Hallway : Red - Conference Room ; and Green - Printer Room.

LOD 3


Level 4: The final level of detail extends the previous levels by displaying a much higher level of building floor utilization. The focus of this LOD is to place, rotate and align building furniture (mostly Collada features obtained from SketchUp 3D warehouse) on the various floors. This LOD also creates stairs which links floors vertically.*


Conference Room
Stairs


Offices

The various LODs were created by selecting the appropriate Level from a rule attributed named LOD. This is what the attribute looks like in the code, as well as the Inspector window:

LOD attribute

This scene is a great example of how CityEngine provides the ability use attributes (and when there is none...create attributes) to dynamically assign various scenarios to the same 2D data and generating 3D geometries.

Explore the scene here.

P.s. If you are bored of the usual office life you can always replace the humans with cyborgs...




*I might have a look at displaying elevators next ;)