Posts

Showing posts with the label GIS Tutorial

[045] Understanding the translate() Command in CityEngine CGA

Image
Precisely control asset positioning by understanding absolute and relative movement across different coordinate systems. This tutorial explains the 4-parameter translate() command in CGA. We explore how "abs" and "rel" modes interact with World, Pivot, and Scope coordinate systems, accompanied by video demonstrations to visualize how 3D assets shift within the procedural environment. Syntax and Parameters of translate() Let's look at the reference. img 1 : CGA Translate Documentation Reference It uses a total of four parameters. mode determines whether to use absolute (abs) or relative (rel) coordinates. coordSystem determines the coordinate system (one of scope, object, world, or pivot coordinate systems). x, y, z define movement along the selected coordinate system. In rel mode, they represent movement distances. In abs mode, they represent positions relative to the ...

[036] CityEngine comp(): Selecting Sloped Faces with Horizontal, Vertical, Aslant, and Nutant

Image
Learn to target specific building surfaces based on their angle and orientation using sloped-based comp selectors. This tutorial explains how to use the horizontal, aslant, vertical, and nutant selectors in the comp() command. It provides a deep dive into how CityEngine classifies faces based on their normal angles relative to the local coordinate system and explains selector precedence when multiple selectors coexist within a single comp() rule. First, take a look at the example below. img 1 : Sphere model used for selector testing The following code demonstrates how to apply these selectors to the sphere shown above. CGA Code Example and Visual Results Lot1 --> primitiveSphere(10, 10, 10) Horizontal Lot2 --> primitiveSphere(10, 10, 10) Aslant Lot3 --> primitiveSphere(10, 10, 10) Vertical Lot4 --> primitiveSphere(10, 10, 10) Nutant Horizontal --> comp(f){horizontal : color(1,0,0) X.} Aslant --> comp...

[033] How to Use the Comp Command in Esri CityEngine for Component-Based Modeling

Image
Learn how to decompose 3D volumes into editable sub-elements using the component split. This tutorial introduces the 'comp' command, explaining the fundamental differences between it and the 'split' command. You will learn how to isolate vertices, edges, and faces from a 3D model, understand the difference between shared and independent edges, and use operators to control model hierarchy and indexing for targeted rule applications. When I first started this blog, I thought it would be enough to simply explain a few commands, organize the important details, and finish after writing about 50 posts. Even though I have covered less than 10% of what I originally planned, this series has already reached its 33rd post. Not long ago, I saw the music video for "Standing Next to You" and started playing the drums again, which I had forgotten about for a while. I had taken a break because my right knee would...

[029] How to Perform Vertical and Horizontal Splits in CityEngine

Image
How First Edge Defines the X-Axis Direction Counter-Clockwise Polygon Construction Behavior Transition from horizontal floor divisions to vertical facade splits by manipulating coordinate axes with alignScopeToGeometry. In CityEngine, procedural modeling relies heavily on understanding the local coordinate system of each shape. This tutorial explains how to use the split command for vertical divisions and introduces the alignScopeToGeometry(zUp) function. By reorienting the Z-axis to the Y-axis, you can apply architectural logic using the more intuitive X and Y plane, making it much easier to code complex building facades, floors, and repeating window patterns. Default Axis Orientation and Split Direction in CityEngine The splits we have learned so far were mainly focused on horizontal divisions. Today, we will cover vertical splits. Regarding the content mentioned in the previous session, I hope you haven...

[028] How to Select Specific Segments Using split.index in CityEngine

Image
Learn how to use the split.index function to identify and control specific segments within a procedural split operation for precise architectural logic. This tutorial covers the sequential nature of CGA split operations and demonstrates how to target specific segments using zero-based indexing, allowing for more dynamic and efficient rule writing compared to manual segment definition. What is split.index in CityEngine CGA? split.index is a value used to identify the position of each segment generated during a split operation. Sequential Indexing in Procedural Splits In our previous sessions, we explored the three types of split(~, *, ') operations. Today, I intended to cover splitting by rows and columns, but I felt it would be better to pause and discuss the index at this point. Although we haven't officially learned about axis or scope yet, the split operation works by dividing an area one by one alo...

[027] Understanding Absolute Ratio Split (') in Esri CityEngine CGA

Image
Learn to utilize the absolute ratio symbol (') in CGA split operations to divide shapes based on a normalized total length of 1. This tutorial explains how the absolute ratio (') symbol works in Esri CityEngine CGA. Unlike relative split (~), it normalizes the split direction to a total value of 1, enabling consistent proportional subdivision regardless of actual geometry size. We explore its technical application in high-rise building facades and analyze how reference points shift in nested split operations. What Is the Absolute Ratio Symbol (') in CityEngine CGA? The importance of the split operation in CGA cannot be overstated. It is important to learn various ways of using split while analyzing rules written by others. Until yesterday, we covered the relative split symbol '~', which divides internal regions relatively. Today, we'll explore how to split shapes using absolute ratios, where th...