mickcullinan Posted June 1, 2019 Share Posted June 1, 2019 Hi all, Just looking at Marionette for the first time for an upcoming project so apologies if I'm missing something obvious! What I'm trying to create is a network which will generate a series of semi random tiles within a given set of paramaters. Something kind of like this: I've created a network which creates the first tile, then takes the top two vertices of that tile, adds a space, and uses those as the starting points for a new tile. Then the resulting tile is fed into a copy of the network and so on: So it's somewhat working. :) My question is, is there a way to get the wrapped script to repeat automatically, so it's not just copied and pasted like I have done, or is this a python job? Essentially it would be a for / while loop which keeps going untill the top vetex of a tile hits a maximum and then stops. Thanks! - Mick Quote Link to comment
Marionette Maven Marissa Farrell Posted June 1, 2019 Marionette Maven Share Posted June 1, 2019 There's not a traditional method of looping in Marionette, but if you incorporate the Sequence/Range/Series nodes, they can help to facilitate behavior similar to a loop. Take a look at those, and if you need some guidance let me know and I'll try to find some time on Monday to help guide you 🙂 This will just be a matter of list manipulation, so check out all of the Data Flow nodes. Quote Link to comment
mickcullinan Posted June 3, 2019 Author Share Posted June 3, 2019 Thanks Marissa! I've had a look at those nodes, but I still can't quite figure it I'm afraid so any pointers would be great. My issue is that my wrapped network needs to be ran each time to generate the new starting points for the next tile, and I can't see how to implement this with any of the existing nodes. My network takes two starting points a and b then adds a random amount to the y value of each to make points c and d - to make the four points of a quad. Then it takes c and d, adds a vertical spacing amount to each, and then the new c and d should be the start of the next tile, but I'm at a loss as to how to get this to happen, without my original solution of just putting copies of the wrapped network one after the other. Quote Link to comment
Vectorworks, Inc Employee Stephan Moenninghoff Posted July 18, 2019 Vectorworks, Inc Employee Share Posted July 18, 2019 @mickcullinan You need to make an array first and then modify the points. Can you work off this? Convert the rects to polys and apply your point modifications. Set the Mix2 to "Cross reference". Array.vwx Quote Link to comment
Vectorworks, Inc Employee Stephan Moenninghoff Posted July 18, 2019 Vectorworks, Inc Employee Share Posted July 18, 2019 I've actually done it. It doesn't convert to an object node. The "Set 2D Vertex" node fails inside the object node. @Marissa Farrell can you confirm? @mickcullinan you need to pick the offset values out of a list of random values and apply those offsets to the vertices in each poly. Looks a bit messy because I was not able to enter more than one value for the "Set 2D Vertex" node. I think that is actually supposed to work. I suppose you want the top and bottom rows to remain flat on the outside. The "Remove At" node is good for picking every nth value. Careful if you have more offset values than polygons because the last poly will receive the last value in the list. Better to strip the excess ones using "Split List" (although that's kinda hacky). This can probably be done more elegantly but it works. Array.vwx Quote Link to comment
Vectorworks, Inc Employee Stephan Moenninghoff Posted July 19, 2019 Vectorworks, Inc Employee Share Posted July 19, 2019 Added some numbering and introduced a second random parameter. Now, each of the four vertices is randomly moved in y direction. It's actually something I needed as well so you're in luck 🙂. I have filed a bug about the object node not playing nice with the "Set 2D Vertex" node so once that's fixed this will be quite a fun object to play with. Array-IT1.vwx 2 Quote Link to comment
Vectorworks, Inc Employee Stephan Moenninghoff Posted July 21, 2019 Vectorworks, Inc Employee Share Posted July 21, 2019 (edited) After some major refactoring (actually, a rewrite), the network has become more elegant and much smaller. Modifying the points before they are fed into the polygon proves much faster and more manageable. Now, it's also easier to add more options (movement of vertices along the x axis?). And since the "Set 2D vertex" node is now redundant, the whole Marionette works as an object. Array-IT2.vwx Edited July 21, 2019 by Stephan Moenninghoff 1 Quote Link to comment
Vectorworks, Inc Employee Stephan Moenninghoff Posted July 21, 2019 Vectorworks, Inc Employee Share Posted July 21, 2019 I suppose some more swapping of columns is necessary to make the offset more uneven 😁 Quote Link to comment
mickcullinan Posted August 2, 2019 Author Share Posted August 2, 2019 Hey Stephan, That's awesome! It works perfectly. I haven't had a chance to go through it properly to see exactly what's happening, but I will over the weekend. Thanks for taking a look at it - will help me a lot when makeing new networks :) - Mick Quote Link to comment
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.