Posts

[023] Let's Start Learning CGA in Esri CityEngine

Let's Start Learning CGA in Esri CityEngine Designing the rules of generation rather than modeling individual results. This tutorial marks the beginning of our deep dive into CGA (Computer Generated Architecture). We shift our perspective from traditional manual 3D modeling to a rule-based procedural system. You will learn the fundamental logic of how CityEngine decomposes complex structures and get an overview of the core curriculum, including essential commands like extrude, split, and comp. Finally, we are starting CGA!!! Most 3D modeling software focuses on creating a single finished result called a building. You directly create the desired shape, modify it, and add detailed elements to complete the final model. However, CGA is a bit different. In CGA, you don't create the building itself; you design the rules by which the building is created. In other words, it can be said to be a method of creating the...

[022] Export CGA Rules to SketchUp Using RPK Packages

Image
Integrate procedural CityEngine logic directly into SketchUp by packaging CGA files as Rule Packages (RPK). This tutorial demonstrates the process of converting CityEngine CGA rules into RPK files and utilizing them within SketchUp via a dedicated extension. While custom rules may currently face stability limitations in some versions, we will cover the essential workflow from rule creation to package installation and testing. Workflow Overview: CityEngine CGA to SketchUp RPK Pipeline It is said that CityEngine CGA files can be used in SketchUp, but in conclusion, it does not work well. The items included during installation work fine, but when trying to use custom-made ones, SketchUp ends up force-closing. Since I haven't used SketchUp much, even looking at GitHub, there are no bug reports at all, so I don't know what the problem is. Nevertheless, I will proceed with calling the CGA extension in SketchUp for now. ...

[021] Import External CGA Files for Modular Rule Design in CityEngine

Image
Learn how to use the import command to split complex CGA rules into manageable, reusable modules. When CGA code becomes too long, it can be separated by function into multiple files. This modular approach makes code easier to edit and reusable across different projects. This tutorial explains the basic concept of importing files and demonstrates how imported attributes are organized within the CityEngine Inspector. Single-file vs Modular CGA Structure When CGA code becomes too long, you can separate rules by function into modules and reuse them as needed. This is extremely useful because it is easy to modify and can be reused in other code. This is a very familiar concept for those who do programming. For example, Suppose there are mixed parcels with different uses, and the regulations require changes in building form according to the use, such as through district unit plans. Writing all the rules for different...

[099] How to Use Recursive Calls for Object Placement in CGA

Image
Master object duplication and spacing logic by implementing recursive CGA rules in CityEngine. In this tutorial, we will learn how to duplicate objects and arrange them at regular intervals using recursive calls. We will explore the logic of calling a rule within itself, managing variable changes to prevent infinite loops, and using conditional statements to control procedural placement. In this lesson, we will build a simple recursive placement system that duplicates objects at fixed intervals. This technique is commonly used for procedural repetition, geometric patterns, and rule-based layouts in CityEngine. img 1 : Example of object spacing using recursive calls Before diving into the logic, watch how the recursive duplication behaves in practice. Video: Demonstration of recursive object placement Understanding the Logic The example above duplicates an object repeatedly based on the value en...

[020] How to Create Dashboard Charts from Report Data in CityEngine

Image
Leverage + Visualizing + Urban Statistics summary This tutorial explores how to use the CityEngine Dashboard to transform raw CGA report data into intuitive Bar and Pie charts, allowing for immediate urban density and land-use analysis. Let's take a brief look at how to create charts using the Dashboard feature in CityEngine. The Dashboard is a powerful tool that provides visual feedback as you modify your procedural models. To follow along, we will use a CGA rule that generates random building heights, separates floors, and extracts necessary data into the Reports tab. Below is the code used for this workflow. CGA Code for Data Extraction attr BD_floor = rint(rand(1,8)) # Generates a random floor count between 1 and 8. attr BD_use = "" # Specify the building usage (e.g., School, Factory, Hospital) in the Inspector panel. Lot --> report("Building Area." + BD_use, geometry.area()) # Accumul...

[019] How to Generate Real-Time Building Reports in CityEngine Using CGA

Image
Extract + Real-Time Data + Procedural Modeling Metrics Learn how to use the report command in Esri CityEngine to extract live statistical data such as floor counts, total floor area, and land-use metrics directly from your procedural models. When working on complex urban models in Esri CityEngine , you might have wondered: "Is it possible to get statistics on the number of buildings, the area per land use, or the total count of windows in real time?" The answer is yes. By using the report command in your CGA rules, you can display live information in the Reports tab of the Inspector panel. This data can then be easily copied into a spreadsheet for detailed analysis and reporting. The Core Concept of the Report Command The fundamental idea behind the report function is to instruct CityEngine to record specific information at a chosen stage of your rule hierarchy. Even if you are a beginner at CGA, ...

[018] How to Convert Models to Shapes and Fix Perspective Distortion in Esri CityEngine

Image
Transition from dynamic procedural models to editable static geometry and prepare clean, distortion-free facade textures. In this Esri CityEngine tutorial, we conclude our look at the Shape menu by exploring two vital tools: Convert Models to Shapes and Crop Image . These functions allow you to "freeze" procedural results for manual editing and correct perspective issues in real-world building photography. Convert Models to Shapes: Transitioning to Static Geometry The Convert Models to Shapes function is used to transform a 3D model generated by a CGA rule—or an imported 3D object—back into an editable Shape . When a building is in its "model" state, it is actively driven by a Rule File and a Start Rule. [img 1 : Model status with active Rule File and Start Rule] After applying Convert Models to Shapes , the Rule F...