Tuesday, August 4, 2015

Building Simple Urban Development rules Post 3: Adding Detail (Parking)

In the 3rd post of the Building Simple Urban Development rules series, we'll have a look at extending the rules by adding more detail.

In the previous post we divided our building into 4 "types", Commercial, Industrial, Residential and Parks (coloring each one individually). In this post we'll have a look at adding parking areas to our buildings.

Procedural Parking in CityEngine
But first we'll make a couple of assumptions:

  • Parking areas will only be assigned to half of all Commercial buildings
  • Parking areas will start from the floor and will extend to a quarter of the building height.
  • We will add ramps between the parking floors on both sides of the building (up and down)

Attributes

Following the same template for the rest of the post series, we'll first have a look at the attributes added during this post.

Attributes
From the image above, the attributes that were added include:
  • useHeight ( remaining building height after the parking has been subtracted)
  • floorHeight (random number between 2.8 and 4 meters)
  • parkingHeight (roughly a 1/4 of the building height)
  • rampObject (a Collada file for the ramps)
  • Textures
  • Counts for reporting purposes

Rules

There were quite a lot of rules added during this post. The first half of the rules are shown below

Rules added (part 1)

These are:

  • ErrorTracking: Defines whether a building exceeds its height restriction
  • SplitBuilding: Guides 50% of all Commercial buildings to create parking
  • ExtrudeFloor and ExtrudeFloor2: Uses the bottom part of an extruded building (while discarding the sides and top parts) and extrudes it inversely (-Height)
  • CheckDimensions: Verifies that neither sides of the footprint polygon exceed 60% of the length of the other. This helps to cancel out lop-sided buildings
  • HasParking: Checks if a building exceeds it maximum height and splits it accordingly:
    • If it exceeds the max: The building is split into a groundfloor, parking, remaining height and an error
    • If it doesn't exceed the max: It is split into a groundfloor, parking and remaining floors
  • RemainingFloors: Counts and reports on the number of non-parking floors. Splits the remainder of the building into floors and color it
  • CreateFloor: Counts and reports the number of parking floors and uses the bottom part of the floor "cube" to create parking floors.

The second part describing the rules in this post is focused on splitting each floor horizontally into parts in order to create Ramps, General Parking, Ramp Platform and Pillars respectively (see image below).


Splitting the Parking Floors

I think it would be best to look at the above image step-by-step:
  1. 50% of all Commercial buildings are defined as having parking available
  2. Roughly 25% (bottom 1/4) of the building is split into parking floors, and then split again into sections
  3. First, the parking floor is split into three parts (from top to bottom in the image). A ramp on the left, general parking and a ramp on the right
  4. Each ramp is then split into three parts (from left to right). A ramp platform at the top, the actual ramp, and another ramp platform at the bottom
  5. Similarly each ramp platform is split (again) to create pillars.

I know, I know....another long post. So grab a quick cup of coffee and lets wrap this up...



The rules showed in the image above are:

  • ParkingRamps: Splits the parking floor in 3 parts (ramp, parking, ramp)
  • ParkingMain: Textures the general parking area
  • ParkingRampsLeft & ParkingRampsRight splits each ramp into 3 parts (platform, ramp, platform)
  • Each of the ParkingPillar* Rules splits the 4 platforms (4 corners of the building to create pillars)
  • ExtrudePillar: Extrudes the pillar upwards
  • AddRamp: Adds ramps, either upwards or downwards. This rule calls a Collada file and rotates it accordingly
  • Texture: Generic rule that takes a path name to an image as input and applies the texture to the shape

*Disclaimer: This example was made only to show the ability of using procedural rules. These methods are not perfect (far from it) so use the information and techniques on your own risk. 

No comments:

Post a Comment