Random textures based on frame

I have a puzzle… 100 shapes with 4 separate textures that apply to each polygon. I want to have the 4 textures cycle in a random manner based on the frame number. with the option to change the frequency of change… 1 per frame 2 frames then change ( on 2’s as explained in animation terms) 3 frames then change 4 frames then change on through to 8

its important that the 100 polygon puzzle shapes all change the texture randomly of each other.

in my mind I figure it could be done in either the material nodes or the animation nodes. I would like to use the animation nodes if possible.

Does this mean the animation start at 0, then change at 1, then at 2, then at 4, then at 7,…

m = n(n+1)/2 = 1+2+3+…+n?

If so, here is the setup: interger sum speed.blend (781.5 KB)

I’ve already change the framerate to 1 per second which is easier to count and check.

The math: https://math.stackexchange.com/questions/2041988/how-to-get-inverse-of-formula-for-sum-of-integers-from-1-to-n/2041994

1 Like

Possibly.
Initially I wanted texture to change every frame to a random. But it might be too fast. So would like the option to have texture stay at one texture for 2,3,4,5,6,7,8 frames before changing to the next random texture.

Thanks for the reply. Math is always a bit out of my grasp.

Then just add 2 after the “frame”

thanks so much for taking the time…
just need slight alterations…
i’ve attached the blend file you sent and made a separate scene explaining my texture set up. the checker node would be swapped with 4 images I am using… each sharing the same UV.
also a gif example of the variable speed I need to find the right speed of the random cycle.

revised.blend (2.6 MB)

animation

4 variable speeds per object.blend (810.5 KB)

1 Like

Ace…
thanks for your time.

r

Hope it’s not late or you’ve already known it, but adding an add operation with an object random value after the manipulation will give more vairation for the textures:

I was just looking at the speed and forgot to test the colors.

not too late… running into other problems… frustrating, but entertaining as you gain knowledge. but thanks… I may contact you when I get to that point in the job.

cheers

r