Itoo Software Forum

Author Topic: Bricks with random length with array 2s  (Read 598 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: 1539
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: 1539
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