<?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: Multiple CGA Rule Files to a Single City Engine Layer in ArcGIS CityEngine Questions</title>
    <link>https://community.esri.com/t5/arcgis-cityengine-questions/multiple-cga-rule-files-to-a-single-city-engine/m-p/243649#M3201</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We are just barely getting started with CityEngine so this comment may come from a position of naivete or ignorance, but if you extrude your water data based upon an elevation, wouldn't it simply extrude like a building footprint and not "fill the tub" by expanding to the surface elevation?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems like your best method for flood simulation would be to model the flooding with the 3D Analyst extension tools, then import that result into CityEngine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But again, I may be missing something, so forgive me if I am...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 01 Aug 2016 15:57:01 GMT</pubDate>
    <dc:creator>BrianOevermann</dc:creator>
    <dc:date>2016-08-01T15:57:01Z</dc:date>
    <item>
      <title>Multiple CGA Rule Files to a Single City Engine Layer</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/multiple-cga-rule-files-to-a-single-city-engine/m-p/243647#M3199</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;Hello,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I'm wondering if it is possible to apply two separate cga rule files to the same layer. Specifically, I have a water layer and I am trying to add this rule to it to animate the water:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;@Range(-180, 180)&lt;/P&gt;&lt;P&gt;attr Rotation = 0&lt;/P&gt;&lt;P&gt;@Range(0.1, 20.1)&lt;/P&gt;&lt;P&gt;attr Scale = 5&lt;/P&gt;&lt;P&gt;@File&lt;/P&gt;&lt;P&gt;attr Texture = "SeaWater.jpg"&lt;/P&gt;&lt;P&gt;attr SizeX = 100&lt;/P&gt;&lt;P&gt;attr SizeZ = 100&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Water --&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; alignScopeToAxes(y)&lt;/P&gt;&lt;P&gt;&amp;nbsp; rotateScope(0,Rotation,0)&lt;/P&gt;&lt;P&gt;&amp;nbsp; setupProjection(0, scope.xz, SizeX * Scale, SizeZ * Scale)&lt;/P&gt;&lt;P&gt;&amp;nbsp; projectUV(0)&lt;/P&gt;&lt;P&gt;&amp;nbsp; texture(Texture)&lt;/P&gt;&lt;P&gt;&amp;nbsp; # This line makes it animate in a web scene.&lt;/P&gt;&lt;P&gt;&amp;nbsp; set(material.name, "watermaterial__waterparams_2_5")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;But then I'm also trying to see if I can add another rule to it as well, that will extrude the water, allowing me to build a basic flooding model. Here is the second rule:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;attr ELEVATION = 0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;@StartRule&lt;/P&gt;&lt;P&gt;Lot --&amp;gt; extrude(ELEVATION)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If it is not possible to apply both rules separately, does anyone know how I can combine the two into one rule so that I can apply it? Thanks!&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jul 2016 17:50:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/multiple-cga-rule-files-to-a-single-city-engine/m-p/243647#M3199</guid>
      <dc:creator>JugalPatel</dc:creator>
      <dc:date>2016-07-18T17:50:42Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple CGA Rule Files to a Single City Engine Layer</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/multiple-cga-rule-files-to-a-single-city-engine/m-p/243648#M3200</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can import rules in any CGA rule. So in your example you could create a master CGA rule importing your two CGA files....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;// import texture &amp;amp; animate rule
import a1 : "animate.cga"

//import water extrusion
import w1 : "water.cga"&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then you could call rules from each file using something like w1.Lot--&amp;gt;...&lt;/P&gt;&lt;P&gt;For more info search CityEngine help for Import&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I don't think your CGA is that complicated and using multiple rules seems unnecessary. Can you just do something like this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;//Attributes
@Group("Extrusion")
attr ELEVATION = 0

@Group("Texture")
@Range(-180, 180)
attr Rotation = 0

@Group("Texture")
@Range(0.1, 20.1)
attr Scale = 5

@Group("Texture")
@File
attr Texture = "SeaWater.jpg"

@Group("Texture")
attr SizeX = 100

@Group("Texture")
attr SizeZ = 100


@StartRule
Lot--&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; extrude(ELEVATION)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Water

Water --&amp;gt;
&amp;nbsp; alignScopeToAxes(y)
&amp;nbsp; rotateScope(0,Rotation,0)
&amp;nbsp; setupProjection(0, scope.xz, SizeX * Scale, SizeZ * Scale)
&amp;nbsp; projectUV(0)
&amp;nbsp; texture(Texture)
&amp;nbsp; # This line makes it animate in a web scene.
&amp;nbsp; set(material.name, "watermaterial__waterparams_2_5")&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you just need the top to animate you can always split the component and texture the faces individually - i.e. comp(f) {top:Top | side: Sides}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 12:10:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/multiple-cga-rule-files-to-a-single-city-engine/m-p/243648#M3200</guid>
      <dc:creator>DevinLavigne</dc:creator>
      <dc:date>2021-12-11T12:10:44Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple CGA Rule Files to a Single City Engine Layer</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/multiple-cga-rule-files-to-a-single-city-engine/m-p/243649#M3201</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We are just barely getting started with CityEngine so this comment may come from a position of naivete or ignorance, but if you extrude your water data based upon an elevation, wouldn't it simply extrude like a building footprint and not "fill the tub" by expanding to the surface elevation?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems like your best method for flood simulation would be to model the flooding with the 3D Analyst extension tools, then import that result into CityEngine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But again, I may be missing something, so forgive me if I am...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Aug 2016 15:57:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/multiple-cga-rule-files-to-a-single-city-engine/m-p/243649#M3201</guid>
      <dc:creator>BrianOevermann</dc:creator>
      <dc:date>2016-08-01T15:57:01Z</dc:date>
    </item>
  </channel>
</rss>

