Jump to content

Maurits

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.
pre.png_zps7krspokx.jpgpost_zps0dhhoveo.jpg

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.

bot-row_zpspqv0rwbs.jpg
 
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.
 alt_zps4v0d4xm2.jpg
 
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.

ridges-and-tiles_zpszlqllta7.jpgridges_zpsgfkmrdjx.jpg

Link to comment
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?

Link to comment
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
Link to comment
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)

Link to comment
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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...