Further to my London post I’ve also been experimenting with flood mapping in CityEngine and how best to display it in a webscene. 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. Okay this is a modification of this previous rule file it’s been one of my more popular posts in recent weeks. 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. 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,scope.sx,scope.sy,scope.sz) >, 350 : '#ff0000' case convert(y,pivot,world,pos,scope.sx,scope.sy,scope.sz) >, 330 : '#ffff00' case convert(y,pivot,world,pos,scope.sx,scope.sy,scope.sz) >, 330 : '#00ff00' case convert(y,pivot,world,pos,scope.sx,scope.sy,scope.sz) >, 300 : '#00ffff' case convert(y,pivot,world,pos,scope.sx,scope.sy,scope.sz) >, 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. Source.


Яндекс.Метрика Рейтинг@Mail.ru Free Web Counter
page counter
Last Modified: December 30, 2013 @ 12:00 am