Itoo Software Forum

Author Topic: random left and right  (Read 1138 times)


  • Newbie
  • *
  • Posts: 7
random left and right
« on: May 06, 2017, 07:12:51 PM »

I try to make curtains that are randomly left and right in different widths...

I know I need to tell railclone to put the curtain sometimes left and sometimes right and then add the random width, but how? :)

thanks in advance

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 1996
Re: random left and right
« Reply #1 on: May 08, 2017, 12:54:13 PM »

Thanks for contacting us.

To do this you can use a random number node and the Selector operator. Basically you need to create two states: one where the curtain is on the left, one where it is on the right. To randomly generate these states you can use the Random Number node with a Minimum value of 1 and a Maximum of 2, set to generate a new value for each spline.

This is wired to a Selector operator's Index property. In the first input you would add your curtains and in the second, an empty "null" segment. When the random number returns 1 you'll get a curtain, when it returns 2 you get nothing. Wire this to the Start input.

Then duplicate the Selector operator and swap the inputs so that the null segment is now in slot 1. Wire this to the End input. Now whenever 1 is returned you'll get a curtain on the left and a null on the right. And when 2 is returned you'll get a null on the left and a curtain on the right.

I've attached a sample setup. I hope that helps, please let me know if you have any further questions.

Many Thanks,

Paul Roberts
iToo Software