Author Topic: Creating a loop ?  (Read 923 times)

Using a random value between 0/3 (cast to int.) and set as a variable, quite often turns out the same number. What I want to do is if the number is equal to the last then loop to get another.

Any suggestions ?

Also with FX I want to use an area detection to make sure the next image is not near the last one, so once again loop the process.

Quote
What I want to do is if the number is equal to the last then loop to get another.

Just compare the new random with the last one, if they are equal, add or subtract 1.

Quote
Also with FX I want to use an area detection to make sure the next image is not near the last one, so once again loop the process.

This would require multiple passes (in multiple Fxmap nodes) where a first node draws the first layer of pattern, then a second node samples the previous to make sure it does not draw the new patterns at the same place.
Product Manager - Allegorithmic

Thanks for the reply.

I started off with add and subtract first but seemed like too much.

I haven't tried yet but can the FX map return a blank image ?