Select to view content in your preferred language

How the colors are given to buildings in CityEngine?

2604
4
Jump to solution
07-13-2016 02:24 AM
mansimittal1
Emerging Contributor

I am new to City Engine and using trial version 2011.2.I want to know how the colors are given to buildings?pic.png

Cga rule file for buildings I have written is :-

*/

version "2011.2"

attr BUILD_HEIGHT=0

attr Mass_Color = "#ffaa33"

attr opacityvalue=0.6

@StartRule

Lot-->

   extrude(BUILD_HEIGHT)

   color(Mass_Color)

   set(material.opacity,opacityvalue)

Is there something I am doing wrong or missing ?

0 Kudos
1 Solution

Accepted Solutions
ThomasFuchs
Esri Regular Contributor

Hello Mansi Mittal,

Your CGA code will work just fine with version 2014.1 and above.

Please refrain from using an old version when evaluating CityEngine.
A free trial of CityEngine 2016 is available on Esri CityEngine | Try CityEngine Free

Your workflows will certainly benefit from newly introduced features like:

View solution in original post

4 Replies
LR
by
Frequent Contributor

Your CGA is correct - I'd suspect that the old program version's the culprit here. Maybe try color(1,0,0) instead of hex.

0 Kudos
mansimittal1
Emerging Contributor

Still colors are not showing up.

0 Kudos
ThomasFuchs
Esri Regular Contributor

Hello Mansi Mittal,

Your CGA code will work just fine with version 2014.1 and above.

Please refrain from using an old version when evaluating CityEngine.
A free trial of CityEngine 2016 is available on Esri CityEngine | Try CityEngine Free

Your workflows will certainly benefit from newly introduced features like:

mansimittal1
Emerging Contributor

I got it.Thanks for the help!

0 Kudos