### Author Topic: Cobblestone pattern  (Read 1631 times)

#### ralphr

• Newbie
• Posts: 29
##### Cobblestone pattern
« on: February 25, 2016, 09:08:23 AM »
Almost too embarrassed to post this one but oh well.
I am trying to do a simple cross/square pattern between cobblestone and normal stone plates. (Attached an image of what I am trying to achieve)
I get the horizontal row of small stones (in my test only 1 row) but the vertical spacing doesn't seem to want to get filled.
One solution would be to build larger segment pieces including more of the smaller stones but I'd like to randomize a lot of geo because the space I have to fill is pretty huge.

Hope somebody can point at the obvious bright glowing mistake I am probably making.

*edit* oh god I just noticed I still use "multiples of" for the vertical lines which obviously can't work..... but still if someone could have a look that would be great.
« Last Edit: February 25, 2016, 09:27:00 AM by ralphr »

#### Paul Roberts

• iToo Software
• Hero Member
• Posts: 1785
##### Re: Cobblestone pattern
« Reply #1 on: February 25, 2016, 12:19:41 PM »
Hi,

No need to be embarrassed, actually this is trickier than it looks. Because a rows is always the full height of the tallest segment it's actually not that easy to create a columns of smaller stones alongside a large paving slab. I've been able to solve it using sequence operators by doing the following, this example assumes 5 small stones will fit into the side of one large stone:

- Turn off Slice for the large Segment. This is so that it can overlap the rows above.
- Create a Sequence operator for the columns containing the large stones. In the first input add the large stone and in the second input add an empty segment with the exact same dimensions as the small segment.
- In the sequence operator change the mode to Increment on Y and increase the Count for the second input (null segment). If there are 5 small stones to one large one then the count should always be one less, so 4. This is because row one will contain the large stone and then we'll have four rows of empty space (though because slice it off the large stone will still fill that space, but we have the rows now to add small stones on either side.)

- Wire this to second Sequence operator , set it to Increment on Y and add the small stone to the second input. The counter for the first input should be double the total count for the first sequence operator, so 10 in this case. This will give you two large stones and then a row of small stones on the Y axis.
- Finally wire this to a third Sequence operator and leave it on Increment on X . This is to create the pattern on the X axis. Wire the small segment to the second input and set the first input's counter to 2.

I've attached this sample file for you to check out. I also got a bit carried away so included is the style shown in the video below which parametrises many aspects of the style and calculates sizes etc for you. The graph is more complex but it's based on the same principles as described above.

I hope that helps, please let me know if there's anything else I can do.

Cheers!

Paul
Paul Roberts
iToo Software

#### ralphr

• Newbie
• Posts: 29
##### Re: Cobblestone pattern
« Reply #2 on: February 25, 2016, 02:58:26 PM »
Once again a big thanks Paul! I ran into one problem though which I can't explain. I made some small changed to the rc style you sent and switched out the geo I wanted to use. But now everytime I save my max file it takes a least 1-2minutes until the file is saved. (1.4 mb filesize) Which seems really odd.
« Last Edit: February 25, 2016, 04:19:50 PM by ralphr »

#### Paul Roberts

• iToo Software
• Hero Member
• Posts: 1785
##### Re: Cobblestone pattern
« Reply #3 on: February 25, 2016, 04:16:20 PM »
That doesn't seem right. Could you send me the file to see if I get the same problem here (and  try to solve it too).

Thanks!

Paul
Paul Roberts
iToo Software

#### ralphr

• Newbie
• Posts: 29
##### Re: Cobblestone pattern
« Reply #4 on: February 25, 2016, 04:20:16 PM »
Once I am back at my workstation I'll send you the file per mail.

#### ralphr

• Newbie
• Posts: 29
##### Re: Cobblestone pattern
« Reply #5 on: February 25, 2016, 04:36:49 PM »
!!!! I think I solved it. It seems multitexture was the cause of the problem. For some reason even though the material wasn't used at all it slowed everything else down. Once I removed the material saving etc. was  quick again.
« Last Edit: February 25, 2016, 05:51:21 PM by ralphr »

#### Paul Roberts

• iToo Software
• Hero Member
• Posts: 1785
##### Re: Cobblestone pattern
« Reply #6 on: February 25, 2016, 05:32:47 PM »
Great! Good to know it wasn't our fault this time
Paul Roberts
iToo Software

#### ralphr

• Newbie
• Posts: 29
##### Re: Cobblestone pattern
« Reply #7 on: February 29, 2016, 12:32:07 PM »
Something popped in my head that is probably more of a general railclone question but since its related to this project I don't want to open a new thread.
If the slicing option is chosen instead of preserve/remove inside the 2d array options, does Railclone convert all cloned objects into copies because it's slicing some of the objects or are just the ones who are being sliced converted to copies and the rest remains as instances?

#### Paul Roberts

• iToo Software
• Hero Member
• Posts: 1785
##### Re: Cobblestone pattern
« Reply #8 on: February 29, 2016, 12:58:45 PM »
Hi-

RailClone's instancing in quite smart. Only the elements that are sliced get converted to static geometry. Any part of the array that is not bent or sliced is always instanced.

Hope that clears it up.

Thanks!

Paul
Paul Roberts
iToo Software

#### ralphr

• Newbie
• Posts: 29
##### Re: Cobblestone pattern
« Reply #9 on: February 29, 2016, 01:13:08 PM »
Thanks!