Jump to content
Sign in to follow this  

Automatic roof tiler

Recommended Posts

Hey everybody
I wanted to show a personal project I have been working on the last few weeks. I’s a tool that takes any input mesh or group and applies roof tiles to it automatically. In theory it could help artist with making buildings or be used to automatically apply roof tiles to procedural generated houses.

The current version can create the basic roof types including roofs with alternating tiles types.
In addition it allows for unique bottom row tiles to be used to finish of the roofs.

Current users have control over the:
Horizontal and vertical tile overlap.
Tile depth offset for alternating rows
Tile thickness so tiles get the correct angle for a perfect overlap.
I still plan to include roof ridges into the process so it delivers fully completed roofs, although I expect this to take a while to finish so it produces the correct result and to improve the performance.


Share this post

Link to post
Share on other sites

Well done Maurits!


May I ask how long the cooking time is and what the general approach is that you used?


do you copy the modules and then clip them, do you make use of the creep sop,

and how do you separate the various segments? by angle, I assume?

Share this post

Link to post
Share on other sites

Hey acey195


The cooking time for the shape above is around 1.5 seconds on my machine.
And old first gen i3 laptop.

The tool groups polygons based on their angle, so polygons that are next to each other with the same angle are grouped.

Then for each group of polygons I create a horizontal lines with points equally spaced based on the width of the tiles. On this line vertical lines are placed with the same height as the original polygons, these contains points spaced using the height of the tiles.


Using a copy node the correct tiles are placed on each point, using tangent data stored earlier in the process.


For creating the correct shape I make use of a Cookie node to clip the sides of the resulting mesh. Although not ideal to use a cookie it gives in all cases no matter the original polygon group shape the correct result. (This part takes up the most cooking time as you can imagine and I might change it later)


For this whole process I rotate the groups around the Y axis so they all face the same direction while working. This reduced the complexity of some actions as it allows me to do calculations using the same starting point. For example calculating on what tile type each groups needs to start so all tiles line up correctly.

Edited by Maurits

Share this post

Link to post
Share on other sites

1.5 minutes or seconds :P?


still nice work :), although I would suggest trying to find alternatives for using the cookie SOP,

too speed up the generation slightly (if it is 1.5 minutes)

but mainly to better guarantee stability.


for instance you could deform the tiles in such a way that you can use a Clip node,

to remove the parts you would otherwise cookie away.


Then to close the gaps, group all the unshared edges and use a poly cap node.

Or alternatively, use a divide node to remove all shared edges, which should result in the holes in the geometry,

which you can then merge back in with the result of the clip. (which if the geometry supports it, would be faster)

Share this post

Link to post
Share on other sites

aaa My bad it's 1.5 seconds


I do plan to see if i can use a different methods other then cookie.

Gone have a look at your suggestions.

For the gaps that are created i already use a poly cap node, with seems to work quite well for now.


But there is still allot of cleaning and improving to do next to adding the roof ridges.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this