tonineumann

Building Rule with Texture

Discussion created by tonineumann on Oct 20, 2011
Latest reply on Oct 28, 2011 by MBuehler-esristaff
I m new with CityEngine, and also with this kind of scripting...
I found in the old forum this script for a rule file for a simple shape with a border on the roof:

attr height = 21
attr parapet_height = 2
attr parapet_width = .25

Lot --> extrude(height)Building

Building --> comp(f) { front : Facade | side : Sidefacade | top : Roof | bottom : Base}

Base --> NIL

Roof --> offset(-parapet_width)
comp(f) { inside: color("#fff000") I | border: O }

I --> t(0, 0, -parapet_height)
extrude (parapet_height) Rmass

Rmass --> comp(f) { vertical : Rside | bottom : Rbase | top : Rtop }

Rtop --> NIL


now i tried to combine it with texture on the roof. Somehow it doesnt work,
here is the script:

attr height = 21
attr parapet_height = 2
attr parapet_width = .25

Lot --> extrude(height)Building

Building --> comp(f) { front : Facade | side : Sidefacade | top : Roof | bottom : Base}

Base --> NIL

Roof --> offset(-parapet_width)
comp(f) { inside: color("#fff000") I | border: O }
(here i would like to change it for a texture, but than the roof doesnt work anymoore)

I --> t(0, 0, -parapet_height)
extrude (parapet_height) Rmass

Rmass --> comp(f) { vertical : Rside | bottom : Rbase | top : Rtop }

Rtop --> NIL


does anyone have a solution?
thanks

Outcomes