Random expressions are not easily loopable. The only way to do that is to blend between two random functions with different seeds, which will inflate the code ten times as much as it needs to be. Simply blend two different layers comps. The rest can be done with basic wiggle() animations, for which you can find like a gigazillion tutorials online. The only added difficulty would be the gradient-like variation in your image, which will require some experimentation with values for each line of triangles.
Thanks for the reply. I'll try this out now but every time I use the wiggle expression its pretty severe. I think I need to learn a bit more about it.
I'd like to do it all in AE to have more control but as a backup I found a script for Illustrator that lets you randomise opacity between certain values across anything selected so I may just have to make lots of artboards and randomise for each frame, then keyframe the opacity change between each image.
You are probably simply using too large na amplitude over too short a time. Impossible to know without seeing the values you actually use. Blending across a multirude of static images would of course offer the most control without lengthy experimentation. No doubt about that.
If you have every single triangle seperated on their own layers, this might make it easier to control:
1. Select all the triangle layers and change opacity to 75%.
2. Make a Null, call it "Controller".
3. Add two sliders (expression controls) and name them "Speed" and "Range". Set Range to 15 and Speed to 1.
4. Add this expression to the Opacity of first triangle layer (or last. Anyone really...)
s = thisComp.layer("Controller").effect("Speed")("Slider");
r = thisComp.layer("Controller").effect("Range")("Slider");
Select the Opacity attribute, go to Edit, "Copy expression only", select all triangle layers, paste.
Play around with the Speed slider in the Controller to make the "blinking" more frequent.
With a start value of 75% and a range of 15%, the wiggle will interpolate between 60% (lowest) and 90% (highest).
And since Wiggle gets its "seed" from the index, it will look totally random from triangle to triangle.
Then of course, Precompose it, make a gradient on a solid, and set your Triangle Precomp to Luma Matte.
It'll make it easy to control the fade from top to bottom, while still having full control over the speed and range of the individual triangles.