Search Results for

    Show / Hide Table of Contents

    My First Roof

    This tutorial explains how to set up components for procedurally generating a roof. To avoid duplicating steps from the previous tutorial My First Wall, this tutorial omits details about geometry setup.

    For the completed tutorial, refer to the scene My First Roof in Samples.


    Geometry Setup

    First, set up the geometry by constructing roof-like lines.

    Next, add planes.

    Important

    Ensure that plane gizmos are rendering correctly so you can verify the planes are facing the right direction. To invert a plane's direction, select the Cozy Plane and use the Invert button in the Cozy Toolbar.


    Tiles

    Now we move to the exciting part—generating tiles from the planes.

    1. Create a new GameObject with the Cozy Grid component and make it a child of your Plane GameObject.
    2. Add the following components:
      • Cozy Grid
      • Cozy Double Lap Tiling
      • Cozy Draw
    3. For the Cozy Draw component:
      • Enable Global Rotation.
      • Set Cell Size to 0.2, 0.16, 0.2.

    Once set up, duplicate this tile GameObject for all four planes.


    Corners

    Tile intersections at corners often do not look clean. To fix this, you can create specialized tiling for corners.

    1. Select the Cozy Spline for the corner.
    2. Create a new GameObject with the Cozy Segments component and make it a child of the Spline GameObject.
    3. Add the Cozy Draw component to the new GameObject.
    4. Select the prefab from Models/Roof/Tile Corner and set Cell Size to 0.2, 0.77, 0.7.
    In This Article
    Back to top Copyright © ProjectDawn.
    Generated by DocFX