<?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: Can CGA be efficient and pithy for different building types? in ArcGIS CityEngine Questions</title>
    <link>https://community.esri.com/t5/arcgis-cityengine-questions/can-cga-be-efficient-and-pithy-for-different/m-p/667943#M8842</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;If projection is to be the same you don't have to set for every texture, you can just set it once at the beginning:&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;....&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;lot--&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;setupProjection(0,scope.xy,~7,~3,0)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;projectUV(0)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Lot2&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Lot2--&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;case buildingType == "class1": buildingTex1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;case buildingType == "class2": buildingTex2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;case buildingType == "class3": buildingTex3&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;buildingTex1--&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;texture("assets/texture/facade2/CRBuilding_1.jpg")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;....................&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;or if you can rename your texture something like "CRBuilding_class1.jpg" you could do this:&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;lot--&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;setupProjection(0,scope.xy,~7,~3,0)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;texture("assets/texture/facade2/CRBuilding_"+buildingType+".jpg")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;projectUV(0)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt; i.e. think about making your attributes and texture names work together:&lt;/STRONG&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 22 May 2014 14:09:24 GMT</pubDate>
    <dc:creator>BenLeslie1</dc:creator>
    <dc:date>2014-05-22T14:09:24Z</dc:date>
    <item>
      <title>Can CGA be efficient and pithy for different building types?</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/can-cga-be-efficient-and-pithy-for-different/m-p/667942#M8841</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;SPAN&gt;&amp;nbsp; I have 30 types of buildings and each type of them have many buildings. I classify buildings with the attribution class1, class2, class3... What's more, I have many different textures. Now I want to give each type of buildings the same texture.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; Now this is what I can do:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; lot--&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; case buildingType == "class1": buildingTex1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; case buildingType == "class2": buildingTex2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; case buildingType == "class3": buildingTex3&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; buildingTex1--&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; setupProjection(0,scope.xy,~7,~3,0)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; texture("assets/texture/facade2/CRBuilding_1.jpg")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; projectUV(0)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; ...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; You can see that I have to do similar things for many times. The texture can be random for different types of the buildings, but it should keep the same texture in the same type of the buildings. The "buildingType" and "buildingTex" are regular, so can I use a pithy method to do this work?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 May 2014 03:06:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/can-cga-be-efficient-and-pithy-for-different/m-p/667942#M8841</guid>
      <dc:creator>qingyangliu</dc:creator>
      <dc:date>2014-05-22T03:06:25Z</dc:date>
    </item>
    <item>
      <title>Re: Can CGA be efficient and pithy for different building types?</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/can-cga-be-efficient-and-pithy-for-different/m-p/667943#M8842</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;If projection is to be the same you don't have to set for every texture, you can just set it once at the beginning:&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;....&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;lot--&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;setupProjection(0,scope.xy,~7,~3,0)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;projectUV(0)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Lot2&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Lot2--&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;case buildingType == "class1": buildingTex1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;case buildingType == "class2": buildingTex2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;case buildingType == "class3": buildingTex3&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;buildingTex1--&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;texture("assets/texture/facade2/CRBuilding_1.jpg")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;....................&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;or if you can rename your texture something like "CRBuilding_class1.jpg" you could do this:&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;lot--&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;setupProjection(0,scope.xy,~7,~3,0)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;texture("assets/texture/facade2/CRBuilding_"+buildingType+".jpg")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;projectUV(0)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt; i.e. think about making your attributes and texture names work together:&lt;/STRONG&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 May 2014 14:09:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/can-cga-be-efficient-and-pithy-for-different/m-p/667943#M8842</guid>
      <dc:creator>BenLeslie1</dc:creator>
      <dc:date>2014-05-22T14:09:24Z</dc:date>
    </item>
    <item>
      <title>Re: Can CGA be efficient and pithy for different building types?</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/can-cga-be-efficient-and-pithy-for-different/m-p/667944#M8843</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;SPAN&gt;&amp;nbsp; It works. I make my attributes and texture names work together and the CGA becomes very pithy. Thanks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have other questions. I want to&amp;nbsp; give one types of the buildings two different textures. This is what I do:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;facadeTexDBuilding--&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; 50% :&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; setupProjection(0,scope.xy,~10,~15,0)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; texture(DBuilding_B_facade)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; projectUV(0)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; else:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; setupProjection(0,scope.xy,~7,~3,0)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; texture(DBuilding_facade)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; projectUV(0)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But sometimes one building will have two different textures. Do you have other good suggestions for this situation?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 25 May 2014 00:53:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/can-cga-be-efficient-and-pithy-for-different/m-p/667944#M8843</guid>
      <dc:creator>qingyangliu</dc:creator>
      <dc:date>2014-05-25T00:53:08Z</dc:date>
    </item>
    <item>
      <title>Re: Can CGA be efficient and pithy for different building types?</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/can-cga-be-efficient-and-pithy-for-different/m-p/667945#M8844</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The 50%: rule looks at each polygon and streams a certain percentage in a certain direction.&amp;nbsp; So if your building is made of 4 polygons (i.e. 4 walls) each one can go into a different stream.&amp;nbsp; So you need to move the 50% rule to a point in your code where each building is only one polygon (i.e. just a building footprint).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 May 2014 10:04:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/can-cga-be-efficient-and-pithy-for-different/m-p/667945#M8844</guid>
      <dc:creator>BenLeslie1</dc:creator>
      <dc:date>2014-05-28T10:04:47Z</dc:date>
    </item>
  </channel>
</rss>

