Maurits Posted November 15, 2015 Share Posted November 15, 2015 Hey all I'm currently working on a project where I want to create a scale like effect with boxes overlapping.Currently I'm able to calculate the required angle for each box so the end of one box rest on the start of the next when there all in a straight line.But when placing the boxes on a curve they start to intersectin with each other. The goal is to get them nicely laying on top of each other as in this image but i don't know how. So i was hoping someone could help me, I'm guessing in need to calculate the angle but I tried several different methods with no success. The expression I'm using now to get the angle needed for the boxes to overlap is. atan(ch("../box/thicknes") / ch("../box/overlapPoint")) The placing of boxes is done using a curve and a copy node, each box is rotated using a stamp value. 1 Quote Link to comment Share on other sites More sharing options...
konstantin magnus Posted November 16, 2015 Share Posted November 16, 2015 (edited) hi maurits, interesting! here is my approach. the tiles either touch at the corner or somewhere along the edge. i solved the first case. for the latter you probably need another pointvop, which is calculating based on the results of the first one (or you have to bloat the first one). please keep us posted, even if you dont have any questions! roof.hiplc Edited November 16, 2015 by konstantin magnus 1 Quote Link to comment Share on other sites More sharing options...
konstantin magnus Posted November 17, 2015 Share Posted November 17, 2015 here is a further developped version from last night. this time also featuring overlappings. i did not finish it yet, so it contains bugs. roof_b.hiplc 2 Quote Link to comment Share on other sites More sharing options...
Maurits Posted November 17, 2015 Author Share Posted November 17, 2015 Thank for the help so far konstantin magnus. Using your examples i'm also trying to get it working, but the progress is slow going.So all help remains more then welcome. Quote Link to comment Share on other sites More sharing options...
petz Posted November 18, 2015 Share Posted November 18, 2015 here is another quick attempt. hth. petz roof.hiplc 3 Quote Link to comment Share on other sites More sharing options...
Maurits Posted November 19, 2015 Author Share Posted November 19, 2015 That seems to do the job perfectly Petz thank you and konstantin magnus for your help.Gone spends some time to disect and understand both methods used. Quote Link to comment Share on other sites More sharing options...
Kardonn Posted December 4, 2015 Share Posted December 4, 2015 @Petz that setup is really nice. This may be a dumb question, but my VEXfu isn't terribly strong...in your wrangle, sometimes you're using @OpInput1 and sometimes geoself(). Since it's only operating on a single input anyway, just curious if there's a reason for choosing one sometimes over the other. Quote Link to comment Share on other sites More sharing options...
Maurits Posted December 4, 2015 Author Share Posted December 4, 2015 I't might be preference.if you use the @OpInput1 version you don't have to rewrite allot to change to the second input or think about it. While using the geoself() you have to rewrite more or think a bit more about it when you wan't to execs another input. Quote Link to comment Share on other sites More sharing options...
acey195 Posted December 5, 2015 Share Posted December 5, 2015 or you can just put "0" or "1" as integers Quote Link to comment Share on other sites More sharing options...
petz Posted December 5, 2015 Share Posted December 5, 2015 (edited) @Petz that setup is really nice. This may be a dumb question, but my VEXfu isn't terribly strong...in your wrangle, sometimes you're using @OpInput1 and sometimes geoself(). Since it's only operating on a single input anyway, just curious if there's a reason for choosing one sometimes over the other. geoself() is a handle to the current geometry of the node while OpInput is the incomming geometry from the node wired into the first, second or nth input. in the example above i had to use geoself() because the wrangle is set to run over primitives but is updating point attributes as well. therefore it uses setpointattrib() and that´s a function working on the current geometry. since the example uses attributes just from the first input (OpInput1) you could use geoself() for everything. not doing this, as well as using OpInput instead of the integer number as suggested by acey195 ist just a personal preference... hth. petz Edited December 5, 2015 by petz 1 Quote Link to comment Share on other sites More sharing options...
Kardonn Posted December 9, 2015 Share Posted December 9, 2015 Well while we're on the subject of roofing tiles...how would you guys go about laying out a perfectly spaced set of curves onto a piece of roof geometry to then use as the basis for tiles to get placed? I guess really the question is more what the easiest way is to turn a polygon roof face into a NURBS or a mesh or something so that you can start to Creep lines across either the s or t parameter. Quote Link to comment Share on other sites More sharing options...
Maurits Posted December 10, 2015 Author Share Posted December 10, 2015 I use 2 different methods while working on this projectThe basis for the first one comes down to the following.The first methods removes all except for the bottom points of a polygon after adding the normal, tangent and bi tangent values to the polygon.Then refine the edge depending on the width of your tiles.Next you create a line with points equally spaced out depending on the tile height and copy these onto the bottom line. As this line maintained the normal data the lines should be placed in the same angle as the original polygon.This results in a series of lines with points correctly spaced for roof tiles. The basis for the second one is rotating a polygons so all polygons always align along the same axis.Then you can use a division node to create the vertical lines using the tile width, afterwards the lines are refined vertically depending on the tile height. Finally rotate the object back and copy your tiles.But depending on your roof shape this might or might not work, a mayor difficulty is when the roof is bend, while vertically bend roof like chinese buildings are still relative easy it's when they are horizontally bend like a tower when it gets difficult especial if you want to keep streight vertical lines, if you want tiles to overlap horizontally it becomes less difficult. But i think there might be beter way's out these. Quote Link to comment Share on other sites More sharing options...
Kardonn Posted December 11, 2015 Share Posted December 11, 2015 Yeah something like that would be pretty quick to do, but I'd be hoping to set up something much more automated and procedural. Quote Link to comment Share on other sites More sharing options...
Maurits Posted December 11, 2015 Author Share Posted December 11, 2015 If you know the steps you can automate them.So converting these examples methods to be procedural is not that hard. Quote Link to comment Share on other sites More sharing options...
Kardonn Posted December 13, 2015 Share Posted December 13, 2015 If you know the steps you can automate them. So converting these examples methods to be procedural is not that hard. For sure, but in that workflow there would be some manual work of determining which edges become the boundary that you use as the basis for your grid. There's probably some easy way I'm not thinking of right now, but I can't really come up with a good automated approach to getting perfect roof tile layouts on roofs with arbitrary geometry. Here's some roof geo if anyone feels like playing with it. It's locked into the .hip file containing my somewhat feeble attempt at this. roofing_v001.hip Quote Link to comment Share on other sites More sharing options...
Maurits Posted December 13, 2015 Author Share Posted December 13, 2015 I know the feeling, been trying to create a roofing tool on and off again for a while facing the same problems. Don'y think you can use a single methods that works with every roof shape. Instead it might be better to let the user choose the methods depending on the roof shape or find a way to do this automatically.When i have time i'm gone have a look at your approach to see how you did it. Quote Link to comment Share on other sites More sharing options...
renderfan Posted December 15, 2015 Share Posted December 15, 2015 (edited) Can you not use Convert-SOP to change geometry to NURBS or mesh and get curves with Carve-SOP? Edited December 15, 2015 by renderfan Quote Link to comment Share on other sites More sharing options...
Kardonn Posted December 18, 2015 Share Posted December 18, 2015 Can you not use Convert-SOP to change geometry to NURBS or mesh and get curves with Carve-SOP? Yeah that could work, but I'll admit here I really don't know enough about converting polygons to meshes to come up with a really good solution. I'm doing pretty badly at coming up with a pts/prim sort operation to get a single clean mesh out of it. There's some good roof examples in that .hip file I'd linked further up if anyone wants to give it a whirl and convert them to mesh objects. Quote Link to comment Share on other sites More sharing options...
renderfan Posted December 19, 2015 Share Posted December 19, 2015 I was to quick. Sorry! I did try with your file but it is not work because u and v direction do not match when I convert to Mesh. Perhaps there is better way but I do not know. Quote Link to comment Share on other sites More sharing options...
petz Posted December 20, 2015 Share Posted December 20, 2015 depending on the type of tiling there are several things you could try. take a look at the attached example. it´s not a production ready solution but might give you some ideas ... hth, petz roof.hipnc 1 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.