<?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 Rotate UV Question in ArcGIS CityEngine Questions</title>
    <link>https://community.esri.com/t5/arcgis-cityengine-questions/rotate-uv-question/m-p/1273247#M10940</link>
    <description>&lt;P&gt;I was hoping someone in this community would be able to assist with this. I'm building Hangar Models with Rounded roofs and door storage on the side. Is there a way to keep my texture from rotating? The rounded roof is an inserted .obj and the door storage is just extruded on the left and right side of the building. See the image below so you can get an idea of the question. The yellow highlighted areas need to be rotated. I attached my rule file as well.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CE_MatchUV_Rotation.jpg" style="width: 401px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/66722iECF08E9162231D4F/image-size/large?v=v2&amp;amp;px=999" role="button" title="CE_MatchUV_Rotation.jpg" alt="CE_MatchUV_Rotation.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 29 Mar 2023 19:55:55 GMT</pubDate>
    <dc:creator>BenHammer1</dc:creator>
    <dc:date>2023-03-29T19:55:55Z</dc:date>
    <item>
      <title>Rotate UV Question</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/rotate-uv-question/m-p/1273247#M10940</link>
      <description>&lt;P&gt;I was hoping someone in this community would be able to assist with this. I'm building Hangar Models with Rounded roofs and door storage on the side. Is there a way to keep my texture from rotating? The rounded roof is an inserted .obj and the door storage is just extruded on the left and right side of the building. See the image below so you can get an idea of the question. The yellow highlighted areas need to be rotated. I attached my rule file as well.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CE_MatchUV_Rotation.jpg" style="width: 401px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/66722iECF08E9162231D4F/image-size/large?v=v2&amp;amp;px=999" role="button" title="CE_MatchUV_Rotation.jpg" alt="CE_MatchUV_Rotation.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Mar 2023 19:55:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/rotate-uv-question/m-p/1273247#M10940</guid>
      <dc:creator>BenHammer1</dc:creator>
      <dc:date>2023-03-29T19:55:55Z</dc:date>
    </item>
    <item>
      <title>Re: Rotate UV Question</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/rotate-uv-question/m-p/1275189#M10944</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/90212"&gt;@BenHammer1&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Currently you do the setupProtjection() at the end of the chain in your X rule so depending on the face from where you call X the texture will have the right direction or not.&lt;/P&gt;&lt;P&gt;I see two ways to approach this:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Extend your X rule to pass parameter(s) which will control your setupProtection and change accordingly wherever you call X&lt;/LI&gt;&lt;LI&gt;Do the setupProtecton earlier e.g. after split into different facades (HangarFront, HangarLeft, ...) and then setupProtection again with different direction where needed e.g. after the specific comp(f) split in HangarDoorStorage.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;P&gt;Cheers&lt;BR /&gt;Jonas&lt;/P&gt;</description>
      <pubDate>Tue, 04 Apr 2023 11:57:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/rotate-uv-question/m-p/1275189#M10944</guid>
      <dc:creator>JonasObertuefer</dc:creator>
      <dc:date>2023-04-04T11:57:19Z</dc:date>
    </item>
    <item>
      <title>Re: Rotate UV Question</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/rotate-uv-question/m-p/1296169#M11031</link>
      <description>&lt;P&gt;Adding to what Jonas suggested, for option 2, I'd also recommend putting the &lt;FONT face="courier new,courier"&gt;setupProjection&amp;nbsp;&lt;/FONT&gt;in &lt;FONT face="courier new,courier"&gt;HangarFront&lt;/FONT&gt; before the facade is split, as shown below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To get the texture alignment so the bricks are horizontal, you could use &lt;FONT face="courier new,courier"&gt;alignScopeToGeometry&lt;/FONT&gt; to align the scope to the lowest edge (which happens to be horizontal in your case) before using &lt;FONT face="courier new,courier"&gt;setupProjection&lt;/FONT&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I added a &lt;FONT face="courier new,courier"&gt;rotateScope&lt;/FONT&gt; after the extrude in &lt;FONT face="courier new,courier"&gt;HangarDoorStorage&lt;/FONT&gt; just to make it more intuitive to select the appropriate faces in the subsequent comp, but this is optional.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is what I changed in your code above.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;const facadeTexWidth = 15
const facadeTexHeight = 15

HangarFront --&amp;gt;
	setupProjection(0, scope.xy, facadeTexWidth, facadeTexHeight)
	split(x) { 4: X
			 | ~3: split(y) { ~10: Door | 5: X }
			 | 4: X }

HangarDoorStorage --&amp;gt;
	extrude(10)
	rotateScope(-90, 0, 0)
	comp(f) { top: setupProjection(0, scope.xy, facadeTexWidth, facadeTexHeight) X
			| side: Wall_AlignToLowestAndTexture }

RoundedRoofComp --&amp;gt;
	comp(f) { object.back: X
			| object.front: Wall_AlignToLowestAndTexture
			| object.top: Y }

Wall_AlignToLowestAndTexture --&amp;gt;
	alignScopeToGeometry(zUp, any, world.lowest)
	setupProjection(0, scope.xy, facadeTexWidth, facadeTexHeight)
	X

X --&amp;gt;
	texture("builtin:uvtest.png")
	projectUV(0)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jun 2023 10:56:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/rotate-uv-question/m-p/1296169#M11031</guid>
      <dc:creator>CherylLau</dc:creator>
      <dc:date>2023-06-06T10:56:14Z</dc:date>
    </item>
  </channel>
</rss>

