{"id":509,"date":"2012-03-02T13:46:34","date_gmt":"2012-03-02T13:46:34","guid":{"rendered":"http:\/\/www.geoplanit.co.uk\/?p=509"},"modified":"2012-03-02T13:46:54","modified_gmt":"2012-03-02T13:46:54","slug":"landuses-create-a-woodland-random-tree-scatter","status":"publish","type":"post","link":"https:\/\/www.geoplanit.co.uk\/?p=509","title":{"rendered":"Landuses &#8211; Create a woodland &#8211; Random Tree Scatter"},"content":{"rendered":"<p><a href=\"http:\/\/forums.arcgis.com\/threads\/51940-Creating-a-City-from-GIS-data-Landuses?p=177509&amp;viewfull=1#post177509\" target=\"_blank\">This is duplicate post of a discussion I started on ESRI\u2019s CityEngine support forum<\/a><\/p>\n<figure id=\"attachment_510\" aria-describedby=\"caption-attachment-510\" style=\"width: 444px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.geoplanit.co.uk\/wp-content\/uploads\/2012\/03\/ce_landuses1_tree_scatter.jpg\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\" wp-image-510  \" title=\"Tree Scatter\" src=\"https:\/\/i0.wp.com\/www.geoplanit.co.uk\/wp-content\/uploads\/2012\/03\/ce_landuses1_tree_scatter.jpg?resize=444%2C301\" alt=\"\" width=\"444\" height=\"301\" srcset=\"https:\/\/i0.wp.com\/www.geoplanit.co.uk\/wp-content\/uploads\/2012\/03\/ce_landuses1_tree_scatter.jpg?w=925&amp;ssl=1 925w, https:\/\/i0.wp.com\/www.geoplanit.co.uk\/wp-content\/uploads\/2012\/03\/ce_landuses1_tree_scatter.jpg?resize=300%2C203&amp;ssl=1 300w\" sizes=\"auto, (max-width: 444px) 100vw, 444px\" \/><\/a><figcaption id=\"caption-attachment-510\" class=\"wp-caption-text\">I know roads don&#39;t really look like that...<\/figcaption><\/figure>\n<p>A quick CGA rule share here! This one allows you to place randomly a selection of tree models on a lot (with start rule &#8220;woodland&#8221;). In my city model I wanted to place some trees in open areas by a river so this was a quick solution. This places a number of random trees (100) of different sizes and ranges, I&#8217;ve also allowed for a setback so when the lot fronts a road the trees are not right up against it.<\/p>\n<p>Obviously you can change the names of the rules to what you use and you could combine this with the landuses code I posted first in this discussion thread.<\/p>\n<p>If you need a tree you could use SketchUp and if you have the free version you might want this OBJ exporter plugin<\/p>\n<pre>tree_asset = fileRandom(\"trees\/tree*.obj\") \/\/ you could just have *.obj and it would randomly pick any obj file in this directory, you can use sketchup to create an obj\r\nattr treenumber = 100 \/\/change this depending on your lot size, or maybe run an area test on the lot to determine the density of your woodland!\r\nattr treeminheight = 5 \/\/ know your tree to get that realistic height, perhaps wiki it?\r\nattr treemaxheight = 15\r\nattr woodlandsetback = 5\r\n\r\nwoodland--&gt;\r\n\tsetback(woodlandsetback) { streetSide : woodlandborder | remainder : trees} \r\n\r\ntrees--&gt;\r\n\tscatter(surface, treenumber, uniform) { palmtree }\r\n\twoodlandground\r\n\r\nsingletree--&gt;\r\n\tt(0,0,0) \/\/ you can change these numbers as well if you didn't want to place the tree at the scatter point centre\r\n\ts(0,rand(treeminheight ,treemaxheight ),0)\r\n\tr(0,rand(0,360),0) \/\/ rotates tree at a random rotation\r\n\ti(tree_asset)\t\r\n\r\nwoodlandborder--&gt;\r\n\t extrude(1) woodlandbordercolor\r\n\r\nwoodlandground--&gt;color(\"#005B00\")\r\n\r\nwoodlandbordercolor--&gt;color(\"#AAAA55\")<\/pre>\n<p>As usual if anyone has any suggestions\/thoughts\/modifications please reply!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is duplicate post of a discussion I started on ESRI\u2019s CityEngine support forum A quick CGA rule share here! This one allows you to place randomly a selection of tree models on a lot (with start rule &#8220;woodland&#8221;). In my city model I wanted to place some trees in open areas by a river [&hellip;]<\/p>\n","protected":false},"author":161,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"tdm_status":"","tdm_grid_status":"","footnotes":""},"categories":[12,116,145,7,25,54,162,9],"tags":[],"class_list":["post-509","post","type-post","status-publish","format-standard","category-arcgis","category-city-creation","category-cityengine","category-gis","category-planning","category-tips","category-trees","category-workflow"],"_links":{"self":[{"href":"https:\/\/www.geoplanit.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/509","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.geoplanit.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.geoplanit.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.geoplanit.co.uk\/index.php?rest_route=\/wp\/v2\/users\/161"}],"replies":[{"embeddable":true,"href":"https:\/\/www.geoplanit.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=509"}],"version-history":[{"count":3,"href":"https:\/\/www.geoplanit.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/509\/revisions"}],"predecessor-version":[{"id":513,"href":"https:\/\/www.geoplanit.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/509\/revisions\/513"}],"wp:attachment":[{"href":"https:\/\/www.geoplanit.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=509"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.geoplanit.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=509"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.geoplanit.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=509"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}