Itoo Software Forum

Author Topic: Clipping with random sequences problems  (Read 249 times)

ITCodies

  • Newbie
  • *
  • Posts: 4
Clipping with random sequences problems
« on: June 24, 2022, 03:08:30 PM »
Hi

I've set up a generator that randomly spawns segment shapes down a spline. I then wish to use a clipping spline island to cut this sequence into two separate areas. Inside the clipping spline and outside and then assign each clipped area a different material ID.

So the setup is that it creates the sequence along the spline via a generator. I then take that generators output and put it into two other generators that clip it into inside and outside. This works fine if I use a set sequence into the initial generator. However when I try to use a random node instead of a sequence it goes wrong. Even though there is only 1 output to the two clipper generators. It appears to run two completely random sequences that show as being out of sync when the later clipping part happens.

Much like my Mat ID remap post I've tried everything I can think of to bake/freeze the original sequence before it does the second clipping stage but it appears to run the randomize maths from start to finish through the node chain per output.

Any advice is welcome

Jus

Files attached

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2828
Re: Clipping with random sequences problems
« Reply #1 on: June 24, 2022, 03:22:57 PM »
First of all, thanks for such well-annotated files! You can solve this by using a Selector Operator with a Random Number node wired to the Index input. It gives you a lot more control over when a random number is generated and also includes the Sync Between Generators option that can be used to make sure the two versions of the nested geometry match.



I've attached your edited sample file.

I hope that helps,

Paul
« Last Edit: June 24, 2022, 03:32:02 PM by Paul Roberts »
Paul Roberts
iToo Software

ITCodies

  • Newbie
  • *
  • Posts: 4
Re: Clipping with random sequences problems
« Reply #2 on: July 12, 2022, 04:15:19 PM »
Thank you Paul this has come in handy for lots of other things we were doing too.
Sorry for the delayed reply. I was having trouble with my forum password on the company account.

:)

Jus

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2828
Re: Clipping with random sequences problems
« Reply #3 on: July 12, 2022, 04:16:32 PM »
No problem at all - glad we could help out.

Cheers!
Paul.
Paul Roberts
iToo Software