CityEngine 2024.0. | CGAC 2.4
New features
- A Visual CGA Design (*.vcga) can now be imported. You can call its start rule and override its attributes and extension nodes in the import statement.
- Default extension implementation forwarding: It is now possible to reuse the default implementation of an extension rule from an imported rule set in a new extension rule. The following code pattern defines an extension rule MyExt which uses the default implementation of imp.Ext as long as it is not overridden.
import imp:"imp.cga"( Ext -> MyExt ) extension MyExt --> imp.Ext
For older versions of CGA this code would have led to an endless recursion.
New annotations
- @MaterialFile annotation
Changes to existing features
- setback, setbackToArea, setbackPerEdge, shapeLUO, splitAndSetbackPerimeter operations: Collinear vertices are now kept on the resulting setback edges. The setback edges will now match the initial edges.
- convexify operation:
- The topology of the input geometry is maintained and the resulting convex polygons are fully connected now. Note:The individual convex polygons (typically created via a subsequent component split) can contain collinear vertices now. These can be removed using the cleanupGeometry operation.
- Existing component tags are preserved now.
- geometry.isConcave function and general concavity classification: Improved handling of collinear vertices. Collinear vertices are now consistently classified as convex.
- material.{colormap|...|metallicmap}.rw attribute: changed rotation center from (0.5, 0.5) to (0,0).
- CGA Compiler: Extension rules with same name but different number of parameters (overloading) are not allowed anymore.
Bugfixes
- readStringTable, readFloatTable: Fixed a crash when reading a non-existing table (Linux only).
- setupProjection operation:
- Fixed a bug where widthOffset and heightOffset were not correctly considered when a uv scaling was defined for the material (for example, material.colormap.su).
- Fixed a bug where offset values where not considered for projection axes scope.zx.
- CGA Compiler:
- Fixed incorrect handling of the @Hidden annotation for import statements. Note: In the UI of older versions of CityEngine or client apps using an older version of CityEngine SDK, hidden imports will not be hidden in RPKs created with CityEngine 2024.0.
- Fixed a bug where annotations were not assigned to import statements but to subsequent statements.
SDK 3.2.9903 CGAC 2.3
New functions
- assetMetadata function
CityEngine 2023.1 | CGAC 2.2
New features
- With the new auto-tag feature, selected operations automatically apply semantic information to output geometry components:
- setback, setbackToArea, setbackPerEdge, shapeLUO, splitAndSetbackPerimeter operations: Each output edge is tagged as "setback.front", "setback.side", "setback.back", or "setback.remainder".
- roofGable, roofHip, roofPyramid, roofRidge, roofShed operations: Each output face is tagged as "roof.bottom", "roof.side", or "roof.top".
- extrude operation: Each output face is tagged as "extrude.bottom", "extrude.side.inner", "extrude.side.outer", or "extrude.top".
- envelope operation: Each output face is tagged as "envelope.bottom", "envelope.side.base", "envelope.side.slope", "envelope.side.inner", or "envelope.top".
- taper operation: Each output face is tagged as "taper.bottom" or "taper.side".
The component tags can be queried with the new isTagged selector in the comp, setback, setbackToArea, setbackPerEdge operations and the comp function.
New operations
- deleteTags operation
- setTagsFromEdgeAttrs
New functions
- geometry.tags function
- geometry.hasTags function
New attributes
material.doubleSided attribute
Changes to existing features
- comp, setback, setbackToArea, setbackPerEdge operations and comp function:
- Existing selectors can be combined in logical selector expressions (e.g. left || right).
- User-defined functions and all built-in functions can be used in logical selector expressions.
- Added new isTagged selector.
- CGA Compiler:
Bugfixes
- comp operation: Fixed a bug where using the combine operator (=) created a new shape even when no components were selected.
- comp, setback, setbackToArea, setbackPerEdge operations, comp function: Fixed a bug where a function call was wrongly interpreted as selector.
- Layer attributes (CityEngine only): print function: Fixed output for very large integer values.
- CGA Compiler:
- Fixed a bug in styles. In some cases, parameterized functions defined in a style other than the Default style resulted in a crash on generate.
- Fixed a bug where changing the case in rule file names or in import identifiers led to a state where the compilation persistently failed and changes were not effective anymore (Windows only).
- Improved the automatic update of dependent CGA files when CGA files are edited. Prior, when dealing with imports, editing a CGA file could lead to low performance. Dependencies among CGA files are now correctly considered.
- Fixed a bug where faulty compiled rule files (*.cgb) were created which led to generate errors. This happened whenever a rule was defined which has the same signature as the s, t or tileUV operation.
SDK 3.0.8961| CGAC 2.1
Bugfixes
scatter operation on volumes and inside, overlaps, touches functions: Holes in triangle faces were ignored, leading to wrong results. That is fixed now.
CityEngine 2023.0 | CGAC 2.0
Compiler Upgrade
The Compiler was updated to a new major version 2.0. Rule packages created with CityEngine 2023.0 are not compatible with older versions of CityEngine or any client of the CityEngine SDK that is not compatible with CityEngine 2023.0. Use the latest version of ArcGIS Pro and CityEngine Plugins.
New features
- The new dynamic import feature allows to import and initialize a ruleset at the time of rule invocation. Overrides can be configured with at-runtime evaluated values.
New annotations
- @DisplayName annotation.
Changes to existing features
- offset operation: Changed the topology of the resulting offset geometry for each face: At the boundary of border faces no duplicate vertices are created anymore.
- Newly created CGA files do not contain an auto-generated header anymore (CityEngine only).
- CGA Compiler:
- The following characters are not allowed anymore in rule file names: $ (dollar), [ (left bracket), ; (semicolon), . (dot, except for .cga suffix). Further: ?, ", *, <, >, |, : and \ (Linux only).
- The import functionality was improved in a number of ways:
- Attribute overrides and protections: An error is shown if the imported attribute does not exist or is already overridden or protected.
- The behavior of attribute overrides has been improved. The evaluation of an attribute override definition which depends on other attributes now respects overridden definitions of those other attributes. Previously, this was not always the case, depending on the alphabetical order of attribute names. This change makes attribute evaluation deterministic. However, in some cases, attributes are evaluated to different values now, leading to a different behavior than in previous versions.
Note:
If attribute overrides lead to a cycle, these cycles are now detected and lead to a compile error. While such rules did compile and work on older versions the result was inconsistent. The special case of an attribute override referring to the overridden attribute itself is still possible. This is important for a code pattern where implicit attribute propagation is used, for example:
is still valid code.import imp:"imp.cga" attr x = .. imp.x ..
- If probabilistic expressions are used in attribute overrides, the random number generator was affected by the order of appearance of overrides. This could lead to the undesired behaviour that an attribute could change its random value when another randomly evaluated override was added. This has been fixed; however, this fix potentially changes your existing models even with the same seedian on the initial shape.
- It is not allowed anymore to override attributes which are located in second-level imports, i.e. attributes which are imported in the imported rule file. For example, in an import statement: import imp1:"rule.cga" ( imp2.x = 1 ) the attribute override for imp2.x is invalid.
- Identifiers in rule definitions must not contain more than one import identifier. For example, in imp1.imp2.Lot-->Rule the second import identifier imp2 is invalid. Rules with an import identifier are only valid in the Default style.
- Undefined rules must not contain more than one import identifier. For example, in Lot-->imp1.imp2.Undefined the second import identifier imp2 is invalid.
Bugfixes
- setback, setbackPerEdge, setbackToArea operations:
- Fixed wrong modulo wrapping of large negative index selectors.
- Selectors bottom, top, object.bottom, object.top, world.down, world.up and world.side now work as expected.
- Added support for reading assets and textures that are located at long absolute paths (Windows only).
- CGA Compiler:
- Fixed a bug when using rule files with a different Compiler version for the first time; for example when using an existing workspace or project in a new CityEngine version. The very first generate could lead to an error or to an incorrect result. From CityEngine 2023.0 on, rule files are always correctly recompiled when a different Compiler version is encountered.
- Fixed a bug where compiled rule files (*.cgb) were created at an incorrect location instead of in the project's bin folder (which is hidden by default). This happened when the cga file was located in a linked folder or in a rules/rules folder.
- The import functionality was improved in a number of ways:
- Rule files with many imports could hit an internal limit resulting in a compile error ("constant pool size larger than limit"). This has been fixed. Many imports can now be handled.
- Fixed marker location for errors and warnings that are located in second-level imports, i.e. in rule files that are imported in the imported rule file.
- Improved reported type mismatches for extension rule overrides.
- Fixed error message and error marker location for type mismatches in attribute overrides.
- Fixed error message and error marker location for import cycles.
- Fixed failing asset lookup in import overrides when imports where done across projects.
- Fixed incorrect invocation of imported rules when the imported rule was not defined in the Default style but in another style.
- Fixed a bug where a call in an imported rule file to a missing function did not issue a no such function error when the function was defined in the importing rule file.
- Fixed a bug where a call to an imported function was misinterpreted as a call to a builtin function when import identifier and function name matched.
- Fixed a bug where a call in an imported rule file was not performed to a builtin or CGA utility library function but to a user defined function with matching signature. This fix potentially changes existing local edits.
- Fixed wrong error marker and unhandled error when an unknown style was specified in an import statement.
Documentation
- setback operation: Added the description of undocumented selectors uv.uMin, uv.uMax, uv.vMin and uv.vMax.
CityEngine 2022.1 | CGAC 1.19
New operations
splitAndSetbackPerimeter operation.
Bugfixes
- offset operation: Fixed wrong geometry in case the inside selector was used but no inside faces were created due to a too large (negative) offset. Now the original geometry is kept in such cases.
- deleteHoles operation: Fixed wrong geometry when deleting holes in non-planar shapes.
- comp operation: Fixed wrong geometry when selecting face components with non-planar holes.
- split operation: Fixed warnings containing the wrong operation name.
- Local Edits:
CityEngine 2022.0 | CGAC 1.18
New features
- Rules with start keyword can be invoked with the start identifier.
- Rules with extension keyword can be redefined in an import statement.
Changes to existing features
- resetMaterial operation: Added an overload which allows for resetting the material of the geometry.
- CGA Compiler: The name of a declaration must not end with a dot, i.e. "Example. -->" is not allowed anymore.
Bugfixes
- readMaterial function: Fixed empty maps (empty string means "no texture").
- alignScopeToGeometry operation: Fixed crash when faceSelector was set to largest. This happened when the current geometry had zero area.
- CGA Compiler:
- Layer attributes (CityEngine only): Fixed error for calls to deprecated getObjectAttr function.
SDK 2.6.8135 | CGAC 1.17
Changes to existing features
- setback, setbackToArea, setbackPerEdge, shapeLUO operations: Setback faces are now more likely to attach to neighboring edges at convex vertices. This avoids gaps in presence of altering setback distances. If the setback face cannot be attached to an edge the respective side is cut inwards in order to avoid spikes.
- i operation: Assets with very large coordinates (> 10'000) are now handled differently on insert and export. This greatly improves numerical precision. However, such assets are not considered instanced anymore.
Bugfixes
- envelope, setback, setbackToArea, setbackPerEdge, shapeLUO operations: Fixed wrong result and improved performance on shapes with many holes.
- innerRectangle operation: Fixed wrong remainder in rare cases.
- offset operation: Improved support for shapes with collinear vertices.
CityEngine 2021.1 | CGAC 1.17
New features
- Support for reading IFC assets.
New functions
- sortIndices function.
- sortRowIndices function.
- setElems function.
- readMaterial function.
Changes to existing features
- String concatenation operator: Strings can now be concatenated with arrays.
- envelope operation: Asset groups are now kept.
- splitArea operation: Asset groups and asset face materials are now kept.
- scatter operation: The group name of scattered points is set to "builtin:point".
- CGA Compiler:
- Local variables: Usage of comp function in a local variable definition is not supported anymore and leads to a compiler time error. Instead, use a separate function that contains the comp function.
- Unused rules and functions are not written to the CGB anymore. Besides reducing CGB size, this avoids unnecessary dependencies on the builtin operation and function set, thus maximizing compatibility for older procedural runtime versions.
- Warnings for unused declarations (attributes, functions, const functions, rules) were removed. This is due to the fact that a declaration is potentially referenced by another rule file via imports. A new option "Find Ununsed Declarations" is available in the CGA Editor.
Bugfixes
- envelope operation: Fixed wrong resulting scope translation. This happened on non-planar shapes with a scope rotation applied.
- Rendering (CityEngine), convexify, setback operations: Fixed a bug which led to wrong uv coordinates and normals in some self-touching and self-intersecting polygon situations.
- split, trim, insertAlongUV: Fixed a rare crash when face materials are present.
- CGA Compiler:
- Fixed a bug which led to an unhandled error. This happenend in rare cases when a recusive function was also defined in another style.
- Fixed a bug where, in imports, non-matching return types of attributes and functions across styles were not detected. This resulted in a crash when switching styles.
CityEngine 2021.0 | CGAC 1.16
New features
- Local variables can be defined using the with keyword.
- Support for reading DWG assets.
New operations
- setMaterial operation.
- resetMaterial operation.
- roofRidge operation.
- alignScopeToGeometryBBox operation.
- footprint operation.
New functions
- getMaterial function.
- sum function.
- listToArray, listFromArray functions.
- geometry.groups function.
- geometry.materials function.
- filesSearch function: In contrast to fileSearch this function returns an array of strings instead of a stringlist.
- assetNamingInfos function: In contrast to assetNamingInfo this function returns an array of strings instead of a stringlist.
- Layer attributes (CityEngine only): isNull function.
Changes to existing features
- i operation and initial shapes: Improved automatic removal of 0-area faces, 0-length edges and 0-angles. The cleanup is less invasive now.
- roofShed operation: Negative angles are now supported. Note that face and vertex indices of a shed roof are different now.
- USD reader: added support for USDZ files.
- convert function: Added a version which takes the coordinate values as array.
- assetsSortSize, assetsSortRatio, imagesSortRatio functions: Added versions which take the list of files as array of strings instead of a stringlist.
- imageBestRatio, imageApproxRatio, assetBestSize, assetApproxSize, assetFitSize, assetBestRatio, assetApproxRatio functions: An invalid string selector does not fall back to a default value but now leads to a runtime error.
- ceil, floor, rint, isinf, isnan, isNull functions: Support for arrays.
- comp, offset, extrude, roofHip, roofGable, roofPyramid, roofShed, taper, split, setback, setbackPerEdge, setbackToArea, shapeLUO, innerRectangle, convexify operations: Asset groups are now kept.
- extrude, taper, setback, setbackPerEdge, setbackToArea, shapeLUO, innerRectangle, convexify operations: Asset face materials are now kept.
- comp(v) operation: The material of vertex components is now set to default.
- CGA Compiler: Identifiers for parameters must not contain a '$' character.
Bugfixes
- offset operation: In case of a failure a crash is prevented or a resulting degenerated geometry is avoided. This happened in rare cases with positive offset distance and collinear vertices.
- geometry.angle function: Fixed wrong azimuth. It was incorrectly shifted by 180 degrees.
- Fixed an issue where the group name of the geometry was not set to initialShape.name for initial shapes with 1 face.
- setback, setbackToArea, setbackPerEdge operations: Avoid creating an unnecessary edge for O-shaped setback geometry.
- roofHip, roofGable, roofPyramid, roofShed operations: Fixed a bug which led to a wrong geometry or a wrong scope in rare cases on shapes with holes.
- roofShed operation:
- Fixed incorrect consideration of negative indexes.
- Fixed a bug that led to self-intersected roofs on concave faces.
- taper operation: Fixed a wrongly aligned geometry on non-planar shapes with holes.
- splitString function: A split of an empty string now returns [""] instead of an empty array.
- filesSearch function: If no matching files are found the function now returns an empty string "" which is the correct representation of an empty string list. Before a string ";" was returned which corresponds to a string list with one empty string element.
- isinf function: Fixed a bug for values that are not a number: isinf(ln(-1)) wrongly returned true, now returns false.
- CGA Compiler:
- Fixed non-responsive compiler. This happened when an imported rule file has many functions and styles and contains a call to a non-existing function (no such function error).
- findFirst (builtin), findFirst (utility library) function: Fixed long compile time in rare cases.
- Improved type mismatch messages for utility library functions.
- max, min, clamp, replace functions: Fixed wrong type mismatch error in rare cases when function is also present as user definition.
- Fixed wrong unused warning in rare cases for definitions that have the same name and parameter count as a builtin.
- Fixed a bug where a rule was not called when its name equals a parameter name.
- Fixed wrong error marker location for duplicate parameters.
CityEngine 2020.1 | CGAC 1.15
New features
- Support for reading USD assets.
New functions
- transpose function.
Changes to existing features
- CGA Compiler: Syntactic errors ("unexpected token") stop the compilation process. No definition errors or type mismatch errors are shown before grammatical errors are fixed.
Bugfixes
- Improved numerical accuracy in pivot and scope calculation.
- comp(f): Improved performance for shapes with many faces.
- convert function: The following conversions did not work correctly:
- convert(pos, object, scope|pivot, ...)
- convert(pos, world, scope|pivot|object, ...)
- convert(orient, pivot, scope, ...)
- split operation: Fixed bugs in the automatic cut closing which led to missing faces or illegal hole faces in the cut-plane.
- Runtime errors occuring in the initialization phase (attr and const evaluation) are now visible in the Problems view.
- print function: Output from initialization phase (attr and const evaluation) is now printed to the CGA Console.
- CGA Compiler:
- Fixed error when overrides for import were stated in separate lines.
- Fixed missing type check in rare cases for definitions that match a builtin signature.
- Fixed incorrect error message for illegal parent styles.
- Fixed a bug where the error was not correctly shown when huge rule files hit an internal limit.
- Fixed an unhandled error for styles with missing styleId.
- Fixed incorrect error in the presence of multi-line strings.
- Fixed missing tooltip for duplicate definition error markers.
CityEngine 2020.0 | CGAC 1.14
New functions
- Operators for arrays.
- colon operator.
- readStringTable, readFloatTable: Functions to read CSV files.
- nRows, nColumns: Functions to access dimensions of an array.
- floatArray, stringArray, boolArray: Functions to convert arrays and create empty arrays.
- Layer attributes (CityEngine only):
- Support for 1D arrays. Arrays with several rows are not supported.
- Array object attribute mapping and sampling: getFloatArrayObjectAttr, getStringArrayObjectAttr, and getBoolArrayObjectAttr.
New attributes
- material.opacitymap.cutoff attribute.
Changes to existing features
- envelope operation:
- Added a version which takes per-edge arrays for baseHeight and angles.
- Fixed non-deterministic behaviour in rare border cases.
- array initialization function: Added notation to create 2d arrays with several rows.
- index operator:
- Access elements by index arrays or logical arrays.
- Added row and column indexing for 2d arrays.
- index function: This function is deprecated. Use the findFirst function instead.
- readTextFile function: .csv extension not supported anymore (see new readTable functions) - if you want to read a .csv file as text you will need to rename it to .txt.
- array initialization, splitString, comp function: The size of the returned array is limited. It can be configured in the Procedural Runtime preferences (Default: 100000).
- texture operation: Reset opacitymap if no alpha channel present.
- str, abs function: Support for arrays.
- @Enum, @Range annotation: These annotations can now be applied to array attributes to specify enumeration values or ranges for array elements.
- @Enum annotation: Enumeration values can now be specified dynamically by an attribute.
- CGA Compiler:
- import: Each import must start with the import keyword. Annotations must be placed before the import statement. Before it was possible to set several imports and annotations after only one import keyword.
- Conditional and stochastic functions as well as literals can be directly used inline as parameters. Before this was not possible for some operations and operators.
- Rule identifiers must not contain successive dots ("Example -->").
A digit after a dot is not allowed anymore ("Example.1 -->").
- Expressions like "1.==1" that use the short floating point notation "1." and do not have any spaces in front of the operator (in this example "==") are interpreted as the new element-wise array operators (in this example ".==").
- t, s, tileUV, setupProjection operation: Invocations to user defined rule overloads (with different types) are not possible anymore but lead to a type mismatch.
Bugfixes
- array initialization: Fixed a crash when initializing a string array by the concatenation of a string array and an empty string literal.
- bool function: Excluded the float-to-bool conversion from inf/nan checks (Procedural Runtime preferences).
- setupProjection operation: Fixed blurry and discontinuous textures at very large world coordinate magnitudes or very large offset values.
- find function: Fixed wrong index if matchString was empty.
- str, print function: Fixed printing the sign for negative infinity.
- CGA Compiler:
- Improved performance of type deduction. Improved type mismatch messages.
- Fixed incorrect compilation error for some recursive function definitions.
- Unary plus operator: Fixed type check. Before its was possible to apply unary plus operator to string and bool.
- Fixed a bug which led to unnecessary occluder generation in rare cases.
- The compiler now issues an error if huge rule files hit an internal limit. Before this led to a crash when generating.
- Layer attributes (CityEngine only):
- p (probability) function and stochastic functions: Fixed wrong reversed consideration of parameter prob or percentage. Before the fix the function returned true for prob<0 or percentage<0% and false for prob>1 or percentage>100%.
- find function: Fixed a bug where overlapping occurrences of matchString were found. For example "aba" was found 2 times in "ababa".
- Fixed performance problems when generating shapes that contain holes and a large number of vertices.
Misc
- The CityEngine 3D viewport now renders all PBR material attributes and material.opacitymap.cutoff attributes.
CityEngine 2019.1 | CGAC 1.13
New functions
- array initialization function (create arrays via initialization list).
- Layer attributes (CityEngine only): getFloatObjectAttr, getStringObjectAttr, getBoolObjectAttr function: Added typed functions for object attribute mapping and sampling. The getObjectAttr function is still supported but deprecated.
Changes to existing features
- set operation: Added set operations for array attributes.
- The usage of misspelled annotations (wrong lower/upper case) is not supported for RPK creation anymore (CityEngine only).
- All inter context/occlusion queries: Improved performance if many shapes are involved (CityEngine only).
- CGA Compiler:
- Arrays can now be const or attr.
- New compilation error "Function call cycle" if a return type of a recursive function definition can not be determined. A functional recursion must contain a conditional with at least one stop criterion. Any other case would lead to an endless function call cycle.
- Invocations to operations with wrong types do not compile anymore (type mismatch) unless a rule with same signature was defined. Before, an "undefined rule" warning was issued.
- Attributes with one parameter are not allowed anymore (except streetwidth).
- More useful type mismatch errors with expected types are issued instead of a no such function error.
- More selective unused warnings. Also shown for unused attributes and functions with no parameters. If errors are present no unused warnings are issued.
- Calls to functions that are unresolved due to a type mismatch in another function are reported as information instead of an error, indicating an inherited problem. This helps to identify the source of the error. In CityEngine the visualization of an information problem level can be configured in the preferences (General > Editiors > Text Editors > Annotations).
- A warning is issued if annotation names are misspelled (wrong lower/upper case) or if deprecated annotations, functions or operations are used.
Bugfixes
- Maximum recursion level for CGA functions: Fixed crash if recursion level was chosen too high. The maximum recursion level is set via attribute /cgaenv/maxFuncCallDepth or via CityEngine preferences (General > Procedural Runtime > Maximum function call depth ).
- roofShed(byHeight) operation: Fixed wrong height in some situations.
- print operation, print function: Fixed print of 2 line breaks if an empty string was printed ( only).
- CGA Compiler:
- Fixed recursive function definitions. Before, an incorrect compilation error was shown in some cases (1. recursion loops with more than one function; 2. conditionals and 3. comp function depending on the order of involved expressions).
- Enhanced response time when code contains errors.
- An undefined rule warning is not shown if a matching rule definition can be found in any style.
- Layer attributes compiler:
- getObjectAttr function (deprecated): Fixed usage in conditionals. Before an incorrect error was reported in some cases (depending on the order of involved expressions).
- getObjectAttr function (deprecated): Automatic type matching for object attributes with same name (when given as a literal). This is only supported within the same function or attribute definition.
- Fixed a bug that did not update problem markers in the editor after the text was edited.
CityEngine 2019.0 | CGAC 1.12
New operations
New functions
- readTextFile function
- geometry.boundaryLength function
- splitString function
- comp function
- Array util functions: index,item, and size
- Edge attribute functions: edgeAttr.getFloat, edgeAttr.getString, edgeAttr.getBool
New attributes
- material attributes:
- material.emissive.{r|g|b}, material.metallic, material.roughness
- material.{emissive|occlusion|roughness|metallic}map and corresponding .{su|sv|tu|tv|rw}
- material.opacitymap.mode
Changes to existing features
- alignScopeToAxes operation: New axis selectors for alignment in the object coordinate system were added.
- print operation and print function: Support for arrays.
- comp operation: New component selector fe for face edges.
- setback operation: Supports individual distances per edge.
Bugfixes
- convexify operation: Fixed incorrect results on shapes with holes.
- softenNormals, setNormals(auto) operations: Compute correct soft normals for vertices bordering a hole. This bug only appeared when the threshold angle was set to a value less than 180 degrees.
- comp(v), comp(e) operations: Compute correct orientation of the scope z axis for vertex/edge components bordering a hole.
- comp(v), comp(e), alignScopeToGeometry operations: Fixed resulting scopes when applied on edges or vertices.
- roofHip, roofGable operations: Corrected the resulting order and first edge of roof faces if the initial shape contained collinear vertices.
- roofGable operation:
- Fixed a crash in subsequent operations or functions if the initial shape contained near-identical vertices.
- Corrected trim plane generation if the initial shape contained several faces.
- cleanupGeometry operation: Fixed a crash in vertex merge. This happened when hole vertices were within tolerance to vertices that belonged to both another hole and an encircling face.
- Internal geometry cleanup (CityEngine only): Preserve first edge of holes.
- Fixed a bug where normal and bump maps were applied in the inverse normal direction (CityEngine rendering only).
- setback operation: Enhanced result at concave vertices.
- CGA Compiler:
- comp , setback operations: Index selectors passed with a float function name "idx" were always evaluated to 0.
- innerRectangle, shapeLUO operation: Do not accept float function names as selector.
- comp ,split ,setback, innerRectangle , scatter , shapeLUO operations: Fixed a bug where a wrong follow-up rule was used (in case of identical rule names except a numerical suffix + very bad luck).
CityEngine 2018.1 | CGAC 1.11
Changes to existing features
- setback operation: The first edge of setback faces is set at the outline of the initial face. For remainder faces the first edge is the closest to the first edge of the initial shape. This fix potentially changes your existing models.
- alignScopeToGeometry operation: Fixed a numerical instability when world.lowest is used. In case multiple faces or edges are candidates for the lowest component, the one with the lowest index is chosen. This fix potentially changes your existing models.
- innerRectangle operation: Fixed a numerical instability. In case several rectangles are candidates for the largest, the one with the lowest distance to the shape's centroid is chosen. This fix potentially changes your existing models.
Bugfixes
- setback operation:
- Avoid creation of slivers, especially at rounded corners with short edges.
- Fixed a possible crash for invalid uv-sets.
CityEngine 2018.0 | CGAC 1.10
Changed fundamental behavior
- Random evaluation of attr/const functions:
The initialization of the random number generator was affected by the mutual dependency of attr/const functions. This could lead to the undesired behaviour that an attribute A which is initialized using probability functions (rand, p), stochastic conditions or related utility functions
could change its random value
- if another attribute B was added that calls A or
- if a call to another attribute B was added to A where B is also randomly evaluated.
This fix potentially changes your existing models even with the same seedian on the initial shape.
New operations
- insertAlongUV operation
New functions
- assetNamingInfo function
Changes to existing features
Bugfixes
- CGA Compiler
- The compiler now checks for matching return types of attributes and functions with the same name across styles. Prior, inconsistent return types resulted in a crash when switching styles or displaying all styles in the file preview.
- Matching parameter types for rules and functions across styles are now also checked for unused definitions.
- Compiler now checks if a definition type (attribute, const, function or rule) is consistent across styles.
- Fixed wrong line reference of incompatible version warnings. This happened for rules that imported other rule files.
- comp operation
- Re-evaluate random generator for each group (g) and material (m) component. Before this fix rand returned the same value for each component.
- Group components (g): Fixed wrong per-face materials for meshes with holes.
- trim, i operation: Trim planes now respect holes in assets.
- trim, i, split operation: Trim planes and splits now respect per-face materials.
- split operation: Fixed missing filling face when faces with near zero area were present at the split position.
CityEngine 2017.1 | CGAC 1.9
New annotations
- @Enum annotation.
New functions
- geometry.height function.
Changes to existing features
- cleanupGeometry operation: Merge vertices: Vertices of holes are now merged within tolerance. As a consequence, neighboring holes could be merged to a single hole and small holes could be removed.
- Prior usage of @Range annotation is deprecated. Instead use new parameterized version of @Range annotation and new @Enum annotation.
- @Angle, @Distance and @Percent annotations are supported in CityEngine.
Bugfixes
- Occlusion queries: Improved accuracy in cases when the query geometry lies on the surface of an occluder shape.
- All intra context/occlusion queries: Fixed a bug where queries did not respect occluder/context shapes and therefore returned a wrong value. This happened for labels (including the empty label) which were not encountered in the first evaluation pass (two-pass generation process).
- cleanupGeometry operation:
- Merge vertices: Prevent creation of small holes and inverted faces.
- Remove duplicate faces: Correct consideration of holes.
- Remove shared edges between coplanar faces: Enhanced overall robustness and results for holes.
- Remove degenerate faces with small area: Applied at the end in order to reduce impact.
- CGA Compiler: Fixed an issue where names and values were not matched correctly in an annotation @Annotation(name=value).
- scatter operation: Gaussian standard deviation can be specified in relative coordinates.
- tileUV operation: Fixed creation of invalid UVs in case of near zero area geometry.
CityEngine 2017.0 | CGAC 1.8
New operations
- label operation.
New functions
- New basic functions: min, max and clamp.
- New functions for color conversion: colorHexToB, colorHexToG, colorHexToH, colorHexToO, colorHexToR, colorHexToS, colorHexToV, colorHSVToHex colorHSVOToHex, colorRGBToHex and colorRGBOToHex.
- New functions for context queries to labeled shapes: minimumDistance, contextCompare and contextCount.
Changes to existing features
- primitiveQuad, primitiveDisk, primitiveCube operation: Removed vertex normals because they do not influence shading. Vertex normals can still be created using setNormals or softenNormals operation.
- CGA compiler: Improved compile time in case of errors due to naming conflicts, especially when rules with many parameters are present.
- comp operation: New component selectors g for groups, m for materials and h for holes.
- inside, overlaps, and touches functions:
- New optional label identifier for performing occlusion queries on labeled occluder shapes.
- Geometries only slightly lying outside an occluder shape are considered inside (adjusted threshold behavior due to floating point limitations).
- Surfaces touch also when normals point in same direction.
- Support shapes consisting of vertices or edges (coming from comp or scatter operation):
- geometry.isClosedSurface, geometry.isPlanar, geometry.isRectangular functions: Return false.
- geometry.nEdges function: Counts edges.
- geometry.isOriented function: Consider vertex/edge normal.
Bugfixes
- setback operation: In some cases self-intersecting faces on concave shapes were created. That could lead to a failure of subsequent operations.
- comp operation:
- Combined (=) face component split now respects per-face materials.
- Fixed wrong edge component split for edges with opposing adjacent faces.
- Fixed wrong result of combined (=) vertex and edge component split.
- Fixed (deprecated) noStreetSide comp split selector handling.
- geometry.area and geometry.isOriented function: Corrected scope selectors for negative scope sizes (e.g. front becomes back if scope.sz is < 0).
- alignScopeToGeometry operation: zUp mode: Fixed wrong pivot for meshes that only consist of vertices (for example from vertex splits or scatter).
- CGA compiler:
- Overriding of const is avoided or gives error.
- Fixed missing rule line reference of incompatible version warnings.
- Fixed an issue where a rule file could not be recompiled correctly after fixing errors.
- Fixed wrong rule line references of compile errors.
- inside, overlaps, and touches functions
- Fixed a bug where a closed shape were not touching and not overlapping another geometry that lied inside.
- Intra-occlusion: Fixed a bug where component split shapes which are children of the current shape were considered for occlusion.
- Inter-occlusion: Fixed a bug where occlusion-queries were not considered when defined in consts or functions.
- Fixed a bug that mistakenly returned true in rare situations due to near zero-area triangles.
- Inter-ccclusion: Fixed a bug that created an occluder shape by a component split or offset operation during the intra ghost tree generation which was then mistakenly considered also for inter occlusion.
- Fixed correct behavior in exports.
- set operation: fixed a bug: trying to set the initialShape.pz attribute resulted in inconsistent behaviour (mismatch with initialShape.pa).
- alignScopeToAxes, rotateScope, mirrorScope, setPivot, cleanupGeometry, reduceGeometry, convexify, split operations: Correctly consider a non-adjusted scope coming from a split operation.
- offset operation: Now keeps asset materials and groups.
- scatter operation: Issue warning for negative or zero number of points.
- inside, overlaps, touches, geometry.angle functions, alignScopeToGeometry, alignScopeToAxes operations: Fixed for shapes consisting of vertices or edges (coming from comp or scatter operation).
- assetApproxRatio, assetApproxSize, assetBestRatio, assetBestSize, assetFitSize, fileRandom, imageApproxRatio, imageBestRatio, fileSearch functions: Fixed a bug which led to wrong asset lookups if used in RPKs.
CityEngine 2016.1 | CGAC 1.7
Changes to existing features
- innerRectangle operation:
- Enhanced overall performance.
- Correct largest rectangle is now also found for large concave polygons with high vertex count.
- The edge mode does not consider negligible short edges.
- More accurate consideration of near collinear edges.
- Very thin remainder faces are prevented.
Bugfixes
- trim, i operation: Fixed various issues for trim planes on concave faces:
- Fixed issues where parts of a mesh are not trimmed away.
- Fixed an issue where the trimmed mesh contained unnecessary edges.
- Fixed an issue where the trimmed mesh on a roof face contained holes.
- cleanupGeometry, reduceGeometry operation: Fixed wrong result if scope contained rotational part.
- cleanupGeometry operation: Fixed a bug that led to inconsistent meshes which could led to a crash on some subsequent operations, e.g. setNormals(soft) or softenNormals.
- offset operation: Fixed undefined behaviour for negative offsets on polygons with holes.
- envelope operation: Fixed a bug that could led to a crash when vertices were collinear.
- getGeoCoord function: X, Y selectors: Fixed to-meter conversion for non-metrical coordinate systems.
- innerRectangle operation:
- Improved stability in remainder computation.
- Fixed failing remainder computation when rectangle edge coincided with collinear vertices of the face.
- Fixed errors and wrong largest rectangles on very small faces.
- Improved accuracy of rectangle alignment in edge mode.
- roofHip, roofGable operation:
- Solved issues that led to wrong results on exact square lots as well as exact rectangular lots with collinear vertices.
- Solved an issue on roofs with overhangs and small pediments where trim planes were missing and scopes of face components were wrong.
- comp operation: Fixed wrong edge component split when adjacent faces were non-planar.
- CGA compiler: Fixed several issues related to attribute propagation/overwriting using import:
- Importing a rule that in turn imports another rule and propagates attributes now works correctly.
- Fixed an issue where attributes from 2nd (and higher) level imports were overwritten although not defined in 1st level import.
- Fixed an issue where the specification of a new attribute value of a 2nd (and higher) level import was not working although not defined in 1st level import.
- Fixed an issue where an attribute was not propagated to 1st level import where it was used to overwrite another attribute in 2nd (and higher) level import.
- Fixed a CGB decoder initialization problem on Linux and OSX.
CityEngine 2016.0 | CGAC 1.6
New operations
- softenNormals operation.
- innerRectangle operation with alignment and remainder options. It replaces the innerRect operation that is deprecated.
- primitiveQuad, primitiveDisk, primitiveCube, primitiveSphere, primitiveCylinder and primitiveCone operations. The primitiveCube operation replaces "builtin:cube" and "builtin:cube:notex" that are deprecated.
- splitArea operation.
Changes to existing features
- setNormals operation:
- New mode auto that uses softenNormals functionality.
- New mode conform that computes consistent normals.
- The innerRect operation is deprecated. Use innerRectangle operation instead.
- cleanupGeometry operation: Mode all/faces: All duplicate/inverse faces are removed except one (independent from orientation).
- i operation:
- New parameter upAxisOfGeometry that specifies the up axis of the geometry.
- New parameter insertMode that specifies the alignment and positioning of the geometry in the scope. The option keepSizeAndPosition is the same as using s(0,0,0).
- "builtin:cube" and "builtin:cube:notex" are deprecated. Use primitiveCube instead.
- extrude operation:
- The paramater axisWorld is deprecated and changed to a parameter extrusionType.
- New types face.normal, vertex.normal, world.up and world.up.flatTop.
- The axes x, y, z, world.x, world.y and world.z are deprecated. Use type world.up instead of axis world.y.
- roofGable, roofHip, roofPyramid and roofShed operation:
- Roofs can be generated wrt. a given height.
- New parameter valueType to switch between a roof generation byAngle or byHeight.
- roofShed operation: For shed roofs on shapes with one face no horizontal trim planes, hip, valley and ridge edges are generated. This was already the case for shapes with more than one face.
Bugfixes
- split, trim, and i: Fixed a bug that led to wrong results when vertices or edges lie in the respective split/trim plane.
- geometry.isInstanced function: Fixed for builtin primitives ("builtin:cube" and "builtin:cube:notex"). Also supports primitiveQuad, primitiveDisk, primitiveCube, primitiveSphere, primitiveCylinder and primitiveCone.
- roofHip, roofGable operation: Fixed a bug that occured on rectangular shapes and led to a wrong shading due to double vertices.
- roofShed operation: Fixed a bug that generated wrong shed roofs for shapes with more than one face, at least one hole and a non-zero edge index set.
- cleanupGeometry operation: Fixed an issue that prevented vertices to merge when they were the first vertex in a face.
- geometry.area and normal calculation became more accurate; floating point precision got improved in general.
CityEngine 2015.2 | CGAC 1.5
Bugfixes
- getGeoCoord function: fixed a bug where selectors lat, lon did not return the correct WGS84 coordinates for some coordinate systems.
CityEngine 2015.1 | CGAC 1.5
New features
- Support for reading FBX assets.
Bugfixes
- comp operation: fixed a numerical issue which led to missaligned faces after comp(f).
- cleanupGeometry operation: made it behave the same on edge cleanup for geometries with per-mesh-materials and per-face-materials.
CityEngine 2015.0 | CGAC 1.5
New functions
- getTreeKey function.
- isNull function.
Changes to existing features
- split operations:
- missing sizes are not allowed any longer. For instance, split(x) { A } does not compile anymore. The correct equivalent is split(x) { ~1: A }.
- functions in size expression do not need extra parantheses anymore.
- @Hidden annotation: changed propagation across imports. A hidden import hides all its imports recursively.
- uid shape attribute deprecated. Use the getTreeKey function instead.
Bugfixes
- Fixed a bug in the cgb decoder which failed to read compiled cga files with a large number of attributes/rules/splits.
- Vertexmerger: fixed a bug which prevented hole vertices to be merged with vertices of other faces.
- float() function: made string-to-float conversion independent of locale.
- split operations: intensified internal mesh cleanup to reduce memory load, fixed a bug which led to undesired vertex-merges.
- roofHip operation: avoid duplicate vertices.
- offset, roofGable,roofHip, operations: made offset / roof construction more stable on polygons with co-linear vertices and fixed a memory explosion bug.
- cleanupGeometry operation: fixed bug which led to illegal material assignements ("filled holes rendering bug") on edge cleanup for geometries with per-face-materials.
- Fixed undefined behaviour if the same name was used for a scalar attr and a map attr.
- CGA compiler: Parameteric rules and functions with a large number of parameters do not hang the compiler / CityEngine anymore.
CityEngine 2014.1 | CGAC 1.4
Bugfixes
CityEngine 2014.1 | CGAC 1.3
New operations
- deleteHoles
New functions
- geometry.nHoles function.
- geometry.isClosedSurface function.
New CGA Utility Library functions
- listTerminate function
New features
- alignScopeToGeometry, convexify, envelope, cleanupGeometry, innerRect, scatter, setback, shape{L|U|O} and reduceGeometry operations and geometry.isClosedSurface, geometry.area (with selector) functions: holes in polygons are now supported.
- convexify, innerRect, offset, shape{L|U|O} operations: uv coordinates and vertex normals are not deleted anymore but interpolated for new inner vertices.
- convexify, innerRect, offset operations: result is not planarized anymore.
- color operation: support for setting opacity (alpha).
Changes to existing features
- Changed the defaults for recursion detection:
- Maximum derivation depth: from 99 to 1024.
- Maximum derivation width: from 50000 to 100000.
- Maximum function call depth: from 256 to 1024.
- Optimized function memory overhead (i.e. more interleaved functions beyond the default limit are possible now before crash - actual limit depends on platform & function).
- Collada reader: added support for polygons with holes.
- str function and print, report operations: made float-to-string conversion independent of locale (some numbers might be formatted differently now).
- Internal geometry cleanup: improved handling of illegal holes (overlapping holes, wrong vertex order).
Bugfixes
- extrude operation: fixed polygon with holes handling.
- convexify operation: fixed face consistency if several edges have identical length.
- envelope operation: fixed border cases which led to "open volumes".
- alignScopeToGeometry operation: fixed points/edge shapes support: scope size was set to 1 rather than 0, pivot orientation was not set to vertex/edge normal, fixed a crash if illegal edge index was used on edge geometry.
- setback and shape{L|U|O} operations: fixed memory leak.
- split operations: fixed hole handling (produced illegal holes in certain cases).
- offset, roofGable, roofHip, and roofShed operations: made polygons with holes handling more stable for illegal holes (hangers).
- assetInfo, assetsSortRatio and assetsSortSize functions: fixed behaviour for unknown/unloadable assets.
- material shape attribute: material.XXXmap returns "builtin:unknowntexture.png" if texture not found.
- Fixed (deprecated) noStreetSide comp split selector handling.
- Fixed a bug regarding edge/point geometry normals (CityEngine rendering only).
- Fixed a bug in handling edges in empty geometries.
- i operation: fixed a race condition in handling unknown assets which led to a crash.
- Fixed an internal illegal pointer access which led to a crash.
- print, print, set operations: fixed nan handling (avoid checks) and removed excess newline (bool).
- str function: fixed inf/nan handling.
- listRange function: fixed a bug reading (illegal) non-´;´-terminated string list handling.
- improved internal rad-to-degree conversion precision.
- AssetErrors: report warnings from geometry conversion of inserted assets.
- Fixed a vertex merge issue in trim/split (identical vertices were not merged).
- CGA compiler:
CityEngine 2014.0 | CGAC 1.2
New features
- offset, roofGable, roofHip, and roofShed operations: holes in polygons are now supported.
- setback operation: new syntax for selecting uv sets and new uv-based selectors uv.left, uv.right, uv.bottom, uv.top; uv coordinates and vertex normals are not deleted anymore but interpolated for new inner vertices.
- tileUV operation: using 0 for the textureWidth or the textureHeight parameter protects that coordinate from beeing touched.
Changes to existing features
- import: attr value propagation logic was simplified.
Bugfixes
- import: resolving assets from cross-project imports failed in some cases (imports which imported a cga file from the same directory). This was fixed in the cga compiler (CGAC), so existing rpks should be updated.
- assetApproxRatio, assetApproxSize, assetBestRatio, assetBestSize, assetFitSize, fileRandom, imageApproxRatio, imageBestRatio functions: fixed a bug which led to wrong asset lookups if imported from a different project.
- geometry.angle function: fixed a bug which led to wrong results.
- fileSearch function:
- hits in the current project were reported in relative path notation; this got changed to absolute workspace paths again.
- crash fixed if illegal regexps were used in attr initialization
- spaces within qoutes were broken
- initialShape attributes returned wrong values if used in const / attr functions.
- comp operation: for polygons with holes, the border, insider selectors and the = operator were buggy.
- imageInfo function: does not crash anymore on empty filename.
- imagesSortRatio function: does not crash anymore on empty fileList.
- split operation: fixed a bug which led to deletion of the last leaf of a uv-split in some cases.
- inside function: fixed a bug which led to wrong results.
- Fixed a bug connected to inter-model occlusion of vertically distant initial shapes: ignore neighborhood distance on y-axis for finding potential occlusions.
CityEngine 2013.1 | CGAC 1.1
Changed fundamental behavior
- attr/const functions evaluation order: In previous CGA versions, attr and const functions were evaluated lazily, i.e. when they were used for the first time. Remember that attr and const functions are evaluated only once. This approach gave rise to the non-intuitive behaviour that changing the code of some rule potentially changed the value of an attr. Keep in mind that some functions (and obviously shape attributes) depend on the current shape's geometry, and some even change the state of the current shape (e.g. rand). Therefore (non-)evaluation of a const function cold have an influence on rule execution. Starting with 2013.1, all attr/const functions are evaluated before the start rule is applied, on the initial shape with a seedian derived from the initial shape's seedian. The initial shape's random number generator state is not affected. While the new approach makes CGA coding more "intuitive", it changes the behaviour compared to older versions.
- inf/nan checks: In previous CGA versions, a number of operation and function float parameters were tested for not-a-number / infinity (nan/inf) values at runtime. In most cases, such values were replaced with 0 and a warning was issued. In others, the operation was aborted. CGA 2013.1 introduces a unified inf/nan behaviour: checking of all float paramers of builtin functionality can be set to either "ignore" (= don't check), "abort with error" or "replace with zero" see Grammarcore Preferences). The default behaviour is "replace with zero", which comes closest to the classic behaviour. While CGA 2013.1 provides more debugging capabilities regarding inf/nan values, the behaviour is different than in previous versions.
- Intra-occlusion and reports, print output, CGA error reporting: During resolving inta-occlusion-queries, some shapes and sub-shapetrees get deleted (and re-evaluated). The reports issued by report operations by the rule of that shapes (and the output of print operations and functions plus all CGA errors/warnings) are deleted along with those shapes. While the new behaviour makes more sense (each report/print-output/error has associated a shape in the model hierarchy), it is different than in previous versions.
New CGA Utility Library functions
- listCount function
- listRemove function
- listRemoveAll function
- listRetainAll function
New features
- envelope operation: added direction parameter, allowing for world up-axis aligned envelopes.
- cleanupGeometry, comp, extrude, split operations and geometry.nFaces, geometry.area, geometry.volume functions: holes in polygons are now supported. However, other operations might drop holes (and issue a CGA warning).
Changes to existing features
- report operation: available with all licenses.
- report operation: new, more efficient implementation - resulting geometry might differ to previous version.
- fileExists function: now returns true fo all builtins.
- material.color.rgb attribute: return a hex string (see color operation) rather than a three-floats-in -[0,1]-string.
- listClean utility function: empty entries are filtered now.
- listIndex utility function: support for wildcards.
- envelope operation: deprecated signatures without direction parameter.
Bugfixes
- alignScopeToGeometry operation: more robust regarding bad geometry (fixes a crash) and better face material support.
- assetApproxRatio, assetApproxSize, assetBestRatio, assetBestSize, assetFitSize, fileRandom, imageApproxRatio, imageBestRatio functions: fixed a bug which led to wrong asset lookups if imported from a different project.
- assetApproxRatio function: fixed axisSelectorRatio parameter (crashed if yz was used).
- assetsSortSize function: fixed axisSelectorSize parameter (yz was ignored).
- envelope operation:
- fixed missing top faces if one some of the baseHeights were equal to maxHeight.
- support for non-planar polygons.
- fixed several numerical issues (crashes, incorrect geometry).
- i operation and initial shape handling: added zero-angle removal and better face material support.
- print function: a newline is added after each invocation (like in the print operation.
- comp, envelope, envelope, geometry.area, and geometry.isOriented operations/functions: street.xxx selectors: do not fallback to object.xxx selectors if streetWith sttribute is not defined for index 0 but for other indics.
- Vertex meger (export + internal to a number of operations): more robust regarding bad geometry (fixes a crash).
- Triangulator (export, rendering and internal to a number of operations): correctly handle near-identical vertices (led to inconsistent geometry and crashes).
- Fixed a number of compiler bugs related to import, most important a bug which prevented setting of imported generic attributes.
CityEngine 2012.1
New operations
- cleanupGeometry operation
- envelope operation
- reduceGeometry operation
- setNormals operation
New functions
- geometry.angle function
- geometry.isInstanced function
New attributes
- uid attribute
New CGA Utility Library functions
- colorRamp function
New features
- comp, setback, geometry.area, and geometry.isOriented operations: added street.front, street.back, street.left, street.right, street.side selectors; these selectors will fallback to the according object.xxx selectors if no streetWidth attribute is present.
- setback, geometry.area, and geometry.area operations: added world.side, object.side selectors.
- Edges and vertices resulting from comp(e) or comp(v) are now rendered in the viewport (the size can be controlled in the Grammarcore Preferences); only some formats support exporting edges/vertices, see Rendering and Export feature table.
Changes to existing features
- report operation: only available with advanced license.
- reverseNormals operation: support for vertex normals.
- setback, shapeLUO operations: New implementation.
- scatter operation: No geometry is inserted anymore (a builtin:cube used to be inserted), but the vertices are visible in the 3D Viewport.
- comp, setback, geometry.area, and geometry.isOriented operations: streedSide, noStreetSide selectors deprecated.
- Asset Search: added the current project to the search path if rule file is in the Utility Library.
Bugfixes
- comp operation: using the combine (=) operator in conjunction with edges and vertices (e|v) led to undefined behaviour. fixed.
- geometry.isOriented operation: world.x selectors were inverted. fixed.
- i (trimming) and split operations: fixed some bugs which led to inconsistent geometry and increased performance for large geometries. This also speeds up export if vertex merger is on.
- alignScopeToAxes operation: works now also if the current shapes' geometry is empty (e.g. after a scatter or comp(e|v) operation), and multi-mesh geometries do not loose materials anymore.
CityEngine 2011.1
New functions
- getGeoCoord function
- geometry.isOriented function
- geometry.{uMin|uMax|vMin|vMax} functions
- print functions
New attributes
New features
- Added support for generic shape attributes: each shape can have its own copy of an attribute, and the value is passed on to the successors. Values can be set with the set operation.
- Added support for styles: Rules and attributes can be bundled and named to form a style. All styles derive from the default style. This is somewhat similar to inheritance in OOP.
- On import of a rule file, attributes can now be protected and styles can be chosen.
- color operation: added an overload which takes a float tripple.
- geometry.area function: added object.front, streetSide and noStreedSide selectors.
- case blocks can now be used between push [ and pop ] operations, i.e. a new scope can be conditional.
- CGA executen trace for debugging, see Grammarcore Preferences.
- alignScopeToAxes operation: added x and z selectors.
Changes to existing features
- material attributes:
- if the shape material attribute is not modified: return attribute from first geometry asset mesh material (i.e. always return the current value; on older versions, always the shape material value was returned)
- removed material.ambient.a attribute
- deprecated material.color.a (replaced by material.opacity) and material.map{3,4,5} (replaced by material.specularmap, material.opacitymap, material.normalmap) attributes
- changed material.bump to material.bumpValue
- fundamental changes to transparency handling: the alpha channel of material.colormap is always ignored now; alpha-maps must be set using the material.opacitymap texture layer; similarly, material.opacity must be used instead of material.color.a; rendering: CityEngine's GL preview now drops fragments with alpha < 0.1, that used to be 0.3. note: all materials with opacity are rendered after all other materials.
- textures can be disabled by setting the filename to the empty string (i.e. texture("") or set(material.opacitymap, "")); in previous versions, this led to usage of "builtin:unknowntexture.png"; the default materials's textures are set to the empty string instead of "not available".
- If a texture can not be found, the texture name is always set to "builtin:unknowntexture.png". This is also the case for misspelled "builtin:XXX" textures (which were set to "builtin:default" in previous versions).
- "builtin:cube" now has texture coordinates for uv-set 0 (colormap) only (was 3: uv-sets 0, 1, 2 in previous versions).
- For rendering and export, undefined uv-sets default to set 0 now (if 0 is defined), i.e. if e.g. material.opacitymap is set to a valid texture, but uv-set 3 is undefined, the coordinates form uv-set 0 are re-used. This was only the case for specular map before. See also Texturing: Essential Knowledge.
- fileSearch function (and all related functions in the Utility Library) got reworked:
- search logic is more strict now (if searchQuery is not an absolute workspace path, match relative to assets and root folders of current project (in old versions, it was tried to match all folders and subfolders)
- better performance
- Geometry asset readers: extended consistency checks to handle polygons with collapsed edges and dropped checking for non-planar faces.
- Removed "drop shapes fully trimmed away" optimization in createShape operation: in older versions, new shapes were not created if they would be completly behind an enabled trimplane.
Bugfixes
- scatter operation: gaussian distribution: fixed wrong mean calculation for right / bottom cases; led to endless loops in certain cases.
- vertex merger now respects topology (i.e. export with vertex merging option and all cga-operations are o-shape safe).
- The setback, shapeLUO operations received a facelift, fixing many issues. Notably shapeO is much more stable now.
- Fixed a fatal recursion-not-detected error in user-defined functions with arguments.
- uv split operation:
- fixed crash on geometries w/o uvsets.
- fixed a precision bug.
- innerRect operation: fixed shape placement if scope contains rotation.
- Self-intersecting polygons are handled properly now (scatter, uv split operations and rendering).
- roofHip operation: fixed a crash in a specific situation (with overhang, on collinear vertices).
- fixed comp.sel (only contained last word, e.g "front" instead of "object.front").
- fixed a bug in convexify: check resulting polys for zero area, remove degenerate ones - led to crashes in follow-op operations in some cases.
- rotate operation: fixed a bug in scope case (was rotated around pivot, not scope).
- convert function: fixed a bug in convert(x|y|z), scope, pivot, orient, x, y, z) (was size-sensitive).
- material-per-face assets: improved support, material now survives deletion of zero-area faces.
- split / trim fix: cut-exactly-throug-edges situations with >1 points (o-shapes etc.).
- fixed a bug in intra-occlusion geometry caching (led to wrong results).
- Collada reader:
- lines and points are ignored now (they were treaten as polygons in older versions)
- meshes consisting of textured and non-textured polygons are handled better now (non-textured polygons receive (0,0) uvs on all vertices).
- Image reader handles 16bit grayscale textures properly now.
- faster and more stable geometry.area.
CityEngine 2010.3
New operations
New features
- comp operation: added world.xxx, object.xxx and streetSide selectors.
- geometry.area() function now supports component split-style selectors to calculate area of only a subset of the geometry's faces.
Changes to existing features
Bugfixes
- Fixed a bug in trimming a negative sized scope.
- color does not touch alpha (used to set it to 1.0).
- comp operation: corrected scope selectors for negative scope sizes (e.g. front becomes back if scope.sz is < 0).
- convexify and innerRect operations: fixed a numerical problem concerning collinear vertices: remove'em before the operations.
- mirrorScope operation: fixed a bug which resulted in wrong translations.
- roofShed operation: fixed vertex indices for shed roofs on multi-face shapes.
- offset operation: fixed a bug in the case where no inside/border geometry was generated (due to a too large offset) and the according selector was used.
- Fixed a compiler bug: functions beginning with &const& or &attr& (eg. construction) were parsed wrongly.
CityEngine 2010.2
New operations
- deleteUV operation
- mirror operation
- mirrorScope operation
- normalizeUV operation
- rotateScope operation
- trim operation
New functions
- geometry.du/dv functions
New features
- split operation now supports splits in the uv (texture coordinates) domain including support for the "unwarped" domain (unitSpace surface parameterization).
- offset operation: a new overload allows for keeping only inside or border faces.
- setupProjection operation: a new overload allows for adding a translation offset to the setup scope.
Changes to existing features
- extrude and taper operations now keep texture coordinates.
- extrude, taper, roofGable, roofHip, roofPyramid and roofShed operations do net set the pivot anymore and try to maintain the scope's x-axis orientation as much as possible (i.e. the scope and pivot orientation is different now).
- alignScopeToGeometry operation: negative indices are supported now (modulo, i.e. -1 is the last face/edge; was unspecified behaviour before).
- comp(e) operation: edges have now a defined index, i.e. edge 0 is always guaranteed to be the first edge of the first face.
- roofGable, roofHip and roofShed operations are now guaranteed to put first roof face on first edge of input face in all cases and to put all roof faces on corresponding edge if current geometry consists of one face only.
- setupProjection operation: deprecated setupProjection(uvSet, axesSelector, width, height, uwFactor overload .
- changed recursion detection: control shape tree width rather than active nodes
Bugfixes
- Recursive functions did not compile if the arguments were not float.
- replace function: did replace only the first occurrence, now replaces all occurrences.
- split and trim operations:
- now handle concave polygons.
- now handle negative-sized scopes.
- Fixed a bug in intra-occlusion (in some cases wrong pre-component-split volume was taken to check against).
- geometry.isPlanar function: in case of collinear edges nonplanarity was reported.
- innerRect, convexify, roofHip, roofPyramid operations and roofShed operations: fixed a numerical issue.
- alignScopeToGeometry operation: world.lowest selector: if all vertices had y-coordinate exactly on 0.0 result was random.
- comp operation: if the "=" operator was used in conjunction with a rotated scope, the resulting shape had wrong scope and pivot position.
- center operation: did not work properly if scope was rotated.
CityEngine 2010.1
SR1 new functions
- sel function
SR1 changes to existing features
- fixed signature matching bug (false syntax errors, eg. with alignScopeToGeometry)
- fixed wrong asset search path in imported rule files
- fixed cgalib replace() issue
- fixed a bug in translate(rel, object, ...) operation
- fixed a bug which led to unreferenced vertices in extrude and roofXXX operations (connected to very thin features).
- fixed a bug in multi-face-extrude: in special cases some faces got deleted
New operations
- convexify operation
- rotateUV operation
- reverseNormals operation
- texture operation
New functions
- pow function
- exp function
- log10 function
- ln function
- len function
- count function
- find function
- substring function
- isnan function
- isinf function
- assetInfo function
- assetsSortRatio function
- assetsSortSize function
- fileExists function
- fileSearch function
- find function
- float function
- str function
- bool function
- imageInfo function
- imagesSortRatio function
New features
- CGA Utility Functions Library with utility functions for string handling, string list handling and file, assets and image handling.
- Support for reading Collada assets.
- Limited support for material-per-face assets
- split operation: added optional noAdjust selector to avoid scope being set to the geometry's bounding box.
Changes to existing features
- initialShape.startRule is new and replaces the deprecated initialShape.symbol.
- Asset and texture search: Now the search for an inserted asset (or texture) is always relative to the rule file and the search locations changed. No search heuristcs are applied anymore, so for instance the asset "assets/windows/window1.obj" must be inserted as i("windows/window1.obj"); in older versions, i("window1.obj") would have found the file (but maybe another one instead, with the same file name, but at a different location in the workspace).
- s operation: a negative size now leads to a mirrored geometry (with reversed normals) rather than to an implicit translation. Converting rules which used negative sizes is straight-forward: use the posive value and add a t operation, for example this cga code s('1,'1,-1.2) OpeningWall("door") Door has to be converted to this: s('1,'1,1.2) t(0,0,-1.2) OpeningWall("door") Door
- fixed reverse face and mesh order of inserted obj assets - face ids are reversed (comp split!)
- initialShape.symbol attribute: the signature string (''${}'') was dropped
- alignScopeToGeometry: (a) New face selectors world.lowest, largest, any. (b) New edge selectors world.lowest, largest and new syntax (combinations of face and edge selectors and indices). (c) Deprecated alignScopeToGeometry(upAxis, faceIndex) and alignScopeToGeometry(upAxis, auto).
- innerRect operation:(a) Now operates on each face of the geometry (instead of just the first face). (b) Concave faces are handled (they get convexified first and the innerRect is computed on the largest rectangle). (c) Only keeps rectangular faces if they are aligned to x-axis.
- It is not possible to use the ~ operator anymore in the s, r, t operations - it did not do anything anyway.
- setupProjection operators ~ and ' can now be used.
- setPivot: no support anymore for "yUp" and "zUp" selectors (use xyz and yzx).
Bugfixes
- Occlusion: (a) fixed a bug which led to wrong results (b) fixed an intra-occlusion memory leak (c) fixed a bug which could have led to inconsitencies in the exported models.
- geometry.isConcave function: fixed a numerical issue which led to wrong results.
- changed const expression evaluation - they are always evaluated → numbers are consistent, also if overriden by inspector value
- Component split: fixed a bug which led to lost materials if asset contained more than one mesh / material
- setupProjection operation: fixed some numerical issues which led to wrong results.
- The obj asset reader now handles negative indices (max files)
- color does not touch alpha (used to set it to 1.0).
- Better name clashes handling of imported rule files.
- Stricter type handling, some errors which were only detected during generation before are now detected at complie time.
- split operation: in some cases (extruded geometry), texture coordinates were repeated rather than split.
CityEngine 2009.3
New features
- roofGable operation
- roofHip operation
- roofPyramid operation
- roofShed operation
- translateUV operation (was offsetUV)
- innerRect operation
- geometry.nEdges function
- setupProjection operation
- projectUV operation
- Component split: (1) Added ''='' operator. This Operator combines all selected components into one new shape. (2) New selectors: border, inside and eave, hip, valley, ridge. (3) New shape attributes comp.index, comp.total.
Changes to existing features
- Support for trim-planes along concave faces. Trim planes are not infinite anymore, their extent can be controlled in the Grammarcore preferences.
- roof operation deprecated.
- offsetUV operation deprecated (is now translateUV).
- setupUV, bakeUV deprecated (use setupProjection and projectUV operations instead).
- extrude, projectUV, roofHip and roofShed now handle multi-face initial shapes.
- inside, overlaps, touches functions: (1) added inter, intra, all selectors. (2) A special configuration (''face is completely covered by a side of a volume'') is now included in the inside case.
- New settings to control endless recursion detection: (1) limit function call depth, (2) limit nr. of active shapes (detect shapetrees-breadth-explosion), see Grammarcore preferences.
Bugfixes
- alignScopeToAxes() (only the no-selector default case) did not work properly, fixed.
- Non-boolean expressions are no longer valid in case statements (led to a run-time error before).
- Fixed a bug connected to usage of convert() in imported cga files.
- Using alignScopeToAxes() or alignScopeToGeometry() between setupUV() and bakeUV() resulted in incorrect texture coordinates, fixed with new operations.
- Fixed a bug in euler angle extraction which sabotaged e.g. convert().
- extrude operation: fixed indexing of first face.
- convert function: convert(orient, scope, world | object, ...) did not work correctly
- Component split: (1) using indices on an empty selection no longer crashes. (2) interleaved edge/vertex-comp-splits did not work (resulted in empty selection), fixed
- inside, overlaps, touches functions: fixed several bugs (dislocated intersection volumes, wrong touches results, lost inter-occluders).
CityEngine 2009.2
New features
Changes to existing features
- object coordinate system: a shape's pivot is now relative to initialShape.origin and not relative to the world coordinate system anymore.
- extrude(axis, h): axis selectors (x | y | z) deprecated; new selectors (world.x | world.y | world.z) change pivot orientation after operation to be the same as after extrude(h).
- alignScopeToGeometry: "auto" mode: (1) if all edges are on the same y-coordinate, the longest edge is taken and (2) fixed a bug which led to undefined behaviour in rare cases.
CityEngine 2009.1 and older
Older versions are not supported.