Wednesday, February 17, 2021

 Test of icon I made.



Wednesday, April 8, 2015

What's new in CityEngine 2015

New version of CityEngine is out. Elliot Hartley already mentioned it in his blog post but there are some other changes. One prominent change is Scene tab. Here is the default appearance (for Redlands Redevelopment project.


From this it may not be clear what is the left square used for. It is used to assign a colour to that layer. Simple click on the box brings up a colour selector and result is like below.



Another new feature of Scene tab is ability to create layer groups . In Scene tab right mouse click and from context menu select New, Group Layer


New group is empty and one can just simply drag & drop layers into the group, just like in ArcMap. Of course, new group layer can have a colour assigned. If it is assigned it overrides colours of layers within it.



From CGA standpoint getTreeKey is important. From help documentaion:

The unique TreeKey of the shape being derived, formatted as a string list. The TreeKey is a list of integer numbers denoting the path from the root shape to the shape being derived in the shape tree. Each number denotes the 0-based child index

Sample code for using getTreeKey

CGA Code
Init-->
    print(getTreeKey() + " - Init") 
 center(xz)
 extrude(10)
 comp(f) { front: Facade}
 
Facade-->
 print(getTreeKey() + " - Facade")
 split(y) {'0.5 : Floor }*
 
Floor-->
 print(getTreeKey() + " - Floor")
 split(x) { '0.1 : Wall | '0.3 : Window | '0.1 : Wall }*
  
Wall-->
 print(getTreeKey() + " - Wall")

Window-->
 print(getTreeKey() + " - Window")


and it's output

0; - Init
0;0; - Facade
0;0;0; - Floor
0;0;1; - Floor
0;0;0;0; - Wall
0;0;0;1; - Window
0;0;0;2; - Wall
0;0;0;3; - Wall
0;0;0;4; - Window
0;0;0;5; - Wall
0;0;1;0; - Wall
0;0;1;1; - Window
0;0;1;2; - Wall
0;0;1;3; - Wall
0;0;1;4; - Window
0;0;1;5; - Wall

More on new features when I spend little bit more time with this version.

Tuesday, September 16, 2014

CityEngine 2014.1 released

New version of CityEngine, 2014.1 is released. It is not a major release but there are new features and bug fixes.

Here are new features:

new operations:
  • deleteHoles operation.
new functions:
  • geometry.nHoles function.
  • geometry.isClosedSurface function.
new CGA Utility Library functions:
  • listTerminate function
new features:
  • alignScopeToGeometry, convexify, envelope, cleanupGeometry, innerRect, scatter, setback, shape{L|U|O} and reduceGeometry operations and geometry.isClosedSurface, geometry.area (with selector) functions: holes in polygons are now supported.
  • convexify, innerRect, offset, shape{L|U|O} operations: uv coordinates and vertex normals are not deleted anymore but interpolated for new inner vertices.
  • convexify, innerRect, offset operations: result is not planarized anymore.
  • color, operation: support for setting opacity (alpha).

In short better support for holes and addition of colour transparency.


Changes to existing features:
  • Changed the defaults for recursion detection:
    • Maximum derivation depth: from 99 to 1024.
    • Maximum derivation width: from 50000 to 100000.
    • Maximum function call depth: from 256 to 1024.
  • Optimized function memory overhead (i.e. more interleaved functions beyond the default limit are possible now before crash - actual limit depends on platform & function).
  • Collada reader: added support for polygons with holes.
  • str function and print, report operations: made float-to-string conversion independent of locale (some numbers might be formatted differently now).
  • Internal geometry cleanup: improved handling of illegal holes (overlapping holes, wrong vertex order).

That's it for initial post. More information fill follow when I get more time to try it out.

Thursday, December 12, 2013

New in CityEngine 2013 - Part 4

Street improvements

In the last post I describe the situation when I import land parcel and road centrelines and the problem there is that parcels don't have defined street edge/frontage. In 2012 one can select the required edge of a parcel and set it as First/Street edge. To do that for whole lot you had to reach to Python. With Python script there were cases requiring multiple runs but it was doable. With CE 2013 new option is available - 'Compute First/Street Edges'.


Running this on example parcels and roads from previous post red shows the street edges.


This is great improvement and I'll use this on regular basis.

Another new feature is ability to create more realistic motorway/freeway connections/intersections. Here is an example of default smart type of intersection.


After selecting the node I can change it to 'Freeway' to achieve this:


This of course changes the shape of road segment and the changes are as below.




The last option I'll test today is changing the curves from straight to curves. There are no changes here so example pictures will suffice.











New in CityEngine 2013 - Part 3

Now I am re-creating a project in CE2013 I did very recently in the previous version. Following the same steps and using default settings of CE2013 I noticed some differences in generated blocks and models. The demo I was working on is using Desert City example rules and assets and here is the screenshot from version 2012.


When doing the same workflow in 2013 here is what I got


In CE2013 blocks have rounded corners and the models for buildings have less variation. Comparing street creation setting from both versions in 2013 street width is now 7 (changed from 14) and lane width setting is not there. So far I can't confirm if rounding of the created blocks is a result of change in import module for OSM. I'll do more testing and post the results soon.

Majority of local councils in New Zealand use CRS (Core Record System) as source of parcel and road centreline data. Importing these in CE (after some cleanup of parcels) would produce situation like below.


In this release we can use 'Fit Widths to Shape' option from Graph menu. To test this I have intentionally picked an area where we have simple, straight streets and some more interesting ones. The result is shown below.

Some work is required and it could be as simple as tuning the parameters used. I will definitely explore this option whole lot more.

While talking about street shapes, there are new standard shapes (and rules) available

  • Freeway
  • FreewayEntry
  • RoundaboutIsland
  • Roundabout
  • RoundAboutEntry
  • Joint




This opens up options for greater tuning and control of street shapes. I like the options for roundabouts since there are lot of them in New Zealand.

Next option to explore is bridge generation but for that I'll have put aside little bit more time...

Wednesday, December 11, 2013

New in CityEngine 2013 - Part 2

Now all tutorial and examples are downloaded and it is time to check Change log. Elliot Hartley already had a post showing these here but I'll check if there are any changes since then.

There are no changes, so that list is still valid.

From that list here are the ones I'll have closer look:


  • envelope operation due to great power and applications in planning
  • cleanupGeometrycompextrudesplit operations for supporting holes. This may produce interesting models. geometry.nFacesgeometry.area,geometry.volume functions support holes (there is a risk of losing them in subsequent operations)

Important changes:


attr/const functions evaluation order - "Starting with 2013.1, all attr/const functions are evaluated before the start rule is applied, on the initial shape with a seedian derived from the initial shape's seedian. The initial shape's random number generator state is not affected. While the new approach makes CGA coding more "intuitive", it changes the behaviour compared to older versions.". This will require change of habits and bit more structure when writing rules

inf/nan checks: "CGA 2013.1 introduces a unified inf/nan behaviour: checking of all float paramers of builtin functionality can be set to either "ignore" (= don't check), "abort with error" or "replace with zero" see Grammarcore Preferences). The default behaviour is "replace with zero", which comes closest to the classic behaviour." While CGA 2013.1 provides more debugging capabilities regarding inf/nan values, the behaviour is different than in previous versions.


Envelope operation

New parameter direction is added with two options - normal or world.up. Changing existing rules won't be difficult and all you need to do is change from 

envelope(MaxHeight, FrontBaseHeight, FrontAngle, BackBaseHeight, BackAngle, SideBaseHeight, RightAngle, SideBaseHeight, LeftAngle)

to 

envelope(world.y, MaxHeight, FrontBaseHeight, FrontAngle, BackBaseHeight, BackAngle, SideBaseHeight, RightAngle, SideBaseHeight, LeftAngle)

for the rule I had in my example. So if you are importing your existing 2012 projects minor changes will be required but you may want to consider using new features and functions and keep in mind important changes listed above.

While this is useful addition there is room for improvement or handling of special cases. Several city councils in New Zealand have a requirement for building envelopes determined by a combination of street and compass orientation. I should put this on ides site and see how many votes it will get.

Now it's time to review and rewrite previous work.

New in CityEngine 2013 - Part 1

After a long wait CityEngine 2013.1 is finally released. At the moment it is available for distributors only but general release will follow in few days.

Here I'll describe new features as I encounter them while working with CE 2013. This is by no means ranking or other "top X features" list.

Here we go!

Installation

If you already have CE 2012 you can install CE 2013 in different folder (default location is fine) and having single use I didn't have to do anything license wise. Furthermore, now I can run both versions on my machine! Not in the same time of course. As usual, we have examples and tutorials available for download. These are updated for new version but I don't expect any dramatic changes.

CityWizard


New City Wizard looks very much like the old one. It is still using same heightfield, texture and obstacle map.



New are the structure of the assets folders and large number of textures (400+).  Also we now have 80 new trees created by e-on software in 3 different forms. These are handled by a separate rule in the wizard.

Fan tree

Model tree

Analytical tree


There is a new addition to user interface - a progress bar when generating models.


Of course, new rules are driving the City Wizard but I didn't have time yet to explore and learn from this example.

That's it for now, more to come.