Itoo Software Forum

Author Topic: Random distribution  (Read 3929 times)

IT1371

  • Full Member
  • ***
  • Posts: 187
Random distribution
« on: January 19, 2015, 03:06:36 PM »
Hello!

I want to use Railclone to distribute curtains inside my projects.
For that I made a object in ACA which automatically adds a polyline to the inner frame of every AEC window and such.

Anyway I got all my lines aligned the way I want it and I need Railclone to do the following:
1. Randomize distance between objects on every polyline.
2. Not to mix different curtain types on the same polyline.
3. Sometimes ignore the polylines and not place anything (not all people like curtain on their windows after all.

Any ideas how to make this possible?
Railclone is a riddle to me.

Rokas

  • Hero Member
  • *****
  • Posts: 3324
Re: Random distribution
« Reply #1 on: January 19, 2015, 03:29:15 PM »
it is really simple,

Do your windows have different spline per window or per flat ? or is it one spline for all building windows?

Rokas

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2991
Re: Random distribution
« Reply #2 on: January 19, 2015, 04:17:28 PM »
Hi,

Thanks for solving this one Rokas. I'd already started replying so I'll post my version anyway  :)

in the attached style I've used a similar approach to Rokas. Though I've assumed that the geometry is randomised to add some variation while the material is kept consistent for each spline.



To achieve this the curtain segments are wired to a Randomise operator. This is then attached to a Selector operator along with an "empty" segment to create the occasional curtain-less windows. To control probability I've just added the curtains to the Selector operator multiple times:



The Index for the Selector operator has been exported and wired to a Random Number node. This is set so that it generates a new random number for each spline. The same approach is used for the Material Operator to ensure the same material is used for all curtains on the same spline.

The curtains are applied to the Start and End inputs and their width is calculated by dividing the length of the current spline in half using this Expression: (XSplineLength/2)-Input1
Input1 in this case is another random value used to create different size gaps between the curtains. This is achieved by wiring this value to the X Fixed Size input of a Transform operator. Increasing the upper limit of the random values will increase the size of the gap.

I hope this explanation and the attached file is of some help. Please let us know if you have further questions.

Many thanks,

Paul
« Last Edit: January 19, 2015, 04:34:20 PM by Paul Roberts »
Paul Roberts
iToo Software

IT1371

  • Full Member
  • ***
  • Posts: 187
Re: Random distribution
« Reply #3 on: January 19, 2015, 04:52:56 PM »
You guys are great!
Thank you very much for the help - exactly what I meant!   ;D

eqko

  • Jr. Member
  • **
  • Posts: 96
Re: Random distribution
« Reply #4 on: August 14, 2015, 05:31:30 PM »
Paul, do you think you could perhaps elaborate on the settings per node, show screenshots of the settings or something ?

I need something like this, but you lost me somewhere along the index part for segments.

also, NO idea where to input the expression

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2991
Re: Random distribution
« Reply #5 on: August 14, 2015, 05:51:57 PM »
Hi,

Have you had a chance to download the file at the bottom of the post? You'll find you can examine the style and see where the expressions and random operators are used. My apologies if you've already looked at that, let me know and I'll do my best to make it clearer.

Many thanks,

Paul
Paul Roberts
iToo Software

eqko

  • Jr. Member
  • **
  • Posts: 96
Re: Random distribution
« Reply #6 on: August 14, 2015, 06:04:51 PM »
ouch, I did not notice that one. Will download it.

Thanks

Klonsemann

  • Jr. Member
  • **
  • Posts: 61
Re: Random distribution
« Reply #7 on: September 10, 2015, 04:50:32 PM »
Nice one. I have got a question somehow offtopic.

Paul, are the meshes in Maxfiles you uploaded in this forum are free to use in commercial projects ?
I dont wanna be the bad guy, but if ItooSoftware bought this meshes from somewhere, there may be copyrights to be taking in account !

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2991
Re: Random distribution
« Reply #8 on: September 10, 2015, 05:02:14 PM »
Hi,

Thanks for the question.  I've never knowingly shared copyrighted material.  Most the time we use simplified geometry but where we share a more detailed file like these curtains the models were created in-house.

I hope that helps.

Many thanks!

Paul.
Paul Roberts
iToo Software

Klonsemann

  • Jr. Member
  • **
  • Posts: 61
Re: Random distribution
« Reply #9 on: September 10, 2015, 08:43:33 PM »
That's good to know ! Thanks for sharing all those great RC Styles and meshes.

The curtains are a nice idea to randomise with RC. I will have a look at that and see what more stuff i can put in.
Placing stuff with the help of splines, Xrefing and boxmoding them till rendertime. Thats the way !  XD