<?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: how to texture random object in ArcGIS CityEngine Questions</title>
    <link>https://community.esri.com/t5/arcgis-cityengine-questions/how-to-texture-random-object/m-p/146365#M1926</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;If each of those objects has it's own textures, just make sure you also have the .mtl file in the same spot as the .obj.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The .mtl file carries the material information such as the texture.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Otherwise, I may have an other useful way to solve your issue.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;matt&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 28 Dec 2012 10:49:46 GMT</pubDate>
    <dc:creator>MatthiasBuehler1</dc:creator>
    <dc:date>2012-12-28T10:49:46Z</dc:date>
    <item>
      <title>how to texture random object</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/how-to-texture-random-object/m-p/146361#M1922</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;all is in the title,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;following this kind of idea, for parcels, garden, roofs, etc...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]20059[/ATTACH]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;code used:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;fileRandom("folders/images_**.obj")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;what else ?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Dec 2012 21:31:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/how-to-texture-random-object/m-p/146361#M1922</guid>
      <dc:creator>anthonymagdelaine</dc:creator>
      <dc:date>2012-12-18T21:31:38Z</dc:date>
    </item>
    <item>
      <title>Re: how to texture random object</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/how-to-texture-random-object/m-p/146362#M1923</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;are the objects inserted randomly in the rulefile?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think all you need would be &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
ObjectTex = fileRandom("folders/images_**.obj")
ObjectTexture --&amp;gt;
 alignScopeToGeometry(zUp,auto)
 setupProjection(0,scope.xy,'1,'1) 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; projectUV(0)
 texture(ObjectTex)&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;although the number values etc will probably change for you but that's the idea...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:59:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/how-to-texture-random-object/m-p/146362#M1923</guid>
      <dc:creator>JoanneO_Brien</dc:creator>
      <dc:date>2021-12-11T07:59:15Z</dc:date>
    </item>
    <item>
      <title>Re: how to texture random object</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/how-to-texture-random-object/m-p/146363#M1924</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;yes the object are inserted with scatter &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;but the line you wrote: "texture(ObjectTex)" looks strange&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;it means i must call the object as texture? &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;i tested this and finally it searsh for an unknown texture&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Tomb1 =&amp;nbsp; fileRandom("models/Cimetiere/Tomb_**.obj")

TombImport--&amp;gt; set(trim.vertical, false)
&amp;nbsp;&amp;nbsp;&amp;nbsp; s(0.3,0,0)
&amp;nbsp;&amp;nbsp;&amp;nbsp; i(Tomb1)
&amp;nbsp;&amp;nbsp;&amp;nbsp; texture("ObjectTexture")
&amp;nbsp;&amp;nbsp; 
ObjectTexture --&amp;gt;
&amp;nbsp;&amp;nbsp; alignScopeToGeometry(zUp,auto)
&amp;nbsp;&amp;nbsp; setupProjection(0,scope.xy,'1,'1) 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; projectUV(0)
&amp;nbsp;&amp;nbsp; texture(Tomb1)&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:59:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/how-to-texture-random-object/m-p/146363#M1924</guid>
      <dc:creator>anthonymagdelaine</dc:creator>
      <dc:date>2021-12-11T07:59:18Z</dc:date>
    </item>
    <item>
      <title>Re: how to texture random object [solved]</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/how-to-texture-random-object/m-p/146364#M1925</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;i fund a way to distribute objects randomly without using random system and allowing me to keep textures to the right objects by using probability function&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;like that :&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;MiseEnPlace--&amp;gt; case p(0.1) : TombE1Import[Lot.] 
&amp;nbsp; case p(TombType) : TombComp[Lot.]
&amp;nbsp; case p(TombType) : Tree[Lot.] 
&amp;nbsp; case p(TombType) : TombComp2[Lot.]
&amp;nbsp; else : NIL [Lot.]&amp;nbsp; &lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:59:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/how-to-texture-random-object/m-p/146364#M1925</guid>
      <dc:creator>anthonymagdelaine</dc:creator>
      <dc:date>2021-12-11T07:59:21Z</dc:date>
    </item>
    <item>
      <title>Re: how to texture random object</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/how-to-texture-random-object/m-p/146365#M1926</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;If each of those objects has it's own textures, just make sure you also have the .mtl file in the same spot as the .obj.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The .mtl file carries the material information such as the texture.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Otherwise, I may have an other useful way to solve your issue.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;matt&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Dec 2012 10:49:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/how-to-texture-random-object/m-p/146365#M1926</guid>
      <dc:creator>MatthiasBuehler1</dc:creator>
      <dc:date>2012-12-28T10:49:46Z</dc:date>
    </item>
  </channel>
</rss>

