CityEngine - color gradient rule file?

290
3
03-21-2018 12:48 PM
KathrynAngleton
New Contributor III

Hi GeoNet community!

By any chance, does anyone know if there's an existing rule file to apply to buildings/shapes to colorize them based off attribute data like you can with color ramps in ArcGIS? I'd like to apply a graduating color scheme to my shapes to emulate a heat map. If no such rule file exists, how would I go about creating one? Would I need to assign RGB/CMYK values to specific data breaks?

Am I better off trying to create a raster of this data and draping it over my extrusions in CityEngine? I'm sure I could do this in ArcScene, but I'm partial to CityEngine's rendering quality.

Thanks!

0 Kudos
3 Replies
LR
by
Regular Contributor

Write a conditional rule. I usually use Excel for this so I can easily adjust the values.

Example:

case somevalue > 3 && somevalue <= 5: color("#FF0000")
case somevalue > 5 && somevalue <= 10: color("#00FF00")
else: color("FFFFFF")‍‍‍
0 Kudos
KathrynAngleton
New Contributor III

LR, I found the colorRamp utility function here:

colorRamp function—Esri CityEngine | ArcGIS Desktop 

This is what I was looking for, however, my range is very large (min=0, max=39,500) and the default is only 5 breaks. Do you know how to add more breaks? With only 5, every single shape except for one is showing up in the same color.

0 Kudos
CherylLau
Esri Regular Contributor

The colorRamp() functions has access to a list of more than 5 colors.  For each color map, there are 36 colors (although I don't guarantee that they look visibly different).  Specify the value parameter to be any number in the range [0, 1].

0 Kudos