Posts

Showing posts with the label GIS

[114] How to Export Bookmarks as Images using Python in CityEngine

Image
Learn how to write a Python script in CityEngine to batch export all saved scene bookmarks as high-resolution images. Manually capturing viewpoints for professional reports can be tedious. This tutorial introduces the fundamentals of CityEngine Python scripting by building a tool that iterates through every bookmark in your 3D views and saves them as 3000x2000 pixel JPG files automatically. This workflow serves as the first step in automating repetitive  CityEngine tasks. As you use CityEngine frequently, you start to notice missing features one by one. For instance, when there are many bookmarks, you have to switch between viewpoints manually, one by one to take snapshots. Or perhaps you want to find and modify only objects with specific attributes but have to select them individually to apply rules. You might even want to pull in external data in real-time to drive changes. and so on—over time, many such limitations nat...

[041] How to Precisely Target Faces Using comp.index in CityEngine CGA

Image
Learn how to find and use the comp.index value via the Inspector panel to precisely target and apply rules to individual faces. In procedural modeling, selecting a specific face among hundreds can be challenging with general orientation-based selectors. This tutorial demonstrates how to identify the unique index of a component and utilize it within conditional CGA rules for absolute precision in your 3D urban designs. I previously covered split.index, but as I began creating more complex forms, I realized that comp.index deserved its own explanation, so I’ll briefly cover it here. Why Traditional Selectors Are Sometimes Not Enough As you proceed with rules, the number of faces increases. To pinpoint and select a specific face, you need to use a combination of various selectors. However, selectors such as front selectors, object coordinate selectors, and world coordinate selectors operate within specific spatial conditions ...

[040] Understanding Object Coordinate Selectors in CityEngine

Image
Learn the fundamental differences between local and object coordinate systems to achieve consistent procedural results. This tutorial explains how to differentiate between local selectors and object-based selectors in CityEngine CGA. By understanding the hierarchy of coordinate systems—World, Object, and Local—you will be able to reliably target specific building facades regardless of how complex your procedural rule tree becomes. I was planning to move on to creating forms using indices, but then I remembered that I skipped an explanation of object.front, object.right, object.left, object.back, and similar selectors when I previously covered comp(). img 1 : ESRI CityEngine CGA comp() Reference If you look at the reference above, front and back belong to the "local coordinate system," while selectors starting with object. belong to the "object coordinate system." So what exactly is the di...

[038] How to Select Street-Facing Faces with Comp() in CityEngine

Image
Learn how to target street-facing faces  using street selectors and  handle streetWidth attributes in imported GIS data. This tutorial explains how to use street selectors in CityEngine.  They define front, back, and side faces relative to streets.  We cover the essential requirement of the streetWidth attribute and how CityEngine handles geometry when these attributes are missing or imported from external CAD data. In real-world GIS workflows, these selectors become especially important when working with imported parcel data. img 1 : Visualization of street selectors. Source: Esri CGA Documentation img 2 : Definitions of front, back, left, and right relative to the street. The face adjacent to the road is defined as 'front'. When looking at the shape from the road, the left side is 'left', the right side is 'right', and the back is 'back'. The combination of left and ri...

[037] How to Select Roof Edge Types Using Comp(e) Selectors in CityEngine

Image
Classify and isolate specific roof components like eaves, ridges, and valleys to apply detailed architectural textures and geometries. This tutorial explores the specialized edge selectors in CityEngine's comp(e) command. By understanding how the software defines the topography of a roof—similar to mountain ridges and valleys—you can precisely target edges for gutters, ridge tiles, and structural details. Do you like hiking? In Korea, mountains are one of the most common sights. When we describe the topography of a mountain, we use terms like "ridge" for elevated paths, "valley" for recessed terrain, "ridges" for elevated paths and "valleys" for recessed terrain. In CityEngine, you can select specific edges by providing conditions similar to these topographical features. Core Technical Definitions of Roof Edge Selectors CityEngine provides several edge selectors specificall...

[035] How to Use World Coordinate Selectors in CityEngine CGA

Image
Apply world coordinate selectors like world.south to maintain consistent rule orientations (e.g., south-facing windows) regardless of building rotation. This lesson explores the fundamental difference between world and local coordinate systems in CityEngine. By understanding world coordinate selectors, you can ensure that specific architectural elements—such as solar panels or climate-specific windows—always face the correct compass direction, even when the building footprint itself is rotated or modified. Introduction to World Coordinate Selectors Today, we will cover world.south | world.north | world.west | world.east | world.up | world.down | world.side among the comp() selectors. The word "world" is used here. As the name suggests, it means the selection is based on the World Coordinate System. This was the final image from the previous lecture, and the standard for "world" is indicated ...

[032] How to Create 3D Volumes Using Extrude in Esri CityEngine

Image
Understand the extrude command to transform flat 2D shapes into 3D building volumes with precise control over verticality and roof flatness. This tutorial marks the transition from 2D procedural modeling to 3D space in CityEngine. You will learn the syntax of the extrude command, how to handle extrusions on sloped surfaces using world coordinates, and how to ensure building rooftops remain perfectly level regardless of terrain inclination. Recommended Audience: Beginners in CGA modeling and GIS professionals looking to generate basic building masses from footprint data. We are finally moving from planes to 3D volumes. While the transition to 3D might seem like the most critical topic to cover, it is actually one of the simplest commands in CGA, with almost no complex parameters to manage. The syntax is as follows: Syntax extrude (distance) extrude (extrusionType, distance) Reference: CityEngine ...

[031] How to Create Nested Split Structures in Esri CityEngine

Image
Learn how to establish complex architectural hierarchies by nesting various split types. This tutorial covers the practical application of CityEngine's split command, specifically focusing on combining fixed, relative, and approximate splits. We explore how to visualize model hierarchies before coding and how to nest repeated splits to create structured facades that remain responsive to geometric changes. Continuing from the previous lesson, we will explore various split patterns to become more familiar with how they work in practice. Since we have not yet covered indexing concepts in depth, we will focus on simple splits. I will discuss split.index along with case-else statements once we finish the comp command section. The method or sequence of splitting can vary depending on personal preference, so please use the code I provide as a reference rather than an absolute rule. img 1 : Example of Complex Fac...