CityEngine specify spatial contagion

1450
4
06-02-2017 06:57 AM
awei
by
New Contributor III

Hello,

I hope to use CityEngine to create a forest that has height, species, density, spatial contagion (0 denotes very clustered and 1 denotes not clustered) data. I'm using LumenRT library following this document http://www.e-onsoftware.com/wiki/LumenRT/index.php/Documentation/Export_Plugins/Esri_CityEngine_Plug... 

But I found the above document only provides limited functions, and I didn't find a way to incorporate spatial contagion into my visualization. Are there other libraries I can use? Or should I use Python plug in?

0 Kudos
4 Replies
awei
by
New Contributor III

@Chris Wilkins

0 Kudos
CherylLau
Esri Regular Contributor

Esri.lib has a rule called Plant_Distributor.cga.  You can use this rule to distribute plants on a shape.  There are attributes that let you control the height range, the mix of species, the density, and the distribution.  Maybe the attribute Distribution will help?

Or, if you want to place plants according to a different distribution, you can write a rule that uses the Plant_Loader to insert the plant at your desired location.  The scatter() operation might help in creating a uniform or gaussian distribution.

scatter Operation 

0 Kudos
awei
by
New Contributor III

to follow up this question, scatter function does help. however, since clustering is a very localized effect, the plant distributor and plant mixer do not help much. The problem is I need thousands of plant clusters, each cluster has a specified number of plants, but the scatter function is global control. The solution I'm thinking now is to first scatter thousands of points, and then for each point, scatter the specified number of plants around it. But the scatter function doesn't take point object...do you have a better solution?

--Jade

0 Kudos
CherylLau
Esri Regular Contributor

This is a good idea to use the first scatter to get the clusters and then for each cluster perform another scatter to get the plants.  You can create a surface around each cluster point and then perform the next scatter on that.

The following code creates 3 cluster points and, for each cluster, inserts a 10x10m quad surface on which a subsequent scatter is performed to get 6 points per cluster.

Lot -->
     scatter(surface, 3, uniform) { Cluster }
     
Cluster -->
     s(10,0,10)
     center(xz)
     primitiveQuad
     scatter(surface, 6, gaussian) { Point }