Gamma Correction

47 views
Skip to first unread message

Marcelo J. Moglie

unread,
Oct 11, 2022, 12:12:35 PM10/11/22
to Bonsai Users
Hi!!

I am trying to introduce Bonvision's screen gammacorrection on my code. When I render the frames, the correction is there but I cannot get it on the background Shader Window (Clear Color). This results in a change of luminosity between the frames I am rendering a stimuli and those in which nothing is being shown. Is there any way I can get this to work?

Kind regards,
Marcelo

eabho...@gmail.com

unread,
Nov 22, 2022, 6:53:20 AM11/22/22
to Bonsai Users
Hi Marcelo,

Would you be able to post a basic workflow demonstrating this along with your Gamma correct LUT file? I can't quite figure out what you mean by this.

Thanks,
Edd

Marcelo J. Moglie

unread,
Nov 24, 2022, 4:43:24 AM11/24/22
to Bonsai Users
Hi Edd, 

Thanks for your reply. Here you will find an example in which a white square is drawn with frequency. You'll notice than when the stim is ON, tha gamma correction is applied but during the time between stimuli the background of the shader goes back to the value without the correction. 

Many thanks,
Marcelo

background_check.bonsai
gammalut_TOP.bmp

eabho...@gmail.com

unread,
Nov 24, 2022, 9:01:26 AM11/24/22
to Bonsai Users
Hi Marcelo,

The issue was in the location of the GammaCorrection node. Since it was inside the trial SelectMany it seemed to only be active when the node was active (I'm not sure exactly on the sequence of rendering instructions).

I've attached an edited workflow that works. The main change I made was to externalise RenderFrame -> NormalizedView -> DrawStimulus (BehaviourSubject) -> GammaCorrection.

The additonal of BehaviourSubject called 'DrawStimulus' is used to provide a draw instruction for the DrawQuad node inside the SelectMany node which contains your stimulus.

Hopefully this fixes your problem
background_check_eddit.bonsai
Reply all
Reply to author
Forward
0 new messages