Tutorial 14b: Advanced polygonal modeling

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.

Part 1: Polygonal Modeling

  1. Open the initial scene by double clicking on 14B_Advanced_01.cej in the Navigator.
  2. Select the polygonal shape creation tool, and click to set the first point.
  3. Note:

    While moving, the line length is shown in the text box on the top.

    First point using the polygonal shape creation tool
  4. To force the line to a specific length, you can start typing. Type 11 and press enter.
  5. The color changes to magenta, and the line length is fixed at 11.
  6. Move to a snapping line and click to set the second point.
    Second point using the polygonal shape creation tool
  7. For the third point, type 9 and press enter. If you want to cancel the fixed length, press esc, and the line length is flexible again.
    Third point using the polygonal shape creation tool
  8. For the next few points, we do not use text entry, just snap to 90 degree lines and click on approximate lengths.
    Snap to 90 degree lines
  9. For the last point, find the intersection of two snapping lines, and click.
    Final point at the intersection of two snapping lines
  10. Finish the shape with a click on the first point.
  11. You can now perform some fine tuning on the lines. Click the Move Tool button Move tool and select the edge you want to transform.
    Adjustment handle on the polygon
  12. Click and hold the mouse over one handle. Move the mouse to transform the edge.
    Arrow colors determine direction of movement for shape
  13. Drag the mouse over the arrows to change directions. When you are satisfied with the result, release the mouse.
  14. Note:

    Note that there are different arrows to move the edge in different directions.

  15. Do the same for another line. When the 2d shape is to your liking, you can finally create a 3d shape.
    Adjustment on a different part of the polygon
  16. For this, hover the mouse over the polygon.
  17. Now Drag the orange handle. Release to finish the 3d shape.
    Drag the orange handle up and release to finish the 3d shape
  18. A reference scene of this can be found in 14_B_Advanced_02.cej.
  19. Let’s now create a slanted roof. Move over the line until a cross appears. This is the midpoint snap.
    Cross indicates the midpoint snap
  20. Click and move the mouse until you see the symbol for a parallel snap.
  21. Move to the other side until you snap to the edge, and click.
    Snap on opposite edge of a parallel snap
  22. You can now use the edge handle to drag a roof. Again, you have two directions, now use the green one. Release the mouse to finish the roof.
    Handles for the roof for two directions use green to finish the roof
  23. Now drag the back edge, to make the roof flatter. You can keep dragging the edges until you are satisfied with the result.Drag on the edge to adjust for a flatter roof
  24. Let’s now modify the 3d shape a little bit. Move the mouse over a polygon, and drag the handle.
  25. Note the different behavior of the arrows. The green drags parallel to the ground plane and creates a new top polygon.
    Green arrow drags parallel to the ground plane and creates a new top polygon
    The blue arrow however, drags along existing edges, marked in blue, without creating a new polygon. Both types can be very useful depending on the shape you want to create.
    Blue arrow drags along existing edges without creating a new polygon
  26. Let's now create balconies. Select the rectangle tool. Click when snapped to this line.
  27. Move and snap to the opposite line, and click again.
    Create balconies with the rectangle tool
  28. Now, hover over the new polygon and drag the handle.
  29. You can drag it in and out. Orange lines appear when you snap to a point.
  30. Move it out a bit and release the mouse.
    Drag the handle in and out to snap to a point
  31. Select the polygonal tool again. Snap to the back balcony line, click, then move until you see the parallel sign, snap to the top edge, and click again.
  32. Now drag out the new polygon.
    Create and drag out a new polygon
  33. To inset the balcony, create two lines with snapping. Draw two lines with snapping.
    Snapping lines to create the new balcony
  34. Then, grab the handle and drag the balcony floor down.
  35. The balcony is now finished.
    Drag the balcony floor down to finish
  36. Draw another balcony.
  37. Rotate the camera to the back.
  38. Select the rectangle tool, click to start on the wall, click again to finish.
    Create a balcony on the back wall
  39. Drag the balcony out, then create a rectangle on the top.
    Create a rectangle on top of the new balcony
  40. Drag the floor down.
  41. A reference scene of this can be found in 14_B_Advanced_03.cej.
    Drag the floor down
  42. The basic shape is now ready, let’s create a nicer roof.
  43. Rotate to the front, drag a roof polygon, and observe the different directions a bit.
  44. We want the green up direction. We also want to separate the roof from the building.
  45. To achieve this, press the control key.
  46. Note that this inserts edges along the initial positions. Make the roof thick for easier editing; we make it thin again later.
    Modify the roof by editing using the Control key
  47. Do the same for the other polygon. When dragging, snap to the first polygon.
    Modify the other roof polygon and snap to the first polygon
  48. A reference scene of this can be found in 14_B_Advanced_04.cej.
  49. Drag the sides to make it overhang. Start on the right to drag it out.
    Overhang created by dragging out the sides
  50. Drag the second face until it snaps.
    Drag a second face until it snaps
  51. Drag out the third face.
  52. Drag the fourth, but not so far. Snap the last face to the fourth.
    Continue to drag a third and fourth face to shape the building
  53. Rotate the camera to get a nice view on the side.
  54. Drag the face down.
  55. Note the difference between the green and blue arrow. Use blue for now.
    Green and blue arrows indicate the direction, use blue in this instance
  56. Repeat it on the other side.
    Repeat on opposite side using the blue arrow
  57. Finally, go to the back, and drag out both faces.
    Adjust both faces by dragging out
  58. A reference scene of this can be found in 14_B_Advanced_05.cej.
  59. When you rotate to the front again, note that a few extra, unnecessary lines are now on the roof. To clean this, first use the selection tool to select the whole building.
  60. Now click the cleanup shape tool.
    Use the cleanup shape tool to remove unnecessary lines on the roof
  61. Select default from the presets and click finish.
  62. Most of the lines are now gone. You may have to use this tool twice to remove all lines.
    Cleanup Shape dialog box
    A reference scene of this can be found in 14_B_Advanced_06.cej.
  63. Make the roof thinner: To move multiple polygons at once, use the standard selection and the transform tools.
  64. Select the first polygon by double clicking. Now hold control, and click on the second polygon.
  65. Click on the move tool, and drag along the green arrow.
    Standard selection and the transform tools are used to make the roof thinner
  66. You can now fine-tune the building by dragging planes using the polygonal tool. It’s best to use the blue arrows, so the walls stay along the roof.
    Fine-tune the building by dragging planes using the arrows of the polygonal tool
    Fine-tune the building by dragging planes using the blue arrow to keep the roof attached
    A reference scene of this can be found in 14_B_Advanced_07.cej.
  67. Let us start decorating the building. Select the rectangle tool, and create two windows.
    Create windows using the rectangle tool
  68. Drag them inwards.
    Use the arrows to drag in or out
  69. Now create two doors. Rotate and zoom the camera a bit to get a clear view.
    Create the first door on the bottom level
    Create the second door on the balcony
  70. Rotate the building and create more windows.
  71. Note you can still drag the window frames.
    Rotate the building and create more windows
  72. Finally, rotate and drag out the roof along the green arrow. This creates an open garage.
    Create the garage roof
  73. To create columns, first rotate down. Draw two rectangles, and drag them out to the ground.
    Create the support columns for the roof of the open garage
  74. A reference scene of this can be found in 14_B_Advanced_08.cej.

Part 2: Texturing

Let us add some textures.

  1. First select the whole house.
  2. Click the texture tool.
  3. Click browse, select wall_white and open.
  4. You can find it in the assets folder of the tutorial.
    Shape Texture Tool dialog boxes
  5. To get a uniform look, select Mode > Dimensions.
  6. The numbers indicate how large the texture is in meters.
  7. Enter 10 for both values and click Assign.
    Mode set to Dimensions for uniform texture
  8. Texture the roof now. Select all roof polygons with the selection tool, a double click for the first and then clicks with control.
  9. Pick the roof in the texture tool, and click Assign.
    Roof polygons selected to pick the roof texture
  10. Let’s now do doors and windows. Select two windows.
  11. In the Texture tool, pick the window texture.
  12. Set the mode to Stretch to polygon and assign.
    Window texture set to Stretch to polygon
  13. Then Select the two doors, pick the door texture and assign.
    Select both doors then pick the texture
  14. Rotate to the back, select the windows, pick the window texture and assign.
  15. It is now very stretched.
  16. Therefore, enter 4 at Horizontal repetitions and Assign again.
    For window texture adjustments set to 4 at Horizontal repetitions to minimize stretch
  17. To add a chimney, draw a rectangle on the roof. Drag it up along the green arrow.
    Add a chimney by drawing a rectangle on the roof and drag up with the green arrow
  18. Now drag the back edge down along the green arrow until it snaps to the front edge.
    Chimney completed by dragging the back edge along the green arrow and snap to front edge
  19. Select all faces, and assign textures with the texturing tool.
  20. Browse for the concrete texture, use dimensions with 10.
  21. Fine tune the chimney.
    Add concrete texture, with a dimension of 10, to the chimney
  22. Next, add a dormer. Draw a rectangle, and drag it up.
  23. Drag the back edge down until it snaps.
    Create a dormer on the roof with the rectangle tool
  24. Texture the sides.
  25. Draw a window on the front, as already learned.
    Create a window on the front of the dormer
  26. The house is now finished. You can still fine-tune the parts, for example to make the chimney smaller.
    Completed house can still be adjusted on the various parts, the chimney is being made smaller
    A reference scene of this can be found in 14_B_Advanced_09.cej.