[Gn] Procedural Roof Generator

by Frenkel Design in Modifier Setups



ROOF CREATION


01 GEOMETRY PREPARATION:
  • Make sure that the geometry is the most reduced version of itself. It should not include loose edges or vertices. Dissolve all inner edges that are not neccessary. The latter will happen automatically with version 1.4.
  • Make sure that faces that are quads or n-gons with more than 4 corners are planar.
  • Make sure that the normals of the geometry are facing outwards. In the Viewport-Overlay settings, which are accessible on the top edge of the viewport, you can activate "face orientation" to check the normals. By selecting wrong normals and pressing Alt+N -> Flip you can correct them.
  • The input mesh has to be angled. The generator looks for high- and lowpoints in your mesh to transform tiles accordingly. Having a perfectly flat input geometry is like dividing through zero. It will confuse the generator. Keep in mind that you have to rotate in Edit-Mode.
  • Make sure that you apply all transformations by going to Object->Apply->All Transformations. If you want to edit your roof shape, do so in the Edit Mode. This will not mess up the global scale and orientation of the object.


02 IMPORT:

Import the contents that you need into your own scene by going to File->Append -> Collections and choose the "ROOF TYPES" and "TF_GN_ASSETS" collections. These should include all materials, node groups and sub-objects. You can work with your own prepared roof mesh or just use one of the imported roofs as an already set up foundation.

03 MODIFIER:

Apply a geometry node modifier with one the following profiles to your mesh (if it isn't applied already). Different profiles will result in different roofs styles. 

 

Below that you now have some options that are specific to this object and not the profile in general:


  • SCALE_TILES
    This value will scale your tiles. Be very careful when using this. A high number will have a huge impact on your performance. It is suggested to stay between ".5" and "1.5"

  • STYLIZE_FACTOR
    this will blend between a grounded and a stylized shader. Ranges from 0-1.

  • ADJACENT WALL SETTINGS
    Adds a wall under the roof. Two modes change the extrusion style. The thickness slider works different for both styles.
  • SUPPORTS (BETA)
    Beta options! These settings add different supports to the roof. This is the technical foundation - better control over the look will follow

  • MATERIAL SETTINGS
    Change the materials for the roof (materials with custom UV attribute), the wall (box-mapping) and the supports (box-mapping) here.


04 APPLYING THE MODIFIER:

With the modifier active on your mesh you can always switch to edit mode to change your input mesh, tab out and see the generated result. To increase performance of the general scene you can also apply the modifier. This will result in a converted mesh. You won't be able to influence the look with parameters anymore. Instead you have access to every individual tile making post enhancements with soft selections possible. Just bend or twist individual roof parts for an imperfect look.


PROFILE CREATION
Profiles define the general style of the roof. I made the creation process of profiles pretty straight forward. But you should at least have a basic understanding of Geometry Nodes before you start going into this.

Instead of changing parameters on the individual object level, we now make changes to the modifier itself. Changes here will affect every object in the scene that has the modifier applied. This is why it is recommended to hide all of the roofs except for one that functions as a visual reference in order to increase the speed of updating between changes.


01 START:
  1. Duplicate one of the Roof Style Node Groups by clicking here and give it its own name:


  2. Open the geometry node editor. You can hover over a panel and press Shift+F3 to do so. If you are stacking multiple modifiers make sure that the geomety node modifier is selected and active. If you still can't see anything, press "HOME" to recenter your view in the node editor.

02 CHANGES:

You should see a node setup now. Every change you will have to make is on the two big node groups that are called RIDGES/SUPPORTS and ROOF_TILES. These are located in the center of the network. Again, be careful when playing with these parameters. Crazy values for some parameters here will definately be heavy on your performance and potentially crash your app in the worst case.



03 ROOF TILES PARAMETERS:

  • TILE_OBJECT
    Be careful here! You can import your own custom tile object here. Before you do so, have a look at the "TF_GN_ASSETS" collection in the default blender file of the generator. It contains the included tile objects and can serve as a reference on how to model them, since there are some specifics: The imported tile object needs to be faced Z-Up. Make sure to apply all transformations. Moreover the tile MUST NOT have any thickness. The Roof generator will extrude the tiles on its own. Unwrap the tile to create UVs. Those will be taken and worked with by the generator.


  • GRID_INTERSECTIONS
    Be careful here! The grid intersections define the spacing between your tile objects. The parameters have to be adjusted everytime you change the tile. The wider the tile (X), the smaller the number for GRID_INTERSECTIONS_X. The longer the tile (Y), the smaller the number for GRID_INTERSECTIONS_Y.

  • DIAGONAL_REPETITION
    Makes the tiles repeat diagonally. Self explanatory.

  • RANDOM_OFFSET_Z
    Random position offset for the tiles - upwards and downwards, not lateral.

  • RANDOM_OFFSET_Z_SEED
    Seed for the Z-offset.

  • FIRST_ROW_START_Z
    Offsets the first row.

  • TILES_THICKNESS
    Thickness of the tiles. Self explanatory.

  • TILES_ROTATION_AMOUNT
    Rotation amount that makes each tile row lay on top of the next one.

  • TILES_ROTATION_RANDOM
    Small values only! Random rotation of tiles that make the roof feel more natural.

  • TILES_ROTATION_RANDOM_SEED
    Seed for the random rotation.

  • TEXTURE_SCALE
    Dependent on your input tile object. This value has to be big for big tiles and small for smaller tiles 

  • TEXTURE_SCALE_SIDES
    This is hit or miss currently. It affects the texture scaling on the sides of the tiles.

  • RAYCAST_OVERLAP
    Be careful here! Never touch this except you encounter problems with your mesh like missing roof tiles or ugly boolean operations. Then slightly increase or decrease this number.



04 RIDGES/SUPPORTS PARAMETERS:

  • RIDGE_RADIUS
    Radius of the ridge tiles. Self explanatory.

  • RIDGE_RESAMPLE_LENGTH
    Length of the ridge tiles and how man fit on the roof.

  • RIDGE_THICKNESS
    Thickness of the ridge tiles. 
    Self explanatory.

  • RIDGE_ANGLE_CORRECTION_AMOUNT
    Rotation that makes ridge tiles overlap. May have to be adjusted when changing the parameters above.

  • RIDGE_Z_ADD
    Depending on your roof tiles, you may have to offset your ridge on the Z-Position. If your roof tiles are very flat, this value is usually 0.

  • RIDGE_ANGLE_TOLERANCE
    If ridges are generated on the wrong edges or don't appear on the right ones, play with this number.

  • FRONT_SUPPORT_HEIGHT (BETA)
    Height of the front supports. 

  • FRONT_SUPPORT_WIDTH (BETA)
    Width of the front supports.
     
  • FRONT_OVERSHOOT (BETA)
    Overshoots front supports.

  • FRONT_SUPPORT_OFFSET_Z (BETA)
    Elevation of the front supports.

  • SIDE_SUPPORT_WIDTH (BETA)
    Width of the side supports. 

  • SIDE_SUPPORT_HEIGHT (BETA)
    Height of the side supports. 


Sales 100+
Customer Ratings 3
Average Rating
Dev Fund Contributor
Published over 1 year ago
Blender Version 3.5
License Royalty Free
Have questions before purchasing?

Contact the Creator with your questions right now.

Login to Message