<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: facade wizard for roofs? in ArcGIS CityEngine Questions</title>
    <link>https://community.esri.com/t5/arcgis-cityengine-questions/facade-wizard-for-roofs/m-p/520479#M7062</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The Facade Wizard creates CGA code which is 'hardcoded' to work automatically only on vertical ( world orientation yUp, direction of gravity ) shapes properly by default.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Note that the Facade Wizard produces rules which should only be assigned to exactly rectangular shapes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you look at any rule created that way, you'll note a thing:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;gt; any split done is in scope.sx or scope.sy&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you watch this video closely :&lt;/SPAN&gt;&lt;BR /&gt;&lt;A class="jive-link-external-small" href="http://forums.arcgis.com/threads/44417-CGA-Understanding-the-concept-of-the-scope" rel="nofollow" target="_blank"&gt;http://forums.arcgis.com/threads/44417-CGA-Understanding-the-concept-of-the-scope&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;you'll learn that after a comp(f), the scope is automatically aligned 'zUp'. Means after an initial first extrusion of a footprint, after this Mass'es comp(f){side.. }, you'll get Facade shapes with a zUp scope, scope.sz being 0 since the polygon is flat. Thus also logically follows that any split must be done in x and y direction.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now in your case, where you do e.g. a comp(f) to get the sloped or flat roof shape, theoretically all splits produced are already ok and usable, since those splits are always done RELATIVE to the scope, no matter what the orientation in the world is.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So in theory, you should get this working very fast. I did never try this yet, but it's worth a try.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Let me know ..&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;m.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 Sep 2013 10:42:59 GMT</pubDate>
    <dc:creator>MatthiasBuehler1</dc:creator>
    <dc:date>2013-09-12T10:42:59Z</dc:date>
    <item>
      <title>facade wizard for roofs?</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/facade-wizard-for-roofs/m-p/520478#M7061</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am wondering if there is a way to procedurally adapt roof images in the same way the façade wizard works. I have a solar array and a green roof image that I am trying to tile based on the random building size and shape. So if the building is larger, it adds another tile of the image to the initial one so that the scale of the image stays constant and realistic.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any suggestions appreciated, thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Sep 2013 15:25:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/facade-wizard-for-roofs/m-p/520478#M7061</guid>
      <dc:creator>CarmenHull</dc:creator>
      <dc:date>2013-09-11T15:25:26Z</dc:date>
    </item>
    <item>
      <title>Re: facade wizard for roofs?</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/facade-wizard-for-roofs/m-p/520479#M7062</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The Facade Wizard creates CGA code which is 'hardcoded' to work automatically only on vertical ( world orientation yUp, direction of gravity ) shapes properly by default.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Note that the Facade Wizard produces rules which should only be assigned to exactly rectangular shapes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you look at any rule created that way, you'll note a thing:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;gt; any split done is in scope.sx or scope.sy&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you watch this video closely :&lt;/SPAN&gt;&lt;BR /&gt;&lt;A class="jive-link-external-small" href="http://forums.arcgis.com/threads/44417-CGA-Understanding-the-concept-of-the-scope" rel="nofollow" target="_blank"&gt;http://forums.arcgis.com/threads/44417-CGA-Understanding-the-concept-of-the-scope&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;you'll learn that after a comp(f), the scope is automatically aligned 'zUp'. Means after an initial first extrusion of a footprint, after this Mass'es comp(f){side.. }, you'll get Facade shapes with a zUp scope, scope.sz being 0 since the polygon is flat. Thus also logically follows that any split must be done in x and y direction.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now in your case, where you do e.g. a comp(f) to get the sloped or flat roof shape, theoretically all splits produced are already ok and usable, since those splits are always done RELATIVE to the scope, no matter what the orientation in the world is.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So in theory, you should get this working very fast. I did never try this yet, but it's worth a try.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Let me know ..&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;m.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Sep 2013 10:42:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/facade-wizard-for-roofs/m-p/520479#M7062</guid>
      <dc:creator>MatthiasBuehler1</dc:creator>
      <dc:date>2013-09-12T10:42:59Z</dc:date>
    </item>
    <item>
      <title>Re: facade wizard for roofs?</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/facade-wizard-for-roofs/m-p/520480#M7063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks, Matt,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I did watch the video and it worked at one point when the roof was a flat object but when I added the Lot--&amp;gt; extrude, it gave a white box without the image.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the code that I modified from the gen_Facade_.cga file, I think I have conflicting alignScope commands...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;attr LOD = 2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# LOD 0 generates the original texture&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# LOD 1 generates flat splits&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# LOD 2 generates splits with depth as defined in Facade Wizard&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;#! SIZE 30.0 17.423582&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;const n = 3&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Lot --&amp;gt; extrude(10)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; comp(f) {top : alignScopeToGeometry(yUp, 0, world.lowest)Roof.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; | side:Facade.}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Roof --&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; case LOD &amp;lt;= 0:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; texture("/CityEngine_ForestLawn/images/plastic_panels.jpg")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; setupProjection(0, scope.xy, '1.0000, '1.0000)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; projectUV(0)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; else:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; texture("/CityEngine_ForestLawn/images/plastic_panels.jpg")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; split(y, noAdjust) { ~5.84: Roof__1(0) | ~4.67: Roof__1(1) | ~6.91: Roof__1(2) }&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;RoofTrigger(i) --&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; case LOD &amp;lt;= 0:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; texture("/CityEngine_ForestLawn/images/plastic_panels.jpg")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; setupProjection(0, scope.xy, '1.0000, '1.0000)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; projectUV(0)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; else:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; texture("/CityEngine_ForestLawn/images/plastic_panels.jpg")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; Roof__1(i)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Roof__1(i) --&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; case i == 0: Roof__1_1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; case i == 1: Roof__1_2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; case i == 2: Roof__1_3&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; else: Roof__1_1&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Roof__1_1 --&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; split(x, noAdjust) { ~13.21: Roof__1_1_1 | 2.29: Roof__1_1_2 | 14.50: Roof__1_1_3 }&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Roof__1_1_1 --&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; setupProjection(0, scope.xy, '2.2707, '2.9822)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; projectUV(0) &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Roof__1_1_2 --&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; setupProjection(0, scope.xy, '13.1258, '2.9822, '-5.7806, '0.0000)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; projectUV(0) &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Roof__1_1_3 --&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; setupProjection(0, scope.xy, '2.0686, '2.9822, '-1.0686, '0.0000)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; projectUV(0) &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Roof__1_2 --&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; setupProjection(0, scope.xy, '1.0000, '3.7302, '0.0000, '-1.2508)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; projectUV(0) &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Roof__1_3 --&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; split(x, noAdjust) { ~3.91: Roof__1_3_1 | 17.68: Roof__1_3_2 | ~8.40: Roof__1_3_3 }&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Roof__1_3_1 --&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; setupProjection(0, scope.xy, '7.6630, '2.5215, '0.0000, '-1.5214)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; projectUV(0) &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Roof__1_3_2 --&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; setupProjection(0, scope.xy, '1.6968, '2.5215, '-0.2214, '-1.5214)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; projectUV(0) &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Roof__1_3_3 --&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; setupProjection(0, scope.xy, '3.5695, '2.5215, '-2.5695, '-1.5214)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; projectUV(0) &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is this the right approach? Thank you, it would be very cool to get this working &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Sep 2013 16:01:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/facade-wizard-for-roofs/m-p/520480#M7063</guid>
      <dc:creator>CarmenHull</dc:creator>
      <dc:date>2013-09-12T16:01:24Z</dc:date>
    </item>
    <item>
      <title>Re: facade wizard for roofs?</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/facade-wizard-for-roofs/m-p/520481#M7064</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It actually didn't need any scope rotation, so it works perfectly just by changing the façade id to roof &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the pointers.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Sep 2013 15:38:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/facade-wizard-for-roofs/m-p/520481#M7064</guid>
      <dc:creator>CarmenHull</dc:creator>
      <dc:date>2013-09-13T15:38:35Z</dc:date>
    </item>
    <item>
      <title>Re: facade wizard for roofs?</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/facade-wizard-for-roofs/m-p/520482#M7065</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi again,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am now trying to tile the roof textures so that they don't stretch out of proportion. I've tried the tileUV and the scaleUV but neither seems to have an effect. Could you explain in a bit more detail how this should work? The texture will be applied randomly on different sizes of buildings so it needs to adapt.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Carmen&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Sep 2013 15:56:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/facade-wizard-for-roofs/m-p/520482#M7065</guid>
      <dc:creator>CarmenHull</dc:creator>
      <dc:date>2013-09-20T15:56:42Z</dc:date>
    </item>
    <item>
      <title>Re: facade wizard for roofs?</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/facade-wizard-for-roofs/m-p/520483#M7066</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Here is the piece of code I am using...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Roof --&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; 10% : texture("/CityEngine_ForestLawn/images/Greenroof2.jpg")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; alignScopeToGeometry(zUp, 0, world.lowest)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; setupProjection(0, scope.xy, '1.0000, '1.0000)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; scaleUV(0, 20, .5)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; projectUV(0)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Sep 2013 15:57:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/facade-wizard-for-roofs/m-p/520483#M7066</guid>
      <dc:creator>CarmenHull</dc:creator>
      <dc:date>2013-09-20T15:57:12Z</dc:date>
    </item>
    <item>
      <title>Re: facade wizard for roofs?</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/facade-wizard-for-roofs/m-p/520484#M7067</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;usually setupProjection() and projectUV() go right after each other, because projectUV() 'bakes' the UVs into the geometry based on the last projection. Scaling existing UVs in between will show no effect.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;once UVs are projected, you can rotate , translate, tile them, ..&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;tileUV() takes metric values, so e.g. '~2' means tile the texture approximately each 2 meters.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ok so far ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;m.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Sep 2013 11:56:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/facade-wizard-for-roofs/m-p/520484#M7067</guid>
      <dc:creator>MatthiasBuehler1</dc:creator>
      <dc:date>2013-09-24T11:56:58Z</dc:date>
    </item>
  </channel>
</rss>

