AnsweredAssumed Answered

Random Textures on Multipatch Buildings

Question asked by kareenb on Sep 23, 2013
Latest reply on Sep 26, 2013 by kareenb
Hello,
I am using ESRI CityEngine 2012.1. I am new to ESRI CityEngine and I could use some help to apply a random texture, e.g. roof texture (Pantile_*.tga), to buildings imported from an ESRI Multipatch file.

I have found two similar threads on this forum
(http://forums.arcgis.com/threads/71808-Random-texture and http://forums.arcgis.com/threads/81351-Texture-random-and-depending-on),
but unfortunately I still cannot quiet figure it out: All the buildings get the same roof texture???


version "2012.1"  texPath = "assets/roofs/" const textureIndex = rint(rand(0, 2))  @StartRule Lot -->  cleanupGeometry(all, 0.1) Houses   Houses -->  alignScopeToAxes()  comp(f){    vertical: Facade |    aslant: Roof    }   Roof -->  alignScopeToGeometry(zUp, any, world.lowest)  setupProjection(0, scope.xy, 3, 3, 1)  projectUV(0)  texture ( texPath + "Pantile_" + textureIndex + ".tga" )



So I hope that someone can give me some additional tips.
Thank you!

Best regards,
Kareen

Outcomes