<?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: using mapping layer to generate doors/entrances on building models in ArcGIS CityEngine Questions</title>
    <link>https://community.esri.com/t5/arcgis-cityengine-questions/using-mapping-layer-to-generate-doors-entrances-on/m-p/550125#M7428</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The reason why the vertical split pieces are not getting the color information from the map layer is because only the initial shape can read the map layer information. &amp;nbsp;The attribute Red_texture is set to a value that it gets from the map layer before any rules are executed. &amp;nbsp;The map layer is sampled at the center of the initial shape. &amp;nbsp;When the rules are executed, each piece of the split has the attribute Red_texture = 0 because the map layer was sampled once for the initial shape at the center of the initial shape.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Possible Solution:&lt;/P&gt;&lt;P&gt;Create another shape the size of the map layer. &amp;nbsp;Then, put a rule on this shape that splits the shape into grid cells with the size of your door. &amp;nbsp;Then, create static shapes out of each grid cell (Shape -&amp;gt; Convert model to shapes). &amp;nbsp;On each grid cell shape, assign a rule that has an attribute that connects to the map layer. &amp;nbsp;Instead of red circles, use red squares in your map image (since the grid cells are square and sampling happens at the center). &amp;nbsp;Then, each grid cell shape will have an attribute value that comes from the map layer, and this value will be 1 where there should be a door and 0 otherwise. &amp;nbsp;Also in the rule, if the grid cell corresponds to a door location (attribute value is 1), then create an extruded shape (some shape with a volume), and otherwise, do not create any geometry (NIL). &amp;nbsp;Then, in your building rule, test if the face intersects (operations touches, overlaps, or inside) one of the door location shapes. &amp;nbsp;If it does intersect, then you know you can create a door there, and otherwise, create a wall.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 03 Apr 2017 12:12:22 GMT</pubDate>
    <dc:creator>CherylLau</dc:creator>
    <dc:date>2017-04-03T12:12:22Z</dc:date>
    <item>
      <title>using mapping layer to generate doors/entrances on building models</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/using-mapping-layer-to-generate-doors-entrances-on/m-p/550124#M7427</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, I have a mapping layer that represents building entrance positions&lt;/P&gt;&lt;P&gt;I would like to use this information to cut the door on a&amp;nbsp;facade of an existing building model (not generated from footprint) using following approach:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the building's facade will be cut vertically into regular 1m slices (blue color) then I will check each of these slices if it is lying on 100% red color from the mapping layer. If true, then I will make a 2nd subdivision (green color) to create a small face to place a door texture on it as on the picture below:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="344927" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/344927_pastedImage_1.jpg" style="width: 620px; height: 514px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the problem is that:&lt;/P&gt;&lt;P&gt;1) if there is only little color below the building, and I'm using attribute that has mapping layer connected to it - it only returns 0 (because there is too little red color compared to the area of the building model)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) I don't know if it is possible to get color information from mapping layer for a subface - from my tests it looks like it isn't working (as on the picture below). When I subdivide facade using split() command, all building slices seem to contain the same information as the whole building model using following rule on them:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="344928" class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/344928_pastedImage_1.jpg" style="width: 620px; height: 429px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#attr that connect to mapping layer to get color info&lt;BR /&gt;attr Red_texture = 0&lt;/P&gt;&lt;P&gt;#decompose to vertical faces only&lt;BR /&gt;Lot --&amp;gt; comp(f){ vertical : VerticalPlane} &lt;BR /&gt; &lt;BR /&gt;VerticalPlane --&amp;gt;&lt;BR /&gt;#fixes for correct alignment&lt;BR /&gt;alignScopeToGeometry (zUp, any, world.lowest)&lt;BR /&gt;alignScopeToAxes(y) &lt;BR /&gt;#splitting faces indefinetly by 1m spacing&lt;BR /&gt;split(x){1:verticalSegment}*&lt;/P&gt;&lt;P&gt;#subface&lt;BR /&gt;verticalSegment--&amp;gt;&lt;BR /&gt;case Red_texture &amp;gt; 100: # if it contains at least a little ammount of red color&lt;BR /&gt;color(1,0,0) # paint this subface red&lt;BR /&gt;else:&lt;BR /&gt;color(0,1,0) # otherwise paint it green&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or if there is any better working approach for creating building entrances please share your ideas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Mar 2017 12:58:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/using-mapping-layer-to-generate-doors-entrances-on/m-p/550124#M7427</guid>
      <dc:creator>MarekDekys</dc:creator>
      <dc:date>2017-03-31T12:58:28Z</dc:date>
    </item>
    <item>
      <title>Re: using mapping layer to generate doors/entrances on building models</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/using-mapping-layer-to-generate-doors-entrances-on/m-p/550125#M7428</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The reason why the vertical split pieces are not getting the color information from the map layer is because only the initial shape can read the map layer information. &amp;nbsp;The attribute Red_texture is set to a value that it gets from the map layer before any rules are executed. &amp;nbsp;The map layer is sampled at the center of the initial shape. &amp;nbsp;When the rules are executed, each piece of the split has the attribute Red_texture = 0 because the map layer was sampled once for the initial shape at the center of the initial shape.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Possible Solution:&lt;/P&gt;&lt;P&gt;Create another shape the size of the map layer. &amp;nbsp;Then, put a rule on this shape that splits the shape into grid cells with the size of your door. &amp;nbsp;Then, create static shapes out of each grid cell (Shape -&amp;gt; Convert model to shapes). &amp;nbsp;On each grid cell shape, assign a rule that has an attribute that connects to the map layer. &amp;nbsp;Instead of red circles, use red squares in your map image (since the grid cells are square and sampling happens at the center). &amp;nbsp;Then, each grid cell shape will have an attribute value that comes from the map layer, and this value will be 1 where there should be a door and 0 otherwise. &amp;nbsp;Also in the rule, if the grid cell corresponds to a door location (attribute value is 1), then create an extruded shape (some shape with a volume), and otherwise, do not create any geometry (NIL). &amp;nbsp;Then, in your building rule, test if the face intersects (operations touches, overlaps, or inside) one of the door location shapes. &amp;nbsp;If it does intersect, then you know you can create a door there, and otherwise, create a wall.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Apr 2017 12:12:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/using-mapping-layer-to-generate-doors-entrances-on/m-p/550125#M7428</guid>
      <dc:creator>CherylLau</dc:creator>
      <dc:date>2017-04-03T12:12:22Z</dc:date>
    </item>
    <item>
      <title>Re: using mapping layer to generate doors/entrances on building models</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/using-mapping-layer-to-generate-doors-entrances-on/m-p/550126#M7429</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;Cheryl,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for quick reply.&amp;nbsp;that's a pity that only the initial shape can read color information...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was thinking about similiar possible solution with occlusion queries but unfortunatelly I am also using these occlusion queries for checking intersection with terrain (as discussed here &lt;A href="https://community.esri.com/thread/190220"&gt;detecting terrain intersetion with a shape to achieve more realistic window texturing&lt;/A&gt;&amp;nbsp;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Therefore, If I implement both things into texturing generation (mesh-terrain intersection and door intersection) the second check will always give me wrong results (it will detect door position as a high hill in terrain and put window texture only above this intersection..) because If I am not mistaken, I cannot target specific shape to check againtst: I can only use overlaps(inter) to check against (all ) geometry in other shape trees&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If somebody has some other solution please let me know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Apr 2017 13:40:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/using-mapping-layer-to-generate-doors-entrances-on/m-p/550126#M7429</guid>
      <dc:creator>MarekDekys</dc:creator>
      <dc:date>2017-04-05T13:40:41Z</dc:date>
    </item>
  </channel>
</rss>

