<?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: Export Mesh and Material Granularity in ArcGIS CityEngine Questions</title>
    <link>https://community.esri.com/t5/arcgis-cityengine-questions/export-mesh-and-material-granularity/m-p/305207#M4229</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yup,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tend to try to keep "common" rules or operations on a separate file. It becomes handy when you have multiple projects... a "ln -s" does wonders &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But I think you can ignore that. Do you think it is possible to do what I proposed, when exporting to FBX&amp;nbsp; and importing on Unity? If yes, can you give me a very simple example?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;matthiasbuehler;177071&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 01 Mar 2012 09:12:41 GMT</pubDate>
    <dc:creator>AndréCardoso</dc:creator>
    <dc:date>2012-03-01T09:12:41Z</dc:date>
    <item>
      <title>Export Mesh and Material Granularity</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/export-mesh-and-material-granularity/m-p/305203#M4225</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a sort of a vague question:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- does it make sense to allow a more specific material and mesh granularity options in CE. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm not on a comfortable zone here, as I'm no 3D expert... please bear with me with me. Nevertheless, consider the the pictures attached.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The building has "picking boxes" around each floor. For the purposes of the application we're working on, each picking box mesh must have a unique ID. However, the picking box material is exactly the same. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The second picture is how the building is imported into Unity3D. It shows different meshes and materials. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The building was exported with "merge by material". &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In this specific case, I would like to:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- have only 1 mesh for everything that is *not* a picking box;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- have only 1 material for the picking boxes (less materials, means less "draw calls" on Unity, means better application performance)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- have different meshes for the picking boxes, uniquely identified.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think this is not possible within CE. Is it?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But I think it makes sense at least to allow to merge everything into one single mesh? However, no such option exists within the exporter.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What do you think about this? All of these things relate to performance issues on game engines.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Feb 2012 15:25:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/export-mesh-and-material-granularity/m-p/305203#M4225</guid>
      <dc:creator>AndréCardoso</dc:creator>
      <dc:date>2012-02-24T15:25:34Z</dc:date>
    </item>
    <item>
      <title>Re: Export Mesh and Material Granularity</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/export-mesh-and-material-granularity/m-p/305204#M4226</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: matthiasbuehler&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;hi !&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;did you work with&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;set(material.name, "matName")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;did you work with the option&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;create shape groups ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;* * *&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;there's rules which define when exactly a new material is created in the CE. that usually is if some of the attributes have changed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;so, make sure that your pick box material go thru the exact same rules and get the exact same material settings &amp;amp; naming.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;not all of the material / mesh merging combinations are possible with the CityEngine, thus it may make sense to post process them with a series of scripts in an other 3d app (such as Maya).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;* * *&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;please note also that if you export 'one file per shape', the material merging only works per shape. e.g. the absolute same materials will not be merged over multiple files.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Feb 2012 16:46:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/export-mesh-and-material-granularity/m-p/305204#M4226</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2012-02-28T16:46:27Z</dc:date>
    </item>
    <item>
      <title>Re: Export Mesh and Material Granularity</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/export-mesh-and-material-granularity/m-p/305205#M4227</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yup, I did work with that. Actually, currently that is my only option to create "identifiers" for each picking box:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
...
...
FloorPickingBox(splitTotal, floorIndex) --&amp;gt;
 case floorIndex &amp;lt; splitTotal - 1:
&amp;nbsp; set(material.opacity, 0.5)
&amp;nbsp; misc.SetMaterial(FLOOR_PICKING_BOX_NAME + 
&amp;nbsp;&amp;nbsp;&amp;nbsp; "__" + floorIndex + "__" +
&amp;nbsp;&amp;nbsp;&amp;nbsp; listItem(FLOOR_PICKING_BOXES_UUIDS, floorIndex))
 else:
&amp;nbsp; s('1, '2, '1)
&amp;nbsp; set(material.opacity, 0.5)
&amp;nbsp; misc.SetMaterial(FLOOR_PICKING_BOX_NAME + 
&amp;nbsp;&amp;nbsp;&amp;nbsp; "__" + floorIndex + "__" +
&amp;nbsp;&amp;nbsp;&amp;nbsp; listItem(FLOOR_PICKING_BOXES_UUIDS, floorIndex))
...
...
# misc.cga
SetMaterial(name) --&amp;gt;
 set(material.name, name)
 TerminalMaterial.
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm calling set(material.name, "name") all the time, to make sure that on the "other side" I can query things...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The "create shape groups" does not do anything that I find relevant. It only organizes the meshes in a hierarchical manner.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But let me tighten the scope of my question:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- given the example in the code above, is there a way to end up with a &lt;/SPAN&gt;&lt;STRONG&gt;one&lt;/STRONG&gt;&lt;SPAN&gt; single material for all the picking boxes, but meshes with &lt;/SPAN&gt;&lt;STRONG&gt;different&lt;/STRONG&gt;&lt;SPAN&gt; names (after importing into Unity)?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The way I have been doing it,&lt;/SPAN&gt;&lt;STRONG&gt; I get different named meshes And different materials.&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;matthiasbuehler;176484&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 14:37:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/export-mesh-and-material-granularity/m-p/305205#M4227</guid>
      <dc:creator>AndréCardoso</dc:creator>
      <dc:date>2021-12-11T14:37:03Z</dc:date>
    </item>
    <item>
      <title>Re: Export Mesh and Material Granularity</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/export-mesh-and-material-granularity/m-p/305206#M4228</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: matthiasbuehler&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;it seems you're working with imports, right ?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Mar 2012 09:00:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/export-mesh-and-material-granularity/m-p/305206#M4228</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2012-03-01T09:00:40Z</dc:date>
    </item>
    <item>
      <title>Re: Export Mesh and Material Granularity</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/export-mesh-and-material-granularity/m-p/305207#M4229</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yup,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tend to try to keep "common" rules or operations on a separate file. It becomes handy when you have multiple projects... a "ln -s" does wonders &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But I think you can ignore that. Do you think it is possible to do what I proposed, when exporting to FBX&amp;nbsp; and importing on Unity? If yes, can you give me a very simple example?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;matthiasbuehler;177071&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Mar 2012 09:12:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/export-mesh-and-material-granularity/m-p/305207#M4229</guid>
      <dc:creator>AndréCardoso</dc:creator>
      <dc:date>2012-03-01T09:12:41Z</dc:date>
    </item>
  </channel>
</rss>

