How can I assign different roof materials type in CE?

1899
3
09-09-2013 10:50 AM
LeileiDuan1
New Contributor III
Hello,

My name is Leilei and I'm working on generating city 3D models in CE based on property parcel files. I have data showing different roof materials of each building. I was wondering, is it possible to generate the roof according to the material field in the parcel? (in the data set, different numbers represent different roof materials. Such as, 1 = tiles; 2=wood...)

Thank you!
0 Kudos
3 Replies
MatthiasBuehler1
Frequent Contributor II
0 Kudos
LeileiDuan1
New Contributor III
Hi,


You can learn how to do this in the video tutorials 1 - 6.
(http://forums.arcgis.com/threads/64843-CityEngine-Collection-RESOURCES-FAQ-HELP)

Also, do this mini tuto here :
http://forums.arcgis.com/threads/53008-GIS-Data-Mini-Tutorial-Building-Height-and-Floor-Splits

Ok ?

Matt


Thanks Matt!

I was able to generate different roof materials. But when I was working on the wall facade, I wanted to assign different textures randomly to the buildings. The code I used is as follows:

@Group ("WALL FACADE")
@Range ("random", "Facade1", "Facade2", "Facade3", "Facade4", "Facade5", "Facade6")
 comp(f){top: Roof | side : Wall_Facade} 
attr Wall_Facade = "random"
const Function_Wall_Facade = #fileRandom(texture("images/Bldg_Facade2.jpg"))
 case Wall_Facade == "random":
  10% : "Facade1"
  10%  : "Facade2"
  20%  : "Facade3"
  20%  : "Facade4"
  20%  : "Facade5"
  20%  : "Facade6"
 else : Wall_Facade
  
Facade1-->
  setupProjection(0, scope.xy, scope.sx, scope.sy)
  projectUV(0) 
        texture("images/Bldg_Facade1_cropped.jpg")

Facade2-->
.........


There is always an error "Mismatched Token (comp)"  at the code "comp(f){top: Roof | side : Wall_Facade}" . I am not sure what is wrong with these code. I was wondering, could you help me to look at it?

Thanks a lot!!

Leilei
0 Kudos
MatthiasBuehler1
Frequent Contributor II
Hi,

the @Range() and @Group() annotations belong to the attribute.

the comp(f) code fragment is at the complete wrong place there.

ok ?

m.
0 Kudos