Here is my test (special thanks to my cat Lucy for the help!):
The first (and of course bad) idea was a copy-stamp with a "pic" expression to affect the Y position of each instanced pin:
pic("../img_sequence/OUT",$BBX, $BBZ,D_CR)*ch("../yAmount")
So, to optimize cache, I used the pic expression in a "point" node BEFORE the "copy" SOP (see the picture):
In this way cache files are much smaller because they cache template points only. Anyway, the evaluation is still slow.
The only way to optimize the evaluation is to remove the "pic" expression: fortunately, points can take color from images also by creating UVs and transfering texture color with a VOP SOP, that is much faster. Houdini 12 contains a digital asset that does exactly that, "AttribFromMap".
Placing an AttribFromMap before the "point" SOP and editing Y position expression to "$TY+$CR" ([point Y position] = [original Y position] + [red value]) is enough to get the same result as before with a reasonable evaluation time.
Whith the same method, you can easily create a LED panel effect. This time you have to create 3 different instance SOPs (red, green, blue) and merge them together before applying the copy operator:
- Create a LED geometry (that will be instanced on grid points), for example a box.
- Using AttribFromMap and Point SOPs, transfer the red channel of your footage to points; create an offsetted copy of the template points and apply another AttribFromMap to create the green channel; do the same for blue.
- Merge all the instance points.
- Instance the LED geometry on points with a copy SOP and transfer the template colours on instances (see the picture).
In the sample scene (download here, password "valeriodinapoli") I have prepared both effects.