Itoo Software Forum

Author Topic: Bricks with random length with array 2s  (Read 2292 times)

SI3457

  • Newbie
  • *
  • Posts: 11
Bricks with random length with array 2s
« on: April 09, 2016, 08:44:17 PM »
Hello, i cant understand how to make a vertical brick wall (not a problem if i have to make it planar then rotate it afterwards but even there i cant find how to do) with bricks of different length. Of course, each row, all bricks must have the same height, but id like that in a given row, the length of the brick changes randomly.
I spent hours cant find a way. Even with export random y scale and linking random variable starting at array y row, it does not work. all bricks are different height, but not same height on all the row; perhaps my y is not the railclone y i dont know. i m tired sorry for the syntax...
I seem to have a problem with pivots or something like that. if you could provide a very little example max file that would be great or just a screen capture.... (im on max 2014)

Thanks
« Last Edit: April 09, 2016, 08:52:02 PM by SI3457 »

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2991
Re: Bricks with random length with array 2s
« Reply #1 on: April 11, 2016, 10:54:05 AM »
Hello,

Please take a look at the attached file. To randomise the size of the bricks per row I've used the following technique.

1 - Create a transform operator and wire it between the brick and the generator.
2 - Right-click the Transform operator and Export Y Fixed Size
3 - Go to the Transform operator's properties and check Fixed Size
4 - Wire a Random Number node to this input and set the Type to Scene Units and change the Mode to Array Y Row. Set a minimum and maximum height for the bricks.



As for how to create a vertical wall, you have a few options either create it using a single spline for the path and a Y Size parameter, in which case you'll want to use the X Rotation properties to make the wall vertical. Or create it using two splines, and then edit the Y spline to move the wall into a vertical position, or if you want to use X and Y size parameters or a clipping spline, you'll need to rotate the RailClone object itself so that it is vertical .

Please see the attached files for samples of all of the above.

I hope that helps,

Many thanks!

Paul.
Paul Roberts
iToo Software

SI3457

  • Newbie
  • *
  • Posts: 11
Re: Bricks with random length with array 2s
« Reply #2 on: April 11, 2016, 03:36:36 PM »
Thank you very much !!
Why does it not work if i wire the random component directly in to the exported Y fixed size of the segment, and that it has to be made through the transform component  ?

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2991
Re: Bricks with random length with array 2s
« Reply #3 on: April 11, 2016, 07:04:25 PM »
Hi, I'm glad that helped. Any change to the Segment that uses an expression or random number node has to use a Transform operator. This is due to the internal logic of RailClone and the order of operations. You'll find if you try to connect them directly RailClone will warn you that it may not work.

Thanks,

Paul
Paul Roberts
iToo Software

concrete pixel

  • Newbie
  • *
  • Posts: 4
Re: Bricks with random length with array 2s
« Reply #4 on: June 18, 2021, 09:15:57 PM »
This solution was working for me until I needed to deal with the start/end segements. I downloaded the solution you attached in the file, but it appears the start/end are one height, but the default is different now? Did this solution break during the most recent update to railclone?
I attached an image of what the brick walls look like after I opened the file.
Dan Adams
Concrete Pixel
concpixel.com

Rokas

  • Hero Member
  • *****
  • Posts: 3324
Re: Bricks with random length with array 2s
« Reply #5 on: June 21, 2021, 08:07:54 AM »
Hi Dan.

I have just downloaded the file and it works correctly here with latest RC version:


Maybe You have modified it somehow ?
Rokas

Dragan

  • Hero Member
  • *****
  • Posts: 1419
Re: Bricks with random length with array 2s
« Reply #6 on: June 21, 2021, 11:18:16 AM »
Same here, works just fine.