To access the tutorials in CityEngine, click Help > Download Tutorials and Examples. After choosing a tutorial or example, the project is automatically downloaded and added to your workspace.
Use polygonal modeling and rules
Suppose you want to give all windows of this house a 3D frame.
Currently, it’s just a flat texture. You could drag the frame out for every window, but this can be tedious. Also, the window texture does not adapt well when scaled. You may get some cuts in the windows.
To conveniently place 3D windows, use a rule on the building.
- First, create a 3D window. Use the rectangle tool and drag it up.
- Select the front face with the selection tool and assign the window texture with the texturing tool.
- Draw a few rectangles over the window frame with the rectangle tool. Drag them to create a 3D structure. Optionally, experiment with different structures.
- Select the model, and choose File > Export models..
- Choose Wavefront OBJ and set the name to window.
- Click Finish.
- Select the house, and right-click Assign Rule File.
- Select rule.cga from the tutorial folder, and click generate.
- Bring up the Inspector window and select the house.
- Type values in the window parameters.
All the windows update automatically.
This rule replaces all polygons with window textures with the 3D window. You can look at it and use it for your projects.