Browsed by
Category: forestry

Towards a 3D British Tree Species CityEngine Library

Towards a 3D British Tree Species CityEngine Library

The ESRI.lib plant (trees) rule file is great but why is the most detailed ‘model’ a default?

I’ve talked about trees in CityEngine before, but not in any great detail.  The fact is 3D urban models look really dull without a few trees and plants. Come to think of it so does the real-world! 

A 3D model of Durham, UK looks way better with 90,000+ trees in it! 

I know the ESRI.Lib has a Plants directory and an amazing list of trees all in ‘Model’, ‘Analyical’, and ‘Fan’ 3D model types.  The Plant_Loader.cga and Plant_Distributor.cga I consider one of the most useful rule files for users in CityEngine, simply because it saves us time.   However it is quite North American in its approach and I’ve always meant to add to it with some ‘tweaks’ to reflect how I work and how I train others in my CityEngine courses.

Exciting dropdown lists! (work in progress)

So I’ve started a new project in CityEngine!   It is the start of a British specific tree species rule file, I’ve adapted a list of the British tree species (native and non-native) from the Woodland Trust.

Like this, but more (and British Specific).

I’ve made simple small steps at first and I’ve started at the interface (inspector pane in the CityEngine interface).  I’ve used the ESRI.Lib as a basis for an approach but obviously I want ‘British’ tree species.

After the overall structure of the interface and how it gets 3D assets to use is settled I will start trying to source 3D assets that represent these species.  That’s the difficult bit for each species Esri has done 3 models (model, analytical, and fan).  Whether I can finish this on my own is doubtful, so I will be adding this soon to my Github account and hoping others can help.  Now, I’m not a big user of Github at all but it seems a good place to do this.

Feel free to contact me directly if you want more information or better yet want to help!

3D Flood Mapping Landscapes with CityEngine

3D Flood Mapping Landscapes with CityEngine

Further to my London post I’ve also been experimenting with flood mapping in CityEngine and how best to display it in a webscene.

The webscene is not animated you have to switch each on in turn…

I’ve been finding that small increments just don’t work very well (lots of z fighting).   On the plus side the new tree rendering in CityEngine 2013 webscenes is fantastic.

You can view the webscene below on my company’s ArcGIS Online site.

Biblical title for this webscene, maybe I should model the Ark too…

CityEngine + OS Opendata + Forestry Rule file Part 2

CityEngine + OS Opendata + Forestry Rule file Part 2

Okay this is a modification of this previous rule file it’s been one of my more popular posts in recent weeks.

Forest coloured by elevation range and tree heights by underlying geology layer

So as the caption says I’ve used to methods to control colour and height of trees.  Using the scatter function I place my tree and then colour via an elevation test and scale via a brightness test on some geology data.

Tree density is controlled by a tree per square metre variable.

Not wishing to put the whole rule out there, here are the relevant tests, if you know anything about CityEngine you’ll probably tell me there’s another way…

attr colourbyelevation = //test by heighest first > greater than xxx metres
case convert(y,pivot,world,pos,,, > 350 : "#ff0000"
case convert(y,pivot,world,pos,,, > 330 : "#ffff00"
case convert(y,pivot,world,pos,,, > 330 : "#00ff00"
case convert(y,pivot,world,pos,,, > 300 : "#00ffff"
case convert(y,pivot,world,pos,,, > 0 : "#0000ff"
else : "#00000"
attr treehegeotypeightbygeology =
case GeoType > 0 : 50
else : 25

The beauty of CityEngine is apparent when you realise this doesn’t have to be trees or elevations or geology, and you can combine these tests with other rules to make something truly complicated.

CityEngine + OS Opendata + Forestry Rule file

CityEngine + OS Opendata + Forestry Rule file

Happy New Year everyone!  After a successful break I came back to the office bursting with ideas for new CityEngine models and here is one I can share with you.   It successfully combines a small but neat forestry rule file, allowing me to adjust tree height based on old and new growth in varying proportions (20% old growth, 80% new growth).   I’ve used a road rule file from a middle eastern project.  I’ve then downloaded OS OpenData which includes terrain, street network and vectormap data (

As you can see the model is coming along, what I really like is drawing freehand a road network that just magically appears on my terrain all textured up.

Inappropriate wind turbine site and bridges?

The terrain colouring isn’t perfect I know, but it will have to do for now until I can get some satellite imagery.   I can see a real use for CityEngine beyond city visualisations, perhaps I was on to something with this previous post .

I think I may add something about this model to my presentation at the GeoDesign Summit, at the end of this month.