Random Textures skips some and duplicates others, how to make sure one of each is picked?

   1079   0   0
User Avatar
Member
42 posts
Joined: 12月 2016
Offline
Hello

I am applying random image sequences to a bunch of planes. Everything works but the random function spits out duplicates and triplicates of some textures. Is there a way to make sure it picks at least one of each of the 80 textures in the range specified by the fit function?

There are 80 folders numbered 1-80, in each folder there is an image sequence “IGS.png”:

the string value for the local override is: “ERENDERS/BATCH/`floor(fit01(rand($CLASS),1,79))`/IGS`padzero(3,$F%431)`.PNG”

The random function calls a different folder for each primitive. But as you see in the Geo Spreadsheet I get triplicates and duplicates, some folders are skipped entirely…

I solved it in a way by simply making this “ERENDERS/BATCH/`$CLASS+1`/IGS`padzero(3,$F%431)`.PNG” Then each primitive calls the folder but if the number of primitives increases and there is no corresponding folder I still want them to get assigned a texture….

Any advice is much appreciated..

Attachments:
screen.png (467.6 KB)

  • Quick Links