Posts

Showing posts with the label Procedural Modeling

[070] How to Split Procedural Windows and Facades in CityEngine

Image
Continuing from the last session, we will keep splitting facade 0. Below is an image to use as a reference for the measurements. figure 1 Among the code we wrote last time, the part corresponding to the ground floor is as follows. Front_f_Ground_f_wall --> split(x){~1 : X. | 13 : Front_f_Ground_f_wall_door | ~1 : X.} # ↑ The section where the door is located Now we will subdivide Front_f_Ground_f_wall_door. It looks like it is arranged as 'two windows - door - two windows'. Then let's split it up. Front_f_Ground_f_wall_door --> split(x){~4.5 : color(0,0,1) FFGWD_window | ~5 : FFGWD_door | ~4.5 : color(0,0,1) FFGWD_window} #In case the window sizes might change, I split everything using approximate values. figure 4 The blue area where the windows are located is where two windows go, so we split it once more. FFGWD_window --> split(x){'0.5 : FFGWD_window_final | '0.5 : FFGW...

[069] How to Split Facades and Floors for Procedural Buildings

Image
Unlike when I build it myself, explaining the work process step by step is going to take up quite a lot of space. Writing up many steps at once takes a long time, so I'll organize and post just a couple of steps at a time. 7. Set up sections for each facade. As I mentioned way back in an earlier lesson, you have to start with the big chunks and split them down into smaller and smaller pieces. In my case I did the horizontal split first and then the vertical split, but it doesn't matter if you do the vertical split first and then the horizontal split. Just code it accordingly. Set up sections for each facade. figure 1 8. Using the section lines as a guide, identify the parts where each dimension needs to be measured. The figure below shows measurements of the front (facades 0 and 4), but there's no need to measure in too much detail. That's because any part that needs adjusting can be declared with attr and chan...

[068] How to Model a 3D Building from a DAE File in CityEngine

Image
Before I knew it, May was over. From today, we'll practice CGA coding by looking at a simple sample. I was going to take photos of a suitable building and use those, but it wasn't easy to photograph the facades from every direction. So I looked for a suitable file on https://3dwarehouse.sketchup.com/ , and found something like the one below. It's at a level you can fully handle with what you've learned so far. The Building Used as a Sample https://3dwarehouse.sketchup.com/model/122d4d27-1953-4c74-b312-8253ceb53831/Build 3D Warehouse | 3D Warehouse is a website of searchable, pre-made 3D models that works seamlessly with SketchUp. | 3dwarehouse.sketchup.com Build.zip The file above is a DAE file, so just extract the compressed file and put the contents in your project's assets folder. A DAE file can also be imported directly into CityEngine, which has the advantage that you can build the model while measuring it y...

[065] How to Insert External 3D Objects in CityEngine

Image
Understanding importing and scaling external 3D assets in Esri CityEngine using the CGA i() insert command. This tutorial covers the fundamental syntax and behavior of the CGA i() command in CityEngine, explaining how imported 3D models adapt to point, line, face, and volume scope dimensions across procedural modeling workflows. I am posting this briefly as I have a bit of time during my schedule. I planned to work on CGA coding while looking at building photos, but I realized I missed one critical command. The elements that make up a building—walls, windows, doors, window frames, fences, surrounding ornaments, water tanks, air conditioner outdoor units, signboards, landscape trees, and so on—are far too numerous to list. Implementing all of these directly in CGA??? While not impossible, there is certainly no need to do so. We must use an effective method. Among the various elements of a building, if a component is al...

[064] How to Transform UV Coordinates in CityEngine CGA

Image
Understanding UV transformations in Esri CityEngine to rotate, scale, translate, tile, and delete texture mapping coordinates using CGA rules. This tutorial covers essential UV manipulation commands in CityEngine CGA, including rotateUV, scaleUV, translateUV, normalizeUV, tileUV, and deleteUV, enabling precise texture placement and alignment on 3D procedural geometries. This is the final lesson on texture control. Today, we will learn about commands to control texture rotation, scale, position, and more after applying textures using projectUV() . You might wonder why separate commands exist when size or position can be configured in setupProjection() . However, strictly speaking, the commands used here are not applied directly to the texture itself, but rather to the UV coordinates of the texture. They transform the UV coordinates assigned to the texture. When we generally perform modeling in 3D programs, the ...

[060] CityEngine CGA color() Command Exercises for split.index and Conditional Rules

Image
Understand procedural color mapping in Esri CityEngine using practical CGA exercises to control dynamic gradients and complex shape divisions. This tutorial provides hands-on practice for the CityEngine color() command. You will learn how to write rule scripts to generate progressive color transitions on repeating splits and analyze existing logic arrays to trace complex coordinate color distributions. Today, we will practice several exercises using the color() command. Let's do two exercises: one where we write code by looking at an image, and another where we predict the result by looking at a piece of code. What You Practiced Using color() with RGB values Working with split.index Building procedural color gradients Tracing nested split logic Using conditional branches in CGA Exercise 1: Create a Procedural Color Gradient First, look at the image below and try coding it yourself. ...

[058-059] Applying Colors and Shape Attributes in CityEngine CGA

Image
Learn the color() and set() commands in Esri CityEngine to apply materials and control dynamic shape attributes programmatically. This comprehensive CGA scripting tutorial covers the dual approaches to rendering materials in Esri CityEngine. You will learn how to apply simple colors using hexadecimal values and RGB arrays, modify shape properties dynamically with the set() command, and implement the @Hidden annotation to keep programmatically overridden attributes from causing interface conflicts in the Inspector UI. So far, we have covered the most basic commands that define shape geometries: comp, split, extrude, and scope. Applying Colors in CityEngine CGA Starting today, we will look at commands for applying materials to shapes. First, we will examine the color command, which applies a simple color to a shape. Below is the reference for the color command. figure 1 : CGA color Command Reference ( https...