Learn how to work with typcial urban centers and develop a schematic design for this area that meets the city’s zoning regulations. Tutorial PDF. Set up a new project. Create a new project and scene. First, you’ll create a new CityEngine project. Steps: 1. Click File > New > CityEngine.
The result of this section will look like the following tugorial Start Rule—Defines the first rule that is executed within the rule file. In this case, the start rule is Lot. Building attributes are typically defined at the beginning of the rule file although they can be put anywhere in the rule file. The window asset used for the creation of the simple building is defined here.
Tutorkal actual asset is loaded from the project’s assets folder in the Navigator.
The actual creation of the building starts now. The first rule is called Lot. Remember the assigned start rule in the Inspector.
The mass model is created with the extrude operation as follows:. Typically in this step, a mass model can be divided into its facades by applying the component split.
This rule splits the shape named Building, the mass model, into its faces by applying a component split. This results in a front shape usually the main front facade with entranceseveral side shapes as facades, and a roof shape.
The facades can now be modeled. The typical facade modeling cityenine is as follows: First, the facade can be decomposed into floors.
Next, the floors are further broken down into elements called tiles floor subdivisions. A tile typically consists of wall and window elements. This subdivision scheme can be implemented in the CGA shape grammar as follows: Fsri appearance of the ground floor is often different from the other floors, especially for front facades. They differ not only due to the existence of an entrance, but often also due to different sized floor heights, window appearance, color, and so on.
The SideFacade rule splits the side facades into floor shapes. The subdivision split is performed in the same way to assure that the floor heights are in sync with the front facade. The Floor rule is a typical example of the subdivision of a floor into tiles of an approximate width of 3. To make the floor design slightly more interesting, you’ll split a wall element of width 1 on each side. The Groundfloor rule refines the groundfloor shape with a similar subdivision split, with the difference that an entrance is placed on the right.
The following figures depict tutoriwl extruded mass model first and the described decomposition into floors and tiles below. After the initial facade structure has been defined, the tiles can be modeled.
The Tile rule defines the appearance of the tile by splitting along x- and y-axis with a nested split. In this design, the wall elements are floating with tildeand the window has a fixed size tutoroal 2 in width and 1. The EntranceTile rule defines the entrance shape in a similar way as the tile shape but, obviously, with no wall on the bottom. The final rules replace the ewri of the window, door, cigyengine wall shapes with the corresponding assets, positions them, and sets the texture.
The current shape is translated This way, the windows and textures are set back 0. Next, the insert operation i objectname inserts an asset into the current scope.
Cityengime the dimensions are not set the same as the Window or Door rule, the sizes are adapted automatically—otherwise the given dimensions are used. Using the operation s x,y,zthe size of the scope can be set in the Wall rule.
The width and height of the scope are not affected since relative coordinates are used: The z dimension is set to Putting all of these rules together, you get the final untextured simple building: In the next section, you’ll learn how to add textures to the simple building. In this section, you’ll learn how to apply textures to window and wall elements of the simple building. As with the assets, you’ll define the textures tutoria, use at the top of the rule file.
The textures are loaded from the assets folder. In this section, you’ll add a simple level of detail Cihyengine mechanism to your simple building. You’ll reduce the complexity polygon count of the model, which is helpful when creating larger areas of simple buildings. Add a new attribute LOD to the existing attributes in the.
In this example, you’ll define the following two levels of detail:. The simple building you already modeled will be your high resolution model. You’ll now create a low resolution version in a few steps. Examining your current model, you’ll see that you can save polygons mainly on the window assets. You’ll use textured planes instead of the complex window asset. This section tutoria how to add variation to generated buildings by defining random attributes.
Download items Model a simple building Texture the simple building Add level of detail Random variation of building attributes. Two important parameters are found here: This rule file is executed when the generation is triggered.
Rather than listing all nine texture names as single assets, the function in step 2 returns one of the nine window textures in the asset folder. The setupProjection command prepares the UV coordinate projections on the facades for color channel 0 and dirt map channel 2projected onto the scope’s xy plane; therefore, scope. The brick texture channel 0 will be repeated every 1.
Esro Roof rule prepares the UV coordinates to cover the entire roof face, sets the roof texture, and applies the texture coordinates to the geometry. For window and door elements, you only set the colormap to the desired texture.
Introduction to the CityEngine tutorials
For the window, use the getWindowTex function with a random index to get one of the nine window textures. The following image shows the final building model: A close-up view of the same model: The following image shows the rule set applied to arbitrary mass models: You added a condition to the Window rule: If the LOD value is greater than 0 your high-resuse the old, high-res window asset.
Otherwise LOD equals zerodo not load the window asset, but use a tuttorial plane coming from the facade instead. The source field changes from Rules to Value. This means that on the next generation of the building, the LOD value in the rule file will be set by the value 0 in the Inspector.
In the next section, you’ll add random variation to your simple buildings.
Privacy & Cookies Policy
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.