Itoo Software Forum

Author Topic: The same random segment per spline section  (Read 4901 times)

Siim

  • Newbie
  • *
  • Posts: 7
The same random segment per spline section
« on: May 30, 2014, 12:29:16 PM »
Hi

I'm trying to create an array that generates curtains to windows so that each segment of a spline has a different randomly chosen curtain model and material. This is what I've got so far:

The conditional node forces curtain model 2 for windows that are narrower than a specific width.

What I would like to achieve is to have the same random segment and random material ID at both the start and end of the segment. Currently the start and end don't match up.

Is there a way to accomplish this?

Best regards
Siim


Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2991
Re: The same random segment per spline section
« Reply #1 on: May 30, 2014, 01:41:48 PM »
Hi Siim,

Thanks for contacting us. You can achieve that by using a Selector Operator in conjunction with the random number parameter node. The Random number generator has the benefit of being able to re-seed  on either the Start, Segment, X Spline start, X Spline Segment, or Array Y Row.



By exporting and connecting to the Selector Node's index property you have a much more controllable way to randomise segments :). The same procedure can be used with the material node to match the material IDs for the start and end of a spline section. Your style would therefore look something like this:



I hope that helps, let us know of you have any other questions.

Many thanks,

Paul
Paul Roberts
iToo Software

Siim

  • Newbie
  • *
  • Posts: 7
Re: The same random segment per spline section
« Reply #2 on: May 30, 2014, 03:58:10 PM »
Excellent! That's exactly what I was after. :)

Best regards
Siim