-
Triggering clips based on a black and white map
Have a grid of clips that I’d like to trigger based on a black and white map. I’m able to reference the map and see when the clips need to be triggered but not sure what comes next. Will eventually be a grid of something like 10×6 clips if that matters. Would I need to continually loop back through the comp so see when the reference map changes from white to black?
targetLayer =thisComp.layer("Controls").effect("B&W Map")("Layer")
samplePoint =thisComp.layer("tt_footage_2").transform.position
sampleRadius = [1,1];
sampledColor_8bpc = 255 * targetLayer.sampleImage(samplePoint, sampleRadius);
R = Math.round(sampledColor_8bpc[0]);if(R > 0){
outputString = "OFF";
frame = 0
}else{
outputString = "ON";
frame = time
}