[ANSWERED] Save me reinventing the wheel, please! Blob tracking / stage grid / trigger events
-
Hello all,
Someone must have done this before and would be kind enough to share their patch or to at least tell me the easiest way to do this.
- Camera mounted on the grid above the stage pointing down.- Stage divided into a 4 x 4 grid
- Blob tracking so that as the 'blob' being tracked moves from one to another of the 16 grid squares an event is triggered (and the previous 'event' stopped).
(in its most simplistic each square being entered triggers a tone on the scale, so that the performer, as they move about the stage, plays a tune).
Blob tracking works great, it's the triggering of 16 different events that makes me think there has to be a simple way!
Thanks a lot!
Mark (no, not that Mark: he's done this hundreds of times!) -
well each grid block is defined as having a range of X (X1 thru X2) and a range of Y (Y1 thru Y2). And blob tracking has X and Y.
So Quad 1 is True if blob X is greater than/or EQ to X1 (lowerValue) AND is lesser than/or EQ to X2 (the greater value).
AND
Same relation for blob Y in relation to Y1 and Y2If this condition is true for any grid block it will be false for the others (accept for on EQs state.. then it can be true in 2, so don't use or EQ for both).
So you could write this out in Javascript, or use comparator, or inside range (not ideal because it can't test for Equal).
I built a user actor for you:that should work to detect if the blob is inside the defined rectangle. Defining the Rect edges will be the time-consuming configuration step.
Just send your blob XY to 16 copies of this actor with the ranges setup. (you could automate the divisions, but that probably wouldn't workI made a demo scene that is setup to track the left column of 4 rect grids.
-
-
Best regards, Jean-François
-
@jfg @DusX @Reinhard
Thanks to all of you who replied, demonstrating not only what a supportive community we have here, but also that you can do the same thing in Isadora in many different ways!!
Thanks, Ryan, for the Javascript based solution: that's where my head was at, but my knowledge was lacking!
Jean-François, thanks a lot for that eyes (not eyes++) solution. That's the road I'm going to go down, I think. Thanks for the clever maths: I got stuck before with trying to create a unique value for each of the sixteen grid squares. |
Onwards and upwards! Thank you! -
Would love to see some of these solutions uploaded to the Add-Ons Page if anyone has the time :)