About CityEngine Blog


CityEngine is a great tool that is able to create large scale models, mainly of cityscapes, quickly, and with the ability to make adjustments based on a rule file in a procedural manner.

I hope to show you some of the work I have done with CityEngine creating a variety of models across a range of projects. I have mainly used the software for planning applications but have learnt a great deal of the potential for other applications.

I want to concentrate on the writing of rule files which is the core use of CityEngine. Without rule files no 3D content can be generated and this is very important to understand. I will also strive to bring news and updates regarding CityEngine as well.

I hope you find what I share useful and please feel free to share and contribute your thoughts and experience.


Saturday, 31 August 2013

CityEngine Starter Project 1


Now that I had an idea of a simple project that would introduce me to creating my own rule file, I needed to set-up a project workspace and generate 2D data to use as base geometry. I will skip quickly through the set-up demonstrated here and spend more time in the next few posts going through the rule file generation in more detail.

To begin the starter project the first thing that I needed to do was to import some map layers that I could use as base data on which to work. I decided that I would use a randomly chosen greenfield site on which to build the models and it would also be interesting to build it on a DEM (Digital Elevation Model) or terrain.

From a geospatial perspective this is extremely easy as data that we use includes aerial photography and LiDAR generated DEM's. These are both imported as a JPG or TIF file and added to the Viewport window. CityEngine can be a little fussy when it comes to the type of JPG or TIF that you import. Simply they cannot be too large  (and the size depends on the actual coverage area and the resolution of the data). The area shown in the below image is roughly 2x2km and has a pixel size of 1 metre. This is quite high detail and I really don't think that in future I would use such high resolution data and will instead re-sample the data down.


I created a small road network within the black rectangle shown in the image above. I used the aerials to draw roads (rather than use the Grow Streets tool) which generated blocks from which a parcel network was created. After the road and parcel networks were complete I used the Align Graph to Terrain and Align Terrain to Shapes tools so that the data sat nicely on top of the DEM.

The image below shows the simple block arrangement of the roads and parcels. There are six blocks, five of which are residential and one that is commercial.


Block attributes for the residential parcels were set-up as shown in the image below.


That's pretty much the scene set. As the road and parcel network have been created entirely in CityEngine I will be able to utilise the operations in a very simple way. This will provide a good understanding how the operations work. When it comes to data that we import it becomes a little trickier (I'll show how to deal with some aspects of this in a later project). 

One point to note is that its clear that there are two distinct processes creating data within CityEngine. The first process is the import or generation of data used as base geometry. The second is the creation of a rule file that can be applied to the base geometry to generate models.

In the next post - Starter Project 2, I shall show how I began to create a rule file.

Wednesday, 28 August 2013

The first CityEngine Blog post

Welcome to CityEngine Blog!

So where to start. I think first up will be a simple project that I used to get my head around CityEngine and its capabilities. After going through the CityEngine tutorials I thought it best to create a really simple project that would allow me to begin writing rule files of my own and expose me to the type of programming needed to procedurally create models.

Initial thoughts:

1. I had never used CityEngine before
2. I had never done any programming before
3. I didn't fully understand the capabilities of CityEngine
4. I needed to think of a project to get me on my feet.

There isn't a great deal of information around regarding the actual writing of rule files, not like other languages such as Java Script, HTML or Python for example. I didn't (and don't) think that this is entirely bad as it offers a blank book on how rule files could or should be created. Sources of information I have found to be useful so are:



I would strongly recommend visiting these sites for information regarding CityEngine and some of the uses one can make of it. The tutorials provided by Esri were useful as an introduction which allowed my to understand the type of capabilities and programming and so now I needed to think of an example project.

I work as a Geospatial Analyst for local government and planning is probably the biggest customer of our services. As a result it made sense to try and gear a project towards generating models that might be of interest to them.

The first project subsequently was one where I could:

1. Create a simple road and parcel network
2. Generate a rule file that creates building models based on a few rules that are likely to appear in a planning document such as a district plan or any other development control rulebook.
3. Create a simple visualisation in CityEngine to demonstrate its capabilities and the use of sliders.

All of this culminated in a small starter project that would create a small town that would contain residential and commercial zones. Buildings for both zones would be generated in the same rule file but along different branches. Simple planning rules such as building coverage and building height would be included and to give the buildings a little more realism some simple façade's based on modelling rather than textures would be generated.

In the next blog posting I'll begin the journey through the starter project and will show how you can do the same. If you're not into planning, I think that the project may still hold some useful information, especially on the way in which I have decided to structure a rule file as well as some calculations that could be used in a whole range of applications.