Itoo Software Forum

RailClone => RailClone Pro (*) => Topic started by: JK3990 on April 09, 2018, 07:42:57 PM

Title: Request: Random Seed Per Segment
Post by: JK3990 on April 09, 2018, 07:42:57 PM
I just ran into a situation today where more control of the random seed would make all the difference.  I'm using splines to distribute automobiles on a road and in parking lots, so it's covering quite a large scene.  However, whenever I make a small tweak to just one of the segments, the whole scene reshuffles, so it is very difficult to have any control over the placement of vehicles.  There are probably other situations that would benefit over greater seed control, but this is one that has significantly impacted my workflow.

Thoughts?
Title: Re: Request: Random Seed Per Segment
Post by: Rokas on April 11, 2018, 03:18:00 PM
Hi.

Great question ! Thank You.
What we can do is generate random number from X/Y coordinates on the spline.
This way editing current spline/segment wont affect other splines.

Arithmetic node with Max Random as Input1
Code: [Select]
return mod(XSplineCoords.x +  XSplineCoords.y, (Input1));
(https://i.imgur.com/j8hbuHN.png)
Title: Re: Request: Random Seed Per Segment
Post by: JK3990 on April 11, 2018, 03:22:00 PM
Interesting!  Very cool, I will give that a try today.
Title: Re: Request: Random Seed Per Segment
Post by: harumscarum on April 15, 2018, 12:39:40 PM
works great!
it keeps the random positions of the segments, but still, any changes to spline affect RC segments randomization on the same spline

(https://forum.itoosoft.com/railclone-pro-(*)/request-random-seed-per-segment/?action=dlattach;attach=10695;image)



PS I get it, it work with splines, not segments, so additionally we have to break all the vertexs