Welcome! Log In Create A New Profile

Advanced

Circrle objects overlapped by the movie object

Posted by Yidong_YANG 
Circrle objects overlapped by the movie object
July 28, 2023 01:01PM
Hi,

In my task, the subject will be asked to hold the central fixation while the sequences of the circle objects and movies are shown on the screen. First, there will be the avatar and the central fixation point, then two circle objects on the two sides, and then the movie of the avatar turning to one side (Please check the schema to help you understand the timing of different sequences). So the circle objects should appear before the avatar turns his head. However, we found that the circles were covered by the movie of the avatar looking straight and were only shown when the movie of the head turn started. When we set the movie graphic scaling parameter really small, we can see the circle objects. I don't know how to make the circle objects visible when the movie is of full-screen resolution.

Below is the code.

lh = LooseHold(fix);
lh.HoldTime = duration_total_fix;
lh.BreakTime = break_time;

only_fix_tc = TimeCounter(null_);
only_fix_tc.Duration = duration_only_fix; % duration of only cental fixation on the screen
gaze_LED = CircleGraphic(null_);
gaze_LED.EdgeColor = [1 1 1];
gaze_LED.FaceColor = [1 1 1];
gaze_LED.Size = target_size;
gaze_LED.Position = target_pos;
LED1 = CircleGraphic(null_);
LED1.EdgeColor = [1 1 1];
LED1.FaceColor = [1 1 1];
LED1.Size = target_size;
LED1.Position = distractor_pos;
conc1 = Concurrent(gaze_LED);
conc1.add(LED1);
conc1_tc = TimeCounter(conc1);
conc1_tc.Duration = duration_total_fix - duration_only_fix;
hold_seq = Sequential(only_fix_tc);
hold_seq.add(conc1_tc);
hold_seq.EventMarker = [FIX_START LED_ON];

mov_gaze = MovieGraphic(null_);
mov_gaze.List = { gaze_mov, [0 0], 1, [1 1]};
mov_before_gaze = TimeCounter(mov_center);
mov_before_gaze.Duration = duration_only_fix + duration_before_gaze;
mov_keep_gaze = TimeCounter(mov_gaze);
mov_keep_gaze.Duration = duration_gaze;
mov_seq = Sequential(mov_before_gaze);
mov_seq.add(mov_keep_gaze);
mov_seq.EventMarker = [NaN, GAZE_ON];
hold_conc = Concurrent(lh);
hold_conc.add(hold_seq);
hold_conc.add(mov_seq);
scene1 = create_scene(hold_conc, fixation_point);
Attachments:
open | download - schema.PNG (18 KB)
Re: Circrle objects overlapped by the movie object
July 28, 2023 02:15PM
See this post. Basically you need to change the z-order of the circles like the following.
gaze_LED.Zorder = 1;  % or any number larger than 0
LED1.Zorder = 1;

The National Institute of Mental Health (NIMH) is part of the National Institutes of Health (NIH), a component of the U.S. Department of Health and Human Services.