AnsweredAssumed Answered

Insert 3D model onto 2D lot

Question asked by tgdang-esrisa-esridist on Oct 6, 2012
Latest reply on Oct 9, 2012 by MBuehler-esristaff
Hi, I'm new to CityEngine so please excuse me if the following question I'm asking is something too obvious.

I have a 2D multipatch layer which contains polygons representing building and its respective height. Most of the building consists of more than 1 polygon with different height value. I write a rule file which extrudes 3D models base on the HEIGHT attributes.

The problem is some of the lots are landmark buildings, and for these building I need to replace the extruded models with Collada models,

I didn't want to manually drag and drop the model onto the lot, so what I did was:
1. Combined faces of the polygons which belong to the same building, and give it a start rule (namely "Taka1")
2. In my .cga rule file I added this code:
attr taka1 = "<link to .dae file>"  Taka1 -->  s(0,0,0)  i(taka1)

The result is not as I expected: The model was off the lot and its orientation is not correct either. See screenshot below:

When I drag and drop the model on to the layer, the orientation is correct. See screenshot below:

I don't know if the way I'm doing is correct or not, nor if it is the best way yet. Any suggestion is welcome.