<?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: City Engine Object Transparency in ArcGIS CityEngine Questions</title>
    <link>https://community.esri.com/t5/arcgis-cityengine-questions/city-engine-object-transparency/m-p/262657#M3460</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The models I'm trying to make transparent are imported shapefile multipatch's&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Aug 2013 19:17:58 GMT</pubDate>
    <dc:creator>leewinslow1</dc:creator>
    <dc:date>2013-08-28T19:17:58Z</dc:date>
    <item>
      <title>City Engine Object Transparency</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/city-engine-object-transparency/m-p/262656#M3459</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm having a hard time setting the transparency of my models.&amp;nbsp; I have found the material.opacity cga rule.&amp;nbsp; This just makes my textures transparent.&amp;nbsp; I would like to set the texture and the model that is being textured to some level of transparency.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for any help&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Aug 2013 18:59:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/city-engine-object-transparency/m-p/262656#M3459</guid>
      <dc:creator>leewinslow1</dc:creator>
      <dc:date>2013-08-28T18:59:41Z</dc:date>
    </item>
    <item>
      <title>Re: City Engine Object Transparency</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/city-engine-object-transparency/m-p/262657#M3460</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The models I'm trying to make transparent are imported shapefile multipatch's&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Aug 2013 19:17:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/city-engine-object-transparency/m-p/262657#M3460</guid>
      <dc:creator>leewinslow1</dc:creator>
      <dc:date>2013-08-28T19:17:58Z</dc:date>
    </item>
    <item>
      <title>Re: City Engine Object Transparency</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/city-engine-object-transparency/m-p/262658#M3461</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Lee,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm not sure if I understand you correctly. Can you post a reference image of what you need and what the input is ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Note :&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There's 2 different 'transparency options' you can set in CGA :&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1] material.opacity ( the transparency of the material itself )&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2] material.opacitymap ( the alpha channel / mask of the texture [[or a separate file for this]] )&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;so e.g. if you have mapped a leaf texture with an alpha channel on a polygon, you will see nothing but a cut out leaf. The rest of the polygon is completely transparent. If you then also set the material.opacity, you will make the leaf itself transparent.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ok ?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Aug 2013 08:21:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/city-engine-object-transparency/m-p/262658#M3461</guid>
      <dc:creator>MatthiasBuehler1</dc:creator>
      <dc:date>2013-08-29T08:21:28Z</dc:date>
    </item>
    <item>
      <title>Re: City Engine Object Transparency</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/city-engine-object-transparency/m-p/262659#M3462</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Matt,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;for some reason, when I set a shape's opacity to zero, it remains grey. Ie it doesn't actually become transparent, the color it was assigned just fades. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;How do we make it actually transparent?&lt;BR /&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I've tried both setting it at the first rule, and setting all components to zero opacity, neither works:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;@StartRule&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Shape--&amp;gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; set(material.opacity, 0 ) #still looks grey&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;comp(f) { all = Face }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;comp(v) { all= Face }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;comp(e) { all = Face }&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Face--&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;set(material.opacity,.001 ) #looks grey, with a tint of the blue left...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; color("#0000ff")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Tom&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Nov 2013 19:51:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/city-engine-object-transparency/m-p/262659#M3462</guid>
      <dc:creator>Tom-PierreFrappé-Sénéclauze</dc:creator>
      <dc:date>2013-11-22T19:51:38Z</dc:date>
    </item>
    <item>
      <title>Re: City Engine Object Transparency</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/city-engine-object-transparency/m-p/262660#M3463</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;Shapes can not be transparent. Only Models can be transparent.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Shape + rule -&amp;gt; Generate -&amp;gt; Model.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So if you still see grey, then you still see the shape. Hide the visibility of shapes via the F11 key or the according button in the toolbar.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ok ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;matt&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Nov 2013 17:34:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/city-engine-object-transparency/m-p/262660#M3463</guid>
      <dc:creator>MatthiasBuehler1</dc:creator>
      <dc:date>2013-11-28T17:34:34Z</dc:date>
    </item>
    <item>
      <title>Re: City Engine Object Transparency</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/city-engine-object-transparency/m-p/262661#M3464</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;OK thanks, got it. Need to hide the shapes ("show/hide shapes") button. Then I can see the models, in all their glorious transparency. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For reference, this is the code I used:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;@StartRuleShape--&amp;gt; 
 set(material.opacity,.02 )
 comp(f) { all = Face }
 comp(e) { all = Edges }


Face--&amp;gt;
set(material.opacity,0 )
 color("#0000ff")
 
Edges --&amp;gt; 
 comp(e) { all : i("builtin:cube")&amp;nbsp; s('1, 8, 8) X }


X--&amp;gt; 
set(material.opacity,1)
color("#FFFF00")
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now, as is often the case in 3D, I get issues with some of the lines disappearing under the landscape. Is there a way to add vertices in the lines and re-allign those to the DEM so that the perimeter of the model, at least, follows the DEM?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And similarly, if I was to do the same thing but want to have the entire face, not just the outline, follow the topograhy, is there a way to breakdown the shape (or the model) into smaller shapes so that it can drape better over the topography?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks for your thoughts!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Tom&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 12:53:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/city-engine-object-transparency/m-p/262661#M3464</guid>
      <dc:creator>Tom-PierreFrappé-Sénéclauze</dc:creator>
      <dc:date>2021-12-11T12:53:02Z</dc:date>
    </item>
    <item>
      <title>Re: City Engine Object Transparency</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/city-engine-object-transparency/m-p/262662#M3465</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;This is currently not possible, no. This is a current limitation of CGA.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1] I'd align the terrain to shapes - you may have seen how that works in a tutorial&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2] Since a shape can only sample once per model, each subshape during model generation can not sample the DEM again, thus you also can not subdivide the shape or add more points to then drape the shape on the DEM better.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3] The only thing you can do is do it in 2 steps:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; a] use one CGA rule that cuts your shape into smaller pieces *&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; b] when this model is generated, select it, right-mouse-click &amp;gt; convert Models to Shapes&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; c] use the alignShapesToTerrain tool to align those shapes to the DEM&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; d] use your rule to make the transparent models.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;* e.g.:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;attr mySize= 3

@StartRule
Lot --&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; alignScopeToAxes(y)
&amp;nbsp;&amp;nbsp;&amp;nbsp; split(x) {~mySize: split(z) {~mySize: SmallerShapes. }* }*&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ok ?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 12:53:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/city-engine-object-transparency/m-p/262662#M3465</guid>
      <dc:creator>MatthiasBuehler1</dc:creator>
      <dc:date>2021-12-11T12:53:05Z</dc:date>
    </item>
  </channel>
</rss>

