<?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: Texture problem. Need help. I cannot apply a seamless texture to the entire surface. in ArcGIS CityEngine Questions</title>
    <link>https://community.esri.com/t5/arcgis-cityengine-questions/texture-problem-need-help-i-cannot-apply-a/m-p/1240364#M10788</link>
    <description>&lt;P&gt;&lt;STRONG&gt;Align the scope to &lt;FONT face="courier new,courier"&gt;world.y&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Your solution of doing &lt;FONT face="courier new,courier"&gt;setupProjection&lt;/FONT&gt; on the facade before it is &lt;FONT face="courier new,courier"&gt;split&lt;/FONT&gt; is the way to do it.&amp;nbsp; If you align the scope to the world &lt;FONT face="courier new,courier"&gt;y&lt;/FONT&gt; axis using &lt;FONT face="courier new,courier"&gt;alignScopeToAxes(y)&lt;/FONT&gt; before &lt;FONT face="courier new,courier"&gt;setupProjection&lt;/FONT&gt;, then the texture should not be slanted regardless of whether the building is on a hill or not.&amp;nbsp; In your example screenshot above, the slanted texture on the building on a hill is because the scope's x axis aligns to the facade's edge which follows the uphill terrain.&amp;nbsp; Aligning the scope to the world y axis straightens out the scope vertically.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;alignScopeToAxes(y)
setupProjection(0, scope.xy, 1, 1)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;What happens with &lt;FONT face="courier new,courier"&gt;world.xy&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The reason why you might see distorted textures with &lt;FONT face="courier new,courier"&gt;setupProjection(0, world.xy, 1, 1)&lt;/FONT&gt; is because this projects the UVs onto the &lt;FONT face="courier new,courier"&gt;world.xy&lt;/FONT&gt; plane, and your building's facade might not align exactly with &lt;FONT face="courier new,courier"&gt;world.xy&lt;/FONT&gt;.&amp;nbsp; This means the texture will look undistorted when the surface that you are texturing aligns perfectly with the &lt;FONT face="courier new,courier"&gt;world.xy&lt;/FONT&gt; plane.&amp;nbsp; The more you rotate the building (around the y axis), the more the texture will look stretched, until you reach a rotation of 90 degrees where the facade aligns with the &lt;FONT face="courier new,courier"&gt;xz&lt;/FONT&gt; plane and the texture is maximally stretched.&amp;nbsp; Since buildings usually don't align exactly to &lt;FONT face="courier new,courier"&gt;world.xy&lt;/FONT&gt;, I would not recommend setting up the projection according to &lt;FONT face="courier new,courier"&gt;world.xy&lt;/FONT&gt;.&lt;/P&gt;</description>
    <pubDate>Mon, 12 Dec 2022 21:22:06 GMT</pubDate>
    <dc:creator>CherylLau</dc:creator>
    <dc:date>2022-12-12T21:22:06Z</dc:date>
    <item>
      <title>Texture problem. Need help. I cannot apply a seamless texture to the entire surface.</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/texture-problem-need-help-i-cannot-apply-a/m-p/1233457#M10744</link>
      <description>&lt;P&gt;&amp;nbsp; &amp;nbsp;Hello. I'm working on a rule. But when I started working with 3d terrains instead of 2d terrains, the problem started.I define and extrude the building area on the parcel and make facade definitions. Such as window, entrance, wall, etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;I didn't use setupProjection because the surface was divided into too many parts when I was doing Texturing on the walls. It was enough to use projectUV(0) because I use seamless textures.But when plots were formed on 3d surfaces, I got help from the Align shapes to terrain process. In this way, my parcels fit perfectly on the land surface. But I need to use the wordupFlatTop command in order for the building to be flat.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;The problem started here. The projectUV(0) operation is probably referencing the surface. Even if the building is flat, the textures where the reference is crooked are not compatible with the building.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;When I use it as setupProjection(0, scope.xy, 1, 1), it does not give a seamless image because it processes each wall from scratch. But at least it is compatible with the building, not angularly incompatible.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;When I use it as setupProjection(0, world.xy, 1, 1) it actually gives exactly the result I want, but a coating problem arises that I don't know why. A flickering image emerges as if the textures are intertwined hundreds of times.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;I have attached the sample images below, it will be clearer when you look at it. How can I make a texturing that will be both seamless and properly formed according to the building without considering the angular condition of the terrain?&amp;nbsp;&amp;nbsp;Maybe it's a simple process, but I've been struggling with these for 2-3 days and couldn't find a solution. Could you please help?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-right" image-alt="Example1.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/56398iF310A2E1DE2892A2/image-size/large?v=v2&amp;amp;px=999" role="button" title="Example1.png" alt="Example1.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-right" image-alt="Example2.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/56397iB52D51FE34EAB576/image-size/large?v=v2&amp;amp;px=999" role="button" title="Example2.png" alt="Example2.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-right" image-alt="Example3.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/56399iCFEAB9641A510129/image-size/large?v=v2&amp;amp;px=999" role="button" title="Example3.png" alt="Example3.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Nov 2022 23:15:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/texture-problem-need-help-i-cannot-apply-a/m-p/1233457#M10744</guid>
      <dc:creator>MikeJane</dc:creator>
      <dc:date>2022-11-18T23:15:07Z</dc:date>
    </item>
    <item>
      <title>Re: Texture problem. Need help. I cannot apply a seamless texture to the entire surface.</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/texture-problem-need-help-i-cannot-apply-a/m-p/1233462#M10745</link>
      <description>&lt;P&gt;&amp;nbsp; &amp;nbsp;I found the solution. I guess defining the setupProection at the very beginning of the rule solves the problem. While defining the facade, the walls were divided into too many parts because there were many split operations. I got the desired result when I did the setupProjection before the split and then continued.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;Maybe there are other solutions, let it stay open for 1-2 days, then I will close it because it is solved. Btw , I couldn't figure out why setupProjection(0, world.xy, 1, 1) doesn't work properly for me. If anyone knows, it would be nice to share. Textures appear distorted or faded. It's like it's overlapping.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Nov 2022 23:49:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/texture-problem-need-help-i-cannot-apply-a/m-p/1233462#M10745</guid>
      <dc:creator>MikeJane</dc:creator>
      <dc:date>2022-11-18T23:49:13Z</dc:date>
    </item>
    <item>
      <title>Re: Texture problem. Need help. I cannot apply a seamless texture to the entire surface.</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/texture-problem-need-help-i-cannot-apply-a/m-p/1240364#M10788</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Align the scope to &lt;FONT face="courier new,courier"&gt;world.y&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Your solution of doing &lt;FONT face="courier new,courier"&gt;setupProjection&lt;/FONT&gt; on the facade before it is &lt;FONT face="courier new,courier"&gt;split&lt;/FONT&gt; is the way to do it.&amp;nbsp; If you align the scope to the world &lt;FONT face="courier new,courier"&gt;y&lt;/FONT&gt; axis using &lt;FONT face="courier new,courier"&gt;alignScopeToAxes(y)&lt;/FONT&gt; before &lt;FONT face="courier new,courier"&gt;setupProjection&lt;/FONT&gt;, then the texture should not be slanted regardless of whether the building is on a hill or not.&amp;nbsp; In your example screenshot above, the slanted texture on the building on a hill is because the scope's x axis aligns to the facade's edge which follows the uphill terrain.&amp;nbsp; Aligning the scope to the world y axis straightens out the scope vertically.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;alignScopeToAxes(y)
setupProjection(0, scope.xy, 1, 1)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;What happens with &lt;FONT face="courier new,courier"&gt;world.xy&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The reason why you might see distorted textures with &lt;FONT face="courier new,courier"&gt;setupProjection(0, world.xy, 1, 1)&lt;/FONT&gt; is because this projects the UVs onto the &lt;FONT face="courier new,courier"&gt;world.xy&lt;/FONT&gt; plane, and your building's facade might not align exactly with &lt;FONT face="courier new,courier"&gt;world.xy&lt;/FONT&gt;.&amp;nbsp; This means the texture will look undistorted when the surface that you are texturing aligns perfectly with the &lt;FONT face="courier new,courier"&gt;world.xy&lt;/FONT&gt; plane.&amp;nbsp; The more you rotate the building (around the y axis), the more the texture will look stretched, until you reach a rotation of 90 degrees where the facade aligns with the &lt;FONT face="courier new,courier"&gt;xz&lt;/FONT&gt; plane and the texture is maximally stretched.&amp;nbsp; Since buildings usually don't align exactly to &lt;FONT face="courier new,courier"&gt;world.xy&lt;/FONT&gt;, I would not recommend setting up the projection according to &lt;FONT face="courier new,courier"&gt;world.xy&lt;/FONT&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Dec 2022 21:22:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/texture-problem-need-help-i-cannot-apply-a/m-p/1240364#M10788</guid>
      <dc:creator>CherylLau</dc:creator>
      <dc:date>2022-12-12T21:22:06Z</dc:date>
    </item>
    <item>
      <title>Re: Texture problem. Need help. I cannot apply a seamless texture to the entire surface.</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/texture-problem-need-help-i-cannot-apply-a/m-p/1240576#M10793</link>
      <description>&lt;P&gt;Thank you for the information. I will consider it in my future work.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Dec 2022 14:09:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/texture-problem-need-help-i-cannot-apply-a/m-p/1240576#M10793</guid>
      <dc:creator>MikeJane</dc:creator>
      <dc:date>2022-12-13T14:09:10Z</dc:date>
    </item>
  </channel>
</rss>

