Itoo Software Forum

RailClone => RailClone Pro (*) => Topic started by: Siim on May 30, 2014, 12:29:16 PM

Title: The same random segment per spline section
Post by: Siim 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:
(https://dl.dropboxusercontent.com/u/3075576/curtain_array.jpg)
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

Title: Re: The same random segment per spline section
Post by: Paul Roberts 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.

(http://lonelymonk.com/forum_images/16ce06e239c2471ebefc71d780eb1deb.jpg)

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:

(http://lonelymonk.com/forum_images/41cf1cde0fca43618fcd4c6052fe2490.jpg)

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

Many thanks,

Paul
Title: Re: The same random segment per spline section
Post by: Siim on May 30, 2014, 03:58:10 PM
Excellent! That's exactly what I was after. :)

Best regards
Siim