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.

Create footprint and extrude

Complete the following steps to create a footprint and extrude:

  1. Double-click the 14B_Advanced_01.cej scene in the Navigator window.
  2. Click the Polygonal Shape Creation tool Polygonal shape creation tool or press S, and click to set the first point.

    First point using the polygonal shape creation tool

    Note:

    While moving the line, the Polygonal Shape Creation tool options window Tool options displays the length of the line. Also, you can set snapping, arc, and planar options in the tool options window.

    Tool options edge length

  3. To set the length of the line to 11, press the Tab key, type the length in the Edge Length text box, and press Enter.

    Set length to 11 meters.

    The line turns magenta to indicate its a fixed length.

  4. Move the fixed segment to snap to the global axes.

    Second point using the polygonal shape creation tool

  5. Click to set the second point.
  6. For the third point, type 9 and press Enter.

    Third point using the polygonal shape creation tool

    To remove the fixed length, press Esc.

    For the next few points, you won't set fixed lengths.

  7. Snap to the 90 degrees highlights and create custom lengths.

    Snap to 90 degree lines

  8. To set the last point, click the first point, double-click, or press Enter to finish the shape.

    Final point at the intersection of two snapping lines

    You can now fine-tune the lines.

  9. Click the Transform Move tool Move tool or press W, and select the edge to transform.
    Adjustment handle on the polygon
  10. Drag the blue handle to the location you want for the edge.
    Note:

    Each arrow moves the edge in a different direction.

Use extrusions

Now you can create a 3D shape.

  1. Click the Push Pull tool Push Pull Tool or press P and hover over the polygon.

    Hover to extrude the shape

  2. Drag the orange handle and release to finish the 3D shape.

    Drag the orange handle up and release to finish the 3D shape

  3. Hover over the front edge until you see the highlight for the midpoint snapping.

    A cross indicates the midpoint snap

  4. Click to start the segment, and when it snaps perpendicularly to the edge, click to finish.

    Snap on opposite edge of a parallel snap

    You can now use the edge handle to drag the edge to create a slanted roof.

  5. Hover over the edge and drag the orange handle.

    Handles for the roof for two directions use green to finish the roof

    A reference scene of this can be found in 14_B_Advanced_02.cej.

  6. Drag the green arrow on the back edge to make the roof flatter.

    Drag on the edge to adjust for a flatter roof

    Different colored arrows allow you to extrude the shape in different directions. You can switch between the directions by hovering over the arrow while dragging the edge.

  7. Modify the 3D shape. Hover over the side polygon, and drag the green handle.

    Green arrow drags parallel to the ground plane and creates a new top polygon

    The colored arrows have different behavior. The green drags parallel to the ground plane and creates a new top polygon.

    Blue arrow drags along existing edges without creating a new polygon

    The blue arrow drags along existing edges without creating a new polygon. Both types can be useful depending on the shape you want to create.

  8. Click the Polygonal Shape Creation tool Polygonal shape creation tool or press S, or click the Rectangular Shape Creation tools Rectangle tool or press Shift+S to draw a balcony to be extruded. Create a balcony by drawing a rectangle.

    Create balconies with the rectangle tool

  9. Hover over the new polygon and drag the handle.

    Drag the handle in and out to snap to a point

  10. Click the Polygonal Shape Creation tool Polygonal shape creation tool or press S to create a polygon to extrude the wall.
  11. Now drag out the new polygon.

    Create and drag out a new polygon

  12. To inset the balcony, create two segments snapping to the side walls.

    Snapping lines to create the new balcony

  13. Drag the handle of the balcony floor down.

    Drag the balcony floor down to finish

    The balcony is now finished.

  14. Rotate the camera to the back.
  15. To create another balcony, click the Rectangular Shape Creation tool Rectangle tool or press Shift+S and create a rectangle on the wall.

    Create a balcony on the back wall

  16. Drag the balcony out and draw a rectangle on the top.

    Create a rectangle on top of the new balcony

  17. Drag the floor down.

    Drag the floor down

    A reference scene of this can be found in 14_B_Advanced_03.cej.

    Tip:

    Use guides for increased precision when dragging edges and faces.

Make an overhanging roof

The basic shape is now ready for you to create an overhanging roof.

  1. Drag the green arrow up to separate the roof from the building.

    Modify the roof by editing with the Ctrl key.

    Press the Ctrl key to insert edges along the initial positions. For now, make the roof thick for easier editing, and you can make it thinner later.

  2. 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

    A reference scene of this can be found in 14_B_Advanced_04.cej.

  3. Drag the sides to make it overhang.

    Overhang created by dragging out the sides

  4. Drag the second face until it snaps to the other face.

    Drag a second face until it snaps

  5. Do the same for the other side of the roof until it looks like this:

    Drag the other side of the roof

  6. Drag additional faces but stop before they snap to the overhang faces.

    Stop dragging the additional faces before they snap to the overhang.

  7. Drag the last face until it snaps to the previous face.

    Continue to drag a third and fourth face to shape the building.

  8. Rotate the camera to view the side.
  9. Drag the side roof face down with the blue arrow.

    Green and blue arrows indicate the direction. Use blue in this instance.

  10. Repeat on the other side.

    Repeat on opposite side using the blue arrow.

  11. Finally, go to the back, and drag out both roof faces.

    Adjust both faces by dragging out.

    A reference scene of this can be found in 14_B_Advanced_05.cej.

  12. When you rotate to the front again, note that a few extra, unnecessary lines are now on the roof. To clean this, click the Select tool Select tool to select the whole building.
  13. Click the Cleanup shapes tool Cleanup shapes.

    Use the cleanup shape tool to remove unnecessary lines on the roof.

  14. Keep the defaults as they are and click Finish.

    Cleanup Shape dialog box

    Most of the lines are now gone. You may have to use this tool twice to remove all lines.

    A reference scene of this can be found in 14_B_Advanced_06.cej.

Modify roofs, windows, and doors

Complete the following steps to modify roofs, windows, and doors:

  1. Make the roof thinner. To move multiple polygons at once, use the standard selection and the transform tools.
  2. Select the first polygon with the Select tool Select tool. Press Ctrl and click the second polygon.
  3. Click the Transform Move tool Move tool or press W, and drag along the green arrow.

    Standard selection and the transform tools are used to make the roof thinner

  4. Fine-tune the building by dragging planes using the Push Pull tool Push Pull Tool or press P.

    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.

  5. Start decorating the building. Draw two rectangles for the windows.

    Create windows using the rectangle tool.

  6. Click the Push Pull tool Push Pull Tool or press P to drag rectangles inward.

    Use the arrows to drag in or out

  7. Now create two doors. Rotate and zoom the camera to get a clear view.

    Create the first door on the bottom level.

    Create the second door on the balcony.

  8. Rotate the building, create a back window, and drag the window frame.

    Rotate the building and create more windows.

  9. Rotate and drag out the roof along the green arrow. This creates an open garage.

    Create the garage roof.

  10. To create columns, first rotate down. Draw two rectangles, and drag them down to the ground.

    Create the support columns for the roof of the open garage.

    A reference scene of this can be found in 14_B_Advanced_08.cej.

Add textures

Complete the following steps to add textures.

  1. Click the Select tool Select tool to select the whole house.
  2. Click the Texture shapes tool Texture shapes.
  3. Click Browse, select wall_white.png in the \assets folder of the tutorial.

    Shape Texture Tool dialog boxes

  4. To get a uniform look, click Mode > Dimensions.

    The numbers indicate how large the texture is in meters.

  5. Type 10 for both values and click Assign.

    Mode set to Dimensions for uniform texture

  6. Texture the roof now. Select all roof polygons with the Select tool Select tool. Press Ctrl while clicking the other polygons to select all of them.
  7. Pick the roof texture in the Texture shapes tool Texture shapes dialog box and click Assign.

    Roof polygons selected to pick the roof texture

    Now texture the doors and windows.

  8. Click the Select tool Select tool to select the two windows.
  9. In the Texture shapes tool Texture shapes, select the window.png file.
  10. Set the mode to Stretch to polygon and click Assign.

    Window texture set to Stretch to polygon

  11. Select the two doors, choose the door.png texture file, and click Assign.

    Select both doors and pick the texture.

  12. Rotate to the back, select the windows, choose the window.png texture file, and click Assign.

    It is now stretched even more.

  13. Type 4 for Horizontal repetitions and click Assign again.

    Horizontal repetitions set to 4 to minimize stretch

  14. 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.

  15. 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

  16. Select all the faces of the chimney.
  17. Select the wall_concrete_6.png texture file, set the Dimensions option to 10, and click Assign.

    Add concrete texture, with a dimension of 10, to the chimney.

  18. Next, add a dormer. Draw a rectangle, and drag it up.
  19. Drag the back edge down until it snaps.

    Create a dormer on the roof with the rectangle tool.

  20. Texture the sides.
  21. Draw a window on the front as you did above.

    Create a window on the front of the dormer.

    The house is now finished. You can still fine-tune the parts such as making the chimney smaller.

    The 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.

    Tip:
    Use the shaded mode (click View settings > Shaded) when editing textured shapes to better see the drawing highlights.