|
POST
|
Hello @Tiwene_Roberts Thanks for sharing your code snippet—it's awesome that you're diving in and learning by doing with CityEngine. I understand the challenge of exporting that inner parcel boundary as a GIS layer. I'll walk you through a straightforward solution below. When exporting a Model to FileGDB, it is not possible to only select certain faces of a Model. Therefore, all face geometries in the CGA code, that you do not want to export, have to be NILed. NIL operation—ArcGIS CityEngine Resources | Documentation // -----------------
// Outer parcel definition (optional visualization only)
// -----------------
OuterParcel --> NIL
// set(parcelType, "outer")
// color("#99ccff") Then Export to the model to FileGDB and make sure to only export Models: Export FileGDB (Esri File Geodatabase)—ArcGIS CityEngine Resources | Documentation
... View more
10-20-2025
06:11 AM
|
2
|
1
|
161
|
|
POST
|
Please Note: The "EFFECTIVE REGULATIONS" on a parcel are the defined by Zoning + Overlays + Parcel overrides. Zoning regulation management—ArcGIS Urban | Documentation ArcGIS Urban integration—ArcGIS CityEngine Resources | Documentation
... View more
10-16-2025
03:16 AM
|
0
|
0
|
133
|
|
POST
|
Hi @RidleySoudack I'm excited to see you are leveraging CityEngine functionality to check for and handle conditional zoning regulations. This example rule for Parcel shapes shows how to work with the ZoneTypeID attribute obtained from in the scene's Zone Boundaries layer: version "2025.0"
@Order(1)
@Enum(valuesAttr=zoneTypeIDs,restricted=false)
@DisplayName("Zone Type ID")
attr ZoneTypeID = ""
@Hidden
attr zoneTypeIDs = getKeys(zoneTypeTable)
@Order(2)
@DisplayName("Zone Type Label")
attr Zone_Type_Label = getValue( zoneTypeTable, ZoneTypeID, "Label")
@Order(3)
@Color
@DisplayName("Zone Type Color")
attr Zone_Type_Color = getValue( zoneTypeTable, ZoneTypeID, "Color")
@Order(4)
@DisplayName("Zone Type HeightMax")
attr Zone_Type_HeightMax = float(getValue( zoneTypeTable, ZoneTypeID, "HeightMax"))
@Order(0)
@File
@DisplayName("Zone Type Table")
attr Zone_Type_Table = "data/Urban_for_CE_Database_View.csv"
const zoneTypeTable = readStringTable(Zone_Type_Table)
getKeys(table) = transpose(table[1:nRows(table) - 1, 0])
getValue(table, key, columnName) with(
keysColumn := getKeys(table)
rowIndex := findFirst(keysColumn, key) + 1
columnIndex := findFirst(table[0, 0:nColumns(table)], columnName)
) =
case (rowIndex == 0) || (columnIndex == -1): "Error"
else: table[rowIndex, columnIndex]
@StartRule
Parcel -->
print(ZoneTypeID)
print(Zone_Type_Label)
color(Zone_Type_Color)
extrude(Zone_Type_HeightMax) Unlike the space type info, the zoning info doesn't get added to the project as a CSV when importing a plan form ArcGIS Urban. Here is what you can do to work with the zoning information: Find the ArcGIS Urban Database View of your plan in the portal contents. It contains a table named ZoneTypes Export this ZoneTypes table to a CSV file and then download it Inside CityEngine, add the ZoneTypes CSV file to your project's data folder Now you can connect the rule attribute Zone_Type_Table to the downloaded ZoneTypes CSV file. To get the parcel's Zone Type information, simply connect the rule attribute ZoneTypeID to the matching attribute in the scene's Zone Boundaries layer: The final result should look like this:
... View more
10-15-2025
08:03 AM
|
0
|
0
|
142
|
|
POST
|
Hello @ChrisKo3 Thanks for reaching out with your question! That's a tricky one, indeed. When dealing with such challenges, you could gradually increase the Segment Width by partitioning the segment. In case of asymmetric lane distributions, as in this example, also adjust the Segment Offset. To smoothen out the transition in the Joint Nodes, set the Curb Radius to the max value of 10.
... View more
07-09-2025
03:56 AM
|
0
|
0
|
231
|
|
IDEA
|
Thank you @romainjanil for bringing up this topic. You want to have more control over the triangulation algorithm that is used for generating models. So far there are no plans to offer this. But, the upcoming release of CityEngine 2025.0 comes with many improvements for the boolean 3D operations, including better cleanup of the resulting shapes. This also affects the triangulation. The triangulation of Initial Shapes for rendering in the CE viewport is not the same as the triangulation used for creating models. If there are differences, it's recommended to hide the Initial Shapes. Can you please give more insights, why you need to apply a specific triangulation algorithm for generating Models?
... View more
06-11-2025
07:27 AM
|
0
|
0
|
251
|
|
POST
|
Hello @JackCurran1 Have you tried to adjusted the base colour in 3ds Max areal image texture like this: color_new = pow(color_old, 1 / 2.2) It will impact the multiplier on the material in CityEngine. If this doesn't give the expected result, it would be good to analyze the aerial imagery texture.
... View more
04-04-2025
02:40 AM
|
0
|
0
|
371
|
|
POST
|
Thanks for your feedback. Great that you managed to resolve the your question. To make my example rule work, the parcel shape requires the attribute edgeattr/orientations set by the Compute Edge Attributes tool.
... View more
03-12-2025
06:20 AM
|
0
|
0
|
503
|
|
POST
|
As an example, you can first obtain the orientations of a parcel shape with the Compute Edge Attributes tool. Then, the following rule lets you define a maximum building coverage ratio and setback distances per side. In case the maximum coverage is smaller then the remainder of the setbackPerEdge operation, the front setback is increased by the setbackToArea operation (dark blue area). version "2024.1"
const lotArea = geometry.area
@Description("Maximum ratio of footprint to parcel area") @Percent
attr area_ratio = 0.5
@Description("Minimum street setback") @Distance @Range(min=0, max=15)
attr setback_front = 5
@Description("Excact side setback") @Distance @Range(min=0, max=15)
attr setback_side = 10
@Description("Excact rear setback") @Distance @Range(min=0, max=15)
attr setback_rear = 15
dist(orientation) = case orientation == "front" : setback_front
case orientation == "side" : setback_side
case orientation == "rear" : setback_rear
else : 0
@StartRule
SetbackPerEdge --> setbackPerEdge( dist( edgeAttr.getString("orientations") ) )
{ edgeAttr.getString("orientations") == "front" = Grey
| edgeAttr.getString("orientations") == "side" = Yellow
| edgeAttr.getString("orientations") == "rear" = Green
| remainder = SetbackToArea }
SetbackToArea --> setbackToArea(lotArea * area_ratio)
{ edgeAttr.getString("orientations") == "front" = Blue
| remainder = extrude(10) Cyan }
... View more
03-06-2025
12:49 AM
|
0
|
2
|
554
|
|
POST
|
Hi @Neri12 , Welcome to the ArcGIS CityEngine Community. 😊 To give you an advice, it would be very helpful, to have a screenshot and some snippets of your CGA code. General information: the setbackToArea operation allows you to define the built up area vs. the free part ratio of a lot. the setbackPerEdge operation allows you to define a setback distance per edge.
... View more
03-05-2025
07:47 AM
|
0
|
0
|
560
|
|
POST
|
Hi @KennethLindhardt1 Have you tried using CGA to report the spherical latitude/longitude coordinates (WGS84) of the scope's origin with the getGeoCoord function? Tutorial 12: Scripted report export—ArcGIS CityEngine Resources | Documentation then shows you how to write out a file with positioning info for each exported Model.
... View more
02-27-2025
06:01 AM
|
0
|
0
|
712
|
|
POST
|
Hello @bhusalshishir Here is CGA code that creates a primitiveDisk and then uses the offset operation to hollow it out. Then the extrude operation gets applied on the annulus to form a culvert. Finally, the setNormals operation is used to set the normals of the inner and outer mantle to soft. version "2024.1"
@Description("Inner diameter") @Distance @Range(min=0.1, max=5)
attr diameter = 1
@Description("Culvert length") @Distance @Range(min=0.1, max=20)
attr length = 2
@Description("Wall thickness") @Distance @Range(min=0.1, max=1)
attr thickness = 0.1
@Description("Number of subdivisions of the outer mantle")
attr sides = min(128,max(16,floor(8*diameter)*4))
@StartRule
Culvert --> Annulus
Annulus -->
primitiveDisk(sides, diameter+thickness)
offset(-thickness)
comp(f) { border = Extrude}
Extrude -->
extrude (length)
comp(f) { side = setNormals(soft) Culvert. | all : Culvert. }
... View more
02-27-2025
05:19 AM
|
1
|
1
|
500
|
|
POST
|
Hello @biaozeng Your observation is correct. When using 'Menu > Shapes > Update Seed' <ctrl+shift+G> in some cases negative numbers are generated. For the CGA seedian shape attribute the values are restricted to the range [0, 714024]. Numbers outside this range are mapped into it.
... View more
02-26-2025
02:42 AM
|
0
|
0
|
341
|
|
POST
|
Hello @josegudalupemeridajardinez Thanks for the question. Just select a CGA Model (or any static model). Then to create .cgamat files you can use the CityEngine CGA Material Encoder option in the File > Export Models... dialog. Export a model—ArcGIS CityEngine Resources | Documentation The material descriptions of a CGA model are collected and written into individual subdirectories. Each subdirectory contains all the material—including the used textures—which can be copied into a folder of assets, for example. The name of the subdirectory and the .cgamat file is the material.name attribute but is made unique if there are several materials with the same name. The <matName>.cgamat file is in CSV format, as is the result of the CGA function: getMaterial(used, changed). .cgamat files are simple plain text file contain name of material attributes and its value seperated by a comma: metallic,0
roughness,1
colormap,Textures/Grass_Dry_10x10_Brown_Color.jpg
colormap.su,0.1
colormap.sv,0.1
normalmap,Textures/Grass_10x10_Normal.jpg
normalmap.rw, 0
normalmap.su,0.1
normalmap.sv,0.1
... Note: You can also find some material files in the ESRI.lib under /assets/Materials. Only materials stored here are shown in the Material Browser. ESRI.lib—ArcGIS CityEngine Resources | Documentation To apply a .cgamat file on a shape, you need to set the path first. Then use the setMaterial operation—ArcGIS CityEngine Resources | Documentation and project the material on every face: version "2024.1"
@MaterialFile
attr cgaMat = "/ESRI.lib/assets/Materials/Generic/Wood/Wood_Standard_10x10.cgamat"
@StartRule
SetMaterial -->
setMaterial( readMaterial(cgaMat) )
comp(f) { all :
setupProjection(0, scope.xy, 1, 1)
projectUV(0)
Material.
}
... View more
02-26-2025
01:15 AM
|
2
|
0
|
611
|
|
POST
|
You can rewrite the rule to get a sequence of the largest faces like that: Generate --> comp(f) { front = fa1 }
fa1 --> comp(f) { largestIndex : color(1,0,1) fa1. | all = fa2 }
fa2 --> comp(f) { largestIndex : color(1,1,0) fa2. | all = fa3 }
fa3 --> comp(f) { largestIndex : color(0,1,1) fa3. | all : faRemaining. }
... View more
02-21-2025
01:19 AM
|
0
|
0
|
810
|
|
POST
|
Hello @biaozeng Thank you for this interesting question! Here are some CGA helper functions that will give you the index of the face with the largest area: version "2024.1"
sizes = comp(f){ all : geometry.area() }
indices = sortIndices(sizes)
largestIndex = indices[size(indices)-1]
@StartRule // Apply on a shape with multiple front faces
Generate -->
comp(f) { front = comp(f) { largestIndex : color(1,0,1) fa. } }
... View more
02-19-2025
07:33 AM
|
2
|
3
|
852
|
| Title | Kudos | Posted |
|---|---|---|
| 2 | 10-20-2025 06:11 AM | |
| 1 | 04-19-2023 12:30 AM | |
| 1 | 02-27-2025 05:19 AM | |
| 2 | 02-26-2025 01:15 AM | |
| 2 | 02-19-2025 07:33 AM |
| Online Status |
Offline
|
| Date Last Visited |
Friday
|