Maurits Posted October 1, 2015 Share Posted October 1, 2015 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 rowsTile 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. Quote Link to comment Share on other sites More sharing options...
acey195 Posted October 1, 2015 Share Posted October 1, 2015 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? Quote Link to comment Share on other sites More sharing options...
Maurits Posted October 3, 2015 Author Share Posted October 3, 2015 (edited) 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 October 7, 2015 by Maurits Quote Link to comment Share on other sites More sharing options...
acey195 Posted October 5, 2015 Share Posted October 5, 2015 1.5 minutes or seconds ? 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) Quote Link to comment Share on other sites More sharing options...
Maurits Posted October 7, 2015 Author Share Posted October 7, 2015 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.