Looming stimulus not displaying (white screen only) despite correct tracking in BonZeb workflow #2540
Unanswered
almoggoresh
asked this question in
Q&A
Replies: 1 comment
-
|
Attaching the workflow files! Thank you in advance. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone!

My goal is to track a single freely swimming zebrafish larva and extract its centroid (X,Y coordinates per frame). At the same time, I want to apply a visual stimulus — specifically a looming stimulus, where a small black dot appears near the fish and rapidly expands (similar to the examples shown on the BonZeb site - https://ncguilbeault.github.io/BonZeb/:
I have used the pre-made workflow suggested here:
https://github.com/ncguilbeault/BonZeb/tree/master/Examples/Virtual%20Open-loop%20Free-swimming#virtual-open-loop-with-looming-dot
I also had to make a few modifications to get our camera recognized. In addition, as far as I understand, I needed to download the "looming_stimulus" frag and vert files and set up a small workflow in the main window (Create Window -> Shader Resources -> Load Resources), where I added them under “Shader Resources" (screenshot down below).
I will now present the whole workflow, trying to elaborate on the settings as much as I can.


Main workflow, with the settings for "Create Window":
"Shader Resources" settings:
Nested workflow inside "Virtual Open Loop":


inside that workflow, I have 2 "Expression Transform" nodes, with these settings:
Inside that nested workflow theres "Scan" node with another workflow inside, with another "Expression Transform" inside, with that line of code:

What actually happens is that once I start the experiment, the projector immediately displays a white screen. When I press TAB, background subtraction is triggered, the 1-minute timer starts, and tracking of the larva begins. I can see the centroid updating frame by frame, and I can also see that the fish itself is being tracked correctly. However, nothing changes on the projector side, and no dot ever appears. At this point I’m having trouble figuring out where in the workflow the problem might be.
Centroid is being tracked continuously:


Fish is being tracked continuously:
An example of X coordinate being tracked continuously:

One last thing I can add is that I already checked each "Update Uniform" node to make sure the "Shader Name" matches the name defined in the "Shader Resources" node in the main workflow.
I still haven’t finalized the size, speed, or exact shape of the dot, which I assume are controlled by the "Expression Transform" lines of code, but those are things I can adjust later. At this stage, I would mainly be happy just to get the dot to appear at all.
I’d also be happy to provide any additional screenshots or explanations if that would help.
Thank you so much,
Almog Goresh.
Beta Was this translation helpful? Give feedback.
All reactions