City Engine color

7023
19
Jump to solution
03-08-2013 12:38 AM
chiaramallegni
New Contributor
Hi,
I need to color with different color each building from one single group using the same rule for each building. I would classified with different color each building following an attribute (value field). How to do? What is the right CGA rule?
Thank's
chiara
0 Kudos
19 Replies
chiaramallegni
New Contributor
Hi,

I have published this project on arcGis online but on ArgGIS on line dislplay (the color of building change, being wrong or not visible, for exemple the flat became unvisible (http://chiara.maps.arcgis.com/apps/CEWebViewer/viewer.html?3dWebScene=e983c5523f39454bae41fc5b568819...).
Why????

[ATTACH=CONFIG]22596[/ATTACH] this is my correct building in city engine.
0 Kudos
MatthiasBuehler1
Frequent Contributor
hi ..

I can not log on there .. it seems.

I can log onto ArcGIS.com, but not this site .. weird .. is this a special account of yours ?


Concerning visibility :

Check the visibility buttons in the web viewer when open.

Maybe post also a screenshot of the web scene since I cannot access this one.

Otherwise, try to track the issue down one by one, e.g. only exporting 1 building, then 2, then 3, ..


Ok ?

M.
0 Kudos
chiaramallegni
New Contributor
0 Kudos
MatthiasBuehler1
Frequent Contributor
Hi,

this is hard to say without access to the data.

really step through each element and export it individually.

e.g. select only the green areas and export them to 3ws, then export only the walls and so on.

you then should find the actual issue and be able to reproduce it.

if there's really a bug, I'll then have to be able to reproduce the issue here on my machine anyway.


if you cannot track it down, post the data here.

ok ?

Matt
0 Kudos
chiaramallegni
New Contributor
Hi, I've tried what you told me but...the problem dosn's stop...the wrong is about the floor's colors, (in my data each room aren't in the same building but consisting in several building one on above each other -extrudes with an attribute for the height: Q_GRONDA-). I would visualize each room floor with differnt color but while I see in right way on City Engine I can't see the same things onArcGis online ( http://chiara.maps.arcgis.com/apps/CEWebViewer/viewer.html?3dWebScene=08df4bcd3452468fbfc325d9617fed...).
I can post my rule:

/**
* File:    color.cga
* Created: 6 Mar 2013 15:33:57 GMT
* Author:  Chiara
*/

version "2012.1"
// Attributes
attr Q_GRONDA = 1
attr AREA_VANO = ""

// Functions

Chartreuse = "#7FFF00"
LimeGreen = "#32CD32"
ForestGreen = "#228B22"
yellow = "#FFFF00"
Aqua = "#00FFFF"
Blue = "#0000FF"
CornflowerBlue= "#6495ED"
DeepSkyBlue = "#00BFFF"
RoyalBlue = "#4169E1"
SkyBlue = "#87CEEB"
DarkTurquoise = "#00CED1"
Fuchsia = "#FF00FF"
DarkViolet = "#9400D3"
DarkMagenta = "#8B008B"
Magenta = "#FF00FF"
Plum = "#DDA0DD"
Violet = "#EE82EE"
PaleVioletRed = "#DB7093"
MediumOrchid = "#BA55D3"
LightSkyBlue = "#87CEFA"
LightPink = "#FFB6C1"
Red = "#FF0000"
GreenYellow = "#ADFF2F"
Gainsboro = "#DCDCDC"
White = "#FFFFFF"
WhiteSmoke = "#F5F5F5"
PaleGreen = "#98FB98"
// Start !

@StartRule


lot --> extrude (Q_GRONDA)
Colorizer
Colorizer -->
    case AREA_VANO == "E1_2" :
        color(Chartreuse)
     comp (f){ side : facade. | bottom : bottom.}
    case AREA_VANO == "E2_2" :
        color(LimeGreen)
        comp (f){ side : facade. | bottom : bottom.}
    case AREA_VANO == "3_2" :
        color(ForestGreen)
        comp (f){ side : facade. | bottom : bottom.}
       
    case AREA_VANO == "E1_1" :
        color(Aqua)
        comp (f){ side : facade. | bottom : bottom.}
    case AREA_VANO == "E2_1" :
        color(Blue)
        comp (f){ side : facade. | bottom : bottom.}
    case AREA_VANO == "E3_1" :
        color(CornflowerBlue)
        comp (f){ side : facade. | bottom : bottom.}
    case AREA_VANO == "E4_1" :
        color(DeepSkyBlue)
        comp (f){ side : facade. | bottom : bottom.}
    case AREA_VANO == "E5_1" :
        color(RoyalBlue)
        comp (f){ side : facade. | bottom : bottom.}
    case AREA_VANO == "E6_1" :
        color(SkyBlue)
        comp (f){ side : facade. | bottom : bottom.}
    case AREA_VANO == "E7_1" :
        color(DarkTurquoise)
        comp (f){ side : facade. | bottom : bottom.}
       
    case AREA_VANO == "E1_0" :
        color(Fuchsia)
        comp (f){ side : facade. | bottom : bottom.}
    case AREA_VANO == "E2_0" :
        color(DarkViolet)
        comp (f){ side : facade. | bottom : bottom.}
    case AREA_VANO == "E3_0" :
        color(DarkMagenta)
        comp (f){ side : facade. | bottom : bottom.}
    case AREA_VANO == "E4_0" :
        color(Magenta)
        comp (f){ side : facade. | bottom : bottom.}
    case AREA_VANO == "E5_0" :
        color(Plum)
        comp (f){ side : facade. | bottom : bottom.}
    case AREA_VANO == "E6_0" :
        color(Violet)
        comp (f){ side : facade. | bottom : bottom.}
    case AREA_VANO == "E7_0" :
        color(MediumOrchid)
        comp (f){ side : facade. | bottom : bottom.}
    case AREA_VANO == "E8_0" :
        color(PaleVioletRed)
        comp (f){ side : facade. | bottom : bottom.}
    case AREA_VANO == "RETRO" :
        color(PaleGreen)
        comp (f){ side : facade. | bottom : bottom. | top : roofHip(30,0.5) Roof. }
        set (material.opacity, 0.5)
    case AREA_VANO == "SCALINATA" :
        color(PaleGreen)
        comp (f){ side : facade. | bottom : bottom. | top : roofHip(30,0.5) Roof. }
        set (material.opacity, 0.5)
       
    case AREA_VANO == "B1_0" :
        color(LightSkyBlue)
        comp (f){ side : facade. | bottom : bottom.}
    case AREA_VANO == "B2_0" :
        color(LightPink)
        comp (f){ side : facade. | bottom : bottom.}
    case AREA_VANO == "B1_2" :
        color(LightSkyBlue)
        comp (f){ side : facade. | bottom : bottom.}
    case AREA_VANO == "B2_2" :
        color(LightPink)
        comp (f){ side : facade. | bottom : bottom.}
       
    case AREA_VANO == "SCALA1_0" :
        color(yellow)
        comp (f){ side : facade. | bottom : bottom.}
        case AREA_VANO == "SCALA1_1" :
        color(yellow)
        comp (f){ side : facade. | bottom : bottom.}
        case AREA_VANO == "SCALA1_2" :
        color(yellow)
        comp (f){ side : facade. | bottom : bottom.}
        case AREA_VANO == "SCALA2_0" :
        color(yellow)
        comp (f){ side : facade. | bottom : bottom.}
        case AREA_VANO == "SCALA2_1" :
        color(yellow)
        comp (f){ side : facade. | bottom : bottom.}
       
    case AREA_VANO == "PORTA1_0" :
        color(Red)
        comp (f){ bottom : bottom.}
    case AREA_VANO == "PORTA2_0" :
        color(Red)
        comp (f){ bottom : bottom.}
    case AREA_VANO == "PORTA3_0" :
        color(Red)
        comp (f){ bottom : bottom.}
    case AREA_VANO == "PORTA4_0" :
        color(Red)
        comp (f){ bottom : bottom.}
    case AREA_VANO == "PORTA5_0" :
        color(Red)
        comp (f){ bottom : bottom.}
    case AREA_VANO == "PORTA6_0" :
        color(Red)
        comp (f){ bottom : bottom.}
    case AREA_VANO == "PORTA7_0" :
        color(Red)
        comp (f){ bottom : bottom.}
    case AREA_VANO == "PORTA8_0" :
        color(Red)
        comp (f){ bottom : bottom.}
    case AREA_VANO == "PORTA9_0" :
        color(Red)
        comp (f){ bottom : bottom.}
    case AREA_VANO == "PORTA1_1" :
        color(Red)
        comp (f){ bottom : bottom.}
    case AREA_VANO == "PORTA2_1" :
        color(Red)
        comp (f){ bottom : bottom.}
    case AREA_VANO == "PORTA3_1" :
        color(Red)
        comp (f){ bottom : bottom.}
    case AREA_VANO == "PORTA4_1" :
        color(Red)
        comp (f){ bottom : bottom.}
    case AREA_VANO == "PORTA5_1" :
        color(Red)
        comp (f){ bottom : bottom.}
    case AREA_VANO == "PORTA6_1" :
        color(Red)
        comp (f){ bottom : bottom.}
    case AREA_VANO == "PORTA7_1" :
        color(Red)
        comp (f){ bottom : bottom.}
    case AREA_VANO == "PORTA8_1" :
        color(Red)
        comp (f){ bottom : bottom.}
    case AREA_VANO == "P1_1" :
        color(Red)
        comp (f){ bottom : bottom.}
    case AREA_VANO == "P2_2" :
        color(Red)
        comp (f){ bottom : bottom.}
    case AREA_VANO == "P3_2" :
        color(Red)
        comp (f){ bottom : bottom.}
       
    case AREA_VANO == "I_1_0" :
        color(GreenYellow)
        comp (f){ side : facade. | bottom : bottom.}
    case AREA_VANO == "MURA" :
        color(White)
         comp (f){ side : bottom. | side : facade.| side: side.| top: top.}
    else :
        color(White)
        comp (f){ side: side. | front : front. | side : facade. | bottom : bottom. | top: top.}

What could be happened?

Thank's

Chiara
0 Kudos
MatthiasBuehler1
Frequent Contributor
Hi !


Do you have Skype ?

Maybe it's best to talk via Skype to track this down.


If you have Skype, please send me a PM here on the forum with your Skype address.

Let me know.

Matt
0 Kudos
chiaramallegni
New Contributor
Hi Met,
My skype conctat is: chiarapreistoria. I'm waiting for you on skype.
Bye Bye.

Chiara
0 Kudos
MarcoPesci
New Contributor
Whats the code for the color Gray?
0 Kudos
JoanneO_Brien
Occasional Contributor
it depends on what colour grey you're after, if you google hex colours you'll find many websites which contain all the different hex values for colours 🙂
0 Kudos
MatthiasBuehler1
Frequent Contributor
Whats the code for the color Gray?


hi ..

grey is when you have the same color values for r,g,b.

some extremes of grey would be black or white. ( wow, people will quote me on this in 100 years ! 🙂 )

e.g.

color(0.2,0.2,0.2)

or in hex :
color("#222222")

hex colors work like this (per channel):
00 is darkest, then it goes up to 99, then comes AA up to FF, which is white.

ok ?

matt
0 Kudos