Effects of Optic Flow on Electrocortical Dynamics During Walking and Stepping Over Virtual Obstacles Authors: Marco A Bühler, Joyce Fung, Anouk Lamontagne Published: 2026 ABSTRACT ABSTRACTSuccessful obstacle avoidance relies on complex visuomotor processes. Although optic flow provides critical information about self‐motion and object motion, the neural mechanisms underlying its role during obstacle avoidance remain largely unexplored. To address this gap, we developed a treadmill‐based virtual reality paradigm to investigate cortical dynamics during obstacle avoidance performed with and without optic flow. Accordingly, 24 healthy adults walked on a treadmill and stepped over virtual obstacles in two environments: one with optic flow (textured walls/ceiling) and one without. Electroencephalography data were recorded, decomposed with independent component analysis, and clustered within the sensorimotor, parietal, and occipital regions. Time‐frequency power was compared across conditions in the theta, alpha, and beta bands. Results revealed transient theta synchronizations shortly after obstacle presentation and before obstacle clearance were observed in all regions and conditions, together with sustained alpha/beta desynchronizations throughout the planning phase. Optic flow enhanced pre‐obstacle alpha desynchronizations and uniquely induced sustained occipital theta synchronization in the same period. These modulations in electrocortical activity in the optic flow condition before obstacle presentation likely reflect responses associated with self‐motion, whereas its persistence after obstacle presentation suggests a shared contribution of self‐ and object‐motion processing. Sensorimotor alpha power decreased after obstacle presentation, indicating increased engagement in motor planning. Together, these findings demonstrate that optic flow shapes electrocortical dynamics during obstacle avoidance by eliciting distinct neural signatures associated with visual motion processing and motor planning.Keywords: electroencephalography, locomotion, obstacle avoidance, optic flow, time‐frequency analysis Abbreviations 10‐Meter Walk Test Centre For Interdisciplinary Research in Rehabilitation of Greater Montreal crossing time electroencephalography event‐related spectral perturbation event‐related potential functional magnetic resonance imaging independent component analysis independent component left sensorimotor cortex Montreal Neurological Institute no optic flow occipital cortex optic flow posterior parietal cortex power spectral density right sensorimotor cortex region of interest virtual reality Introduction Ambulating in community environments is fundamental to functional mobility and quality of life (Lord et al. 2004). Obstacle avoidance is one of the main challenges encountered during community ambulation and is essential for preventing falls and ensuring safe mobility (Shumway‐Cook et al. 2002; Kovacs 2005). The challenge is greater for the elderly (Kovacs 2005; Caetano et al. 2016) and for individuals with neurological conditions such as stroke (Said et al. 2008; Darekar et al. 2017), traumatic brain injury (Vallée et al. 2006), or Parkinson's disease (Mustile et al. 2023), who often experience difficulties when avoiding obstacles, substantially limiting their ability to access community environments safely. Successfully avoiding obstacles during locomotion involves perceiving obstructions (Cutting et al. 1995), planning locomotor adjustments (Gérin‐Lajoie et al. 2005), and executing these adjustments in a timely and coordinated manner (Weerdesteyn et al. 2004). Obstacle avoidance thus involves a sophisticated integration of sensory inputs and motor commands, with vision playing a central role (Patla et al. 1991; Cutting et al. 1995; Fajen and Warren 2003). Indeed, vision provides spatial information about the surrounding environment that pedestrians use to identify potential hazards and plan effective locomotor adaptations (Renner et al. 2013; Waller and Hodgson 2013). Given the central role of vision in informing locomotor adjustments, examining its neurophysiological mechanisms during obstacle avoidance will enhance our understanding of the deficits present after neurological conditions and guide the development of targeted rehabilitation strategies to enhance community ambulation. Although vision is indeed central to obstacle avoidance, perceiving object motion independently from self‐motion is a challenge for the visual system (Warren and Rushton 2009; Mayer et al. 2021). This is because all visual motion projected on the retina (i.e., retinal flow) may be a product of self‐motion (i.e., optic flow [OF]), object motion, or a combination of both (Warren and Rushton 2009; Mayer et al. 2021). The proposed mechanism by which the visual system solves this perceptual problem is referred to as flow parsing (Warren and Rushton 2009). According to this theory, the visual system integrates visual, vestibular, and somatosensory information and decomposes the retinal flow into self‐ and object‐motion components (Warren and Rushton 2007, 2009; Foulkes et al. 2013; Mayer et al. 2021). Current evidence indicates that during walking, flow parsing has a primary role in perceiving object motion (Rushton et al. 2018). Neuroimaging studies using functional magnetic resonance imaging (fMRI) have identified brain areas in the occipital, parietal, and temporal cortices that may contribute to flow parsing (Pitzalis et al. 2013, 2019; Field et al. 2020). Accordingly, these studies demonstrate that neural activity in the midline parieto‐occipital region, particularly visual area V6, is enhanced in response to visual stimuli containing both self‐motion and object motion (Pitzalis et al. 2013, 2019). Conversely, regions such as the medial temporal and medial superior temporal areas show greater neural activity in response to local and global motion, respectively (Duffy and Wurtz 1997; Wall et al. 2008; Elder et al. 2009). Furthermore, the ventral intraparietal area seems to integrate visual information about self‐motion with inputs from other sensory modalities to support spatial awareness and guide motor responses (Pitzalis et al. 2019; Field et al. 2020). Although these findings provide valuable insights into the neural mechanisms underlying visual perception, they were obtained under experimental conditions in which visual formation about self‐motion was presented to observers who remained stationary and seated. This setup thus introduces a sensory conflict between visual, vestibular, and proprioceptive inputs, potentially limiting the generalizability of the results to real‐world locomotion. Mobile electroencephalography (EEG) is a promising neuroimaging technique for examining the neural dynamics of OF during locomotion and obstacle avoidance. To date, research in this field has demonstrated that compared with standing, walking overground or on a treadmill is associated with a sustained desynchronization of the alpha (8–13 Hz) and beta (14–30 Hz) rhythms across the premotor, sensorimotor, and parietal regions. During obstacle avoidance, a single burst of delta (1–3 Hz), theta (4–8 Hz), and alpha synchronization has been observed in parietal, central, and frontal areas following obstacle presentation (Nordin et al. 2019; Mustile et al. 2021). Beyond these modulations observed during steady‐state walking and obstacle avoidance, mobile EEG studies have demonstrated that visual information exerts a profound influence on electrocortical activity during walking. Specifically, studies have reported greater alpha and beta desynchronization across regions of the dorsal visual stream (Hebart and Hesselmann 2012) in response to visual cues related to self‐motion (Wagner et al. 2014; Malcolm et al. 2018; Cao and Händel 2019). For instance, providing visual feedback via a non‐immersive virtual reality (VR) avatar to robot‐assisted treadmill walking enhances alpha and beta desynchronizations in the premotor and parietal regions (Wagner et al. 2012). Additionally, when compared with standing, overground walking resulted in an alpha desynchronization in the occipital cortex (Cao and Händel 2019). Regarding the effect of OF, Malcolm et al. (2018) demonstrated that viewing a 3D projection simulating OF (i.e., a field of stars) while walking leads to alpha‐ and beta‐band desynchronizations over the supplementary motor area, parietal cortex, and bilateral occipital cortices, indicating greater cortical engagement in visuomotor integration under this more natural visual condition. Together, these findings highlight how visual information shapes electrocortical activity, particularly in the sensorimotor, parietal, and occipital regions. However, these studies have typically employed experimental setups involving walking either with or without OF, used projection screens or computer monitors to display visual information about self‐motion, and have not examined cortical activity in the parieto‐occipital midline, a region believed to play a central role in the perception of self‐motion and object motion (Fattori et al. 2009; Pitzalis et al. 2013, 2019). To address these knowledge gaps, we used immersive VR to deliver a more natural visual simulation of OF during treadmill walking. This approach involved a mobile EEG setup and a VR‐based obstacle stepping task to compare electrocortical activity during obstacle avoidance in two virtual environments, one with OF and one without OF (NOF). This setup allowed us to assess how OF modulates electrocortical during obstacle avoidance, bridging the gap between mobile EEG research conducted during treadmill walking without OF and real‐world overground locomotion with OF and offering new insights into the neural mechanisms of obstacle avoidance. Given the reported modulations in sensorimotor, parietal, and occipital electrocortical activity induced by manipulations of visual information (Wagner et al. 2014; Malcolm et al. 2018; Cao and Händel 2019), we hypothesized that in the OF condition, a sustained alpha and beta desynchronization in the parietal and occipital regions would be present before obstacle presentation, reflecting the processing of visual information about self‐motion. After obstacle presentation, the combined effects of self‐motion and object motion in the OF condition would lead to greater desynchronization in both regions. In the NOF condition, alpha and beta desynchronizations would begin exclusively after obstacle presentation and to a lesser extent when compared with the OF condition. In the sensorimotor region, sustained alpha and beta desynchronizations are expected to appear only after obstacle presentation in both conditions, reflecting sensorimotor processes related to planning and executing locomotor adaptations as opposed to perceiving self‐motion or object motion. In the theta frequency range, we hypothesize that transient synchronization would occur in all cortical regions without substantial changes across OF and NOF conditions, which was based on previous evidence highlighting that manipulations of visual information while walking elicit electrocortical modulations primarily in the alpha and beta frequencies. Methods Participants This study was approved by the Research Ethics Board in Rehabilitation and Physical Disability of the Centre for Interdisciplinary Research in Rehabilitation of Greater Montreal (CRIR). Before participating, all individuals provided their written informed consent. Participants were recruited via an advertisement on CRIR's website and through word of mouth at the Jewish Rehabilitation Hospital and McGill University. To be eligible, participants had to be between 18 and 35 years old, right‐handed (as assessed by the Edinburgh Handedness Inventory), with intact cognition (Montreal Cognitive Assessment score > 25) and corrected visual acuity of logMAR score ≥ 0.4 (EDTRS eye chart), meeting the minimum threshold for holding a driver's license in Quebec. Exclusion criteria included a self‐reported history of rheumatologic, orthopedic, or neurological conditions affecting locomotion, a diagnosis of diabetes, lower limb or lower back pain, or any condition affecting visual perception. Twenty‐five participants were recruited, but one was excluded for not completing the experiment due to a headache that was likely caused by the VR simulation and head pressure applied by the VR headset and EEG cap. The final sample consisted of 24 participants with an equal male‐to‐female ratio. Experimental Procedure The experiment was conducted at the Virtual Reality and Mobility Laboratory located at the Jewish Rehabilitation Hospital, a research site of CRIR. Participants attended a data collection session lasting approximately 4 h. During the same session, participants completed three experiments that examined changes in electrocortical activity during obstacle stepping under different task conditions. The present study presents findings from an experiment that manipulated the availability of OF, which all participants completed first. Before initiating the experimental setup and data collection, the informed consent form was explained and signed. Participants then completed a questionnaire to confirm their eligibility. This questionnaire contained questions regarding the inclusion and exclusion criteria outlined in the previous section. Next, their comfortable walking speed was assessed using the 10‐Meter Walk Test (10MWT), followed by the collection of anthropometric measurements, which included body segment length and width, using metric tape and a caliper. On average, participants were 26.96 years old (SD = 3.58), 1.69 m tall (SD = 0.1), weighed 68.59 kg (SD = 10.35), and walked at a comfortable walking speed of 1.51 m/s (SD = 0.19). Participants were then fitted with 39 passive reflective markers placed on specific body landmarks according to Vicon's Plug‐in Gait model (Vicon Motion Systems Ltd., United Kingdom) for motion capture. Their anthropometric measurements were then entered into the Vicon Nexus software, and the same software was used to record full‐body kinematics from 12 Vicon Vantage V5 cameras at a sampling rate of 120 Hz. For the acquisition of electrocortical activity data, participant's head circumference was first measured to determine the appropriate EEG cap size (actiCAP snap, Brain Products LLC). A total of 64 Ag/AgCl actiCAP slim electrodes (Brain Products LLC) were inserted into the EEG cap with their placement following the international 10–20 system. To provide additional support to the EEG sensors, a surgical bandage wrap (Surgilast) was placed over the participant's head, and electrode cables were bundled with an athletic wrap. Cables were then connected to an actiCHamp Plus amplifier (Brain Products LLC) and to a computer running the BrainVision Recorder software. While monitoring electrode impedance using the same software, a high‐viscosity conductive gel was then inserted into the opening of each electrode to reduce impedance below 10 kΩ. EEG data were sampled at 500 Hz, band‐pass filtered between 0.01 and 250 Hz, and referenced to the FCz channel. After completing the equipment setup, participants performed an obstacle‐stepping task in VR. The task involved walking on a fixed‐speed treadmill while wearing an HTC VIVE Pro Eye headset to visualize the virtual scene. Figure 1 displays a photograph of one participant with the motion capture, EEG, and VR set up while walking on the treadmill. Picture showing a participant performing the obstacle stepping task during treadmill walking in virtual reality. The picture also shows the setup of all instruments used in the experiment. Two virtual environments were developed using Unity Game Engine 2019 (Unity Technologies) to manipulate the presence of visual information about self‐motion during treadmill walking. Both environments featured a virtual hallway with walls and ceilings in similar shades of gray. The key difference between the environments was in the floor and walls, which had a “honeycomb” texture in the OF condition, whereas non‐textured environment was used in the NOF condition (Figure 2). In both environments, the headset's position within the virtual environment was set to advance forward at the same rate as the treadmill (1.3 m/s), which generated an expanding radial flow exclusively in the OF condition. In‐engine screenshots taken from the Unity software representing a virtual environment with optic flow (A) and a virtual environment without optic flow (B). While standing on the treadmill and immersed in either virtual environment, participants were instructed to place their left hand on the treadmill's rail for light support, which provided them with a spatial reference and aided with balance. Each trial began with a 40‐s standing phase, during which participants maintained a still and relaxed posture while minimizing eye blinks and jaw clenching. In sequence, a green circle appeared at the center of the participants' field of view, signaling them to prepare for walking. At this point, the experimenter activated the treadmill and gradually increased the speed to 1.3 m/s. Simultaneously, the virtual scene viewed in the VR headset was seen as moving forward until reaching the same speed as the ambulator. The speeds of the treadmill and virtual scene were then synchronized and remained constant throughout the task. During this period of state–state walking, participants walked for 40 s. Next, the obstacle stepping period began. At this point, a red cylinder would appear on the ground at irregular intervals (i.e., 6–8 s). To elicit a substantial gait adaptation (MacLellan and McFadyen 2010) without prompting participants to contemplate a circumvention strategy (Patla et al. 1991), cylinder height was set to 16 cm, which is 20% of the average leg length in adults (Wadsworth et al. 2002). Upon clearing 30 obstacles, the obstacle stepping period was completed. This period was followed by 20 s of steady‐state walking. In sequence, a red circle appeared in the center of the participant's field of view. This visual cue signaled participants to prepare for slowing down as the experimenter was about to start bringing the treadmill to a stop. Another period of quiet standing then began, and it lasted for another 20 s. After this period, the trial was concluded. Before either the OF or NOC trials, participants completed two practice trials that were shorter versions of the respective experimental conditions (~3 min). This procedure was implemented to familiarize participants with the upcoming task condition. In total, participants performed two trials in each environment. This resulted in 60 NOF obstacle interactions and 60 OF obstacle interactions. The diagram displayed in Figure 3 provides a visual summary of the trial structure described above. Upon completion of all trials, participants completed two single‐item questionnaires that inquired about VR related feelings of motion sickness (Fast Motion Sickness Scale) (Keshavarz and Hecht 2011) and presence (Bouchard et al. 2004). Diagram summarizing the obstacle stepping task trial structure. As depicted in the figure, each trial began and ended with a quiet standing period. A steady‐state walking period took place after the first and before the final quiet standing periods. In between these periods, participants performed 30 obstacle interactions that occurred with a 6–8‐s interval. The “start” and “end” time stamps of each phase, along with the timing of obstacle appearances, were recorded by the VR program. To synchronize the data from all systems (e.g., VR, motion capture, and EEG), trial event information was transmitted from the VR program to the other systems. For motion capture data synchronization, trial event information was sent to one of VICON's analog channels via a signal containing spikes of varying amplitudes for each trial event, which was performed using a LabJack U3 series (LabJack Corporation, United States). Synchronization of the EEG system was achieved by transmitting trial event information from the VR computer to BrainVision recorder via an EEG TriggerBox (Brain Products LLC). Data Preprocessing Kinematic Data Preprocessing The analysis of participants' kinematic data began with the reconstruction and labeling of marker trajectories using the Vicon Nexus software. Gaps in labeled trajectories were then filled using standard procedures available in the same software. In sequence, preprocessed 3D marker data were imported into MATLAB (version 2024b) for further analysis using custom‐made scripts. First, a fourth‐order Butterworth low‐pass filter with a 10‐Hz cutoff frequency was applied to all markers' trajectory data. Second, the data were then segmented into epochs based on the analog signal from the VR program, starting 1 s before and ending 5 s after obstacle presentation. From each epoch, we extracted the outcome measures below to characterize locomotor adaptations implemented to step over the obstacle: crossing time—the interval between obstacle presentation and the moment the leading limb's toe marker crossed the obstacle; minimum clearance—the shortest Euclidean distance between the leading limb's toe marker and the obstacle; foot proximity—the Euclidean distance between the leading limb's toe marker and the obstacle when the trailing limb landed before leading limb clearance; foot height—the maximum vertical displacement of the ankle marker. These outcomes allowed us to quantify critical spatiotemporal parameters involved in the gait adaptations necessary to ensure obstacle avoidance. EEG Data Preprocessing Concerning EEG data, analysis was conducted in MATLAB (version 2024b) with custom‐made scripts that incorporated functions from EEGLAB 2024.0 (Delorme and Makeig 2004) and the BeMoBIL Pipeline v2.0.0. (Klug et al. 2022). The initial steps involved concatenating all trial data from each participant and filtering it with a 1–35‐Hz band‐pass filter, which removed slow drifts and high‐frequency noise from the raw EEG data (Haefeli et al. 2011; Klug and Gramann 2021). Additional data processing steps are described below, and they followed the standard procedures outlined in the BeMoBIL Pipeline (Klug et al. 2022). Bad channels were detected and removed using an iterative algorithm that identified segments of channel data in which the correlation with nearby channels was below 0.8 more than 30% of the trial. This process resulted in an average of 5.54 ± 3.22 channels removed. Data were then re‐referenced to an average reference, and the FCz channel was reintroduced. Preprocessing continued with independent component analysis (ICA) using the adaptive mixture independent component analysis (AMICA) algorithm. Settings used in the AMICA algorithm followed recommendations for mobile EEG experiments (Klug and Gramann 2021; Klug et al. 2022). Briefly, the data fed into AMICA were high‐pass filtered at 2 Hz (cutoff: 2.25 Hz, filter order: 1650), and while computing the ICA model, data points with a log‐likelihood exceeding three standard deviations were rejected. After ICA decomposition, independent components (ICs) were classified using the ICLabel EEGLAB plugin (Pion‐Tonachini et al. 2019), and components identified as being generated by eye movements with a probability > 90% were removed. Next, source localization was performed using a dipole fitting model, as implemented in the DIPFIT EEGLAB plugin. This process first involved aligning standard electrode locations to the MNI standard brain and modeling electrical conductivity across the scalp, skull, cerebrospinal fluid, and brain using a four‐layer boundary‐element model. In sequence, a single equivalent current dipole was fitted to each IC. Only ICs with a dipole located within the brain and explaining more than 85% of the IC scalp topography were retained for further analysis. The last step involved clustering ICs using a k‐means algorithm. A separate k‐means clustering analysis was performed to identify groups of ICs for each the following regions of interests (ROIs): left sensorimotor cortex (l‐SMC; MNI coord: −36, −19, 48), right sensorimotor cortex (r‐SMC; MNI coord: 40, −18, 45), posterior parietal cortex (PPC; MNI coord: 0, −50, 60), and occipital cortex (OC; MNI coord: 0, −75, 15). These ROIs were selected to reflect the visuomotor computations underlying obstacle stepping across different OF conditions. Before running this algorithm, the data were segmented into epochs starting 1 s before obstacle presentation and ending 5 s after obstacle presentation. The dipole location, scalp topography, power spectral density (PSD), and event‐related potential (ERP) were then computed for each IC and used to create a matrix of IC features. This matrix served as input to a k‐means algorithm configured to compute 15 clusters (k = 15). Because ICs were assigned to clusters based on feature similarity, not every participant necessarily contributed an IC to every ROI cluster. Considering that k‐means clustering may not always converge to the optimal solution due to random initialization, we applied the repeated clustering approach proposed by Klug et al. (2022). Across 100 iterations, this method identified, for each ROI, solution that maximized the number of ICs from unique subjects while minimizing normalized spread, residual variance, and distance from the ROI. To examine differences in electrocortical activity between our experimental conditions (OF and NOF), single‐trial spectrograms were computed for each IC assigned to a given cluster. These spectrograms were time‐warped in two intervals using linear interpolation. The first interval spanned from obstacle presentation to the median foot proximity time, whereas the second extended from the median foot proximity time to the median crossing time. This procedure temporally aligned the time points corresponding to foot landing before the obstacle and foot crossing over the obstacle across all trials and participants. Sequentially, these time intervals represent the planning and clearance phases of obstacle avoidance (Mohagheghi et al. 2004). To obtain relative changes in cortical activity, the average baseline log spectral power of the NOF condition was computed for each IC (between 1000 and 100 ms before obstacle presentation) and subtracted from the single‐trial spectrogram of both conditions. This procedure enabled visualization of spectral changes associated with neural processes supporting obstacle avoidance and OF processing. Lastly, for each experimental condition, ERSP plots were averaged across each IC. Statistical Analysis To contrast kinematic measures describing participants' obstacle avoidance responses, a generalized estimating equations (GEE) model was used. The model included one within‐subject factor: task condition (two levels: OF and NOF). Statistical analyses were performed using SAS 9.4 (SAS Institute Inc., United States), specifying an exchangeable correlation structure to account for within‐subject correlations across repeated measures. The threshold for statistical significance was set at p < 0.05. To compare differences in electrocortical activity between task conditions (OF versus NOF), a nonparametric, cluster‐based permutation test was performed. This statistical approach accounts for the multiple comparisons problem inherent in time‐frequency EEG data by identifying clusters of continuous time–frequency points exhibiting consistent differences between conditions, rather than evaluating each point individually. The test was implemented using the Monte Carlo method, which involved randomly shuffling condition labels across trials 4000 times to create a distribution of cluster‐level statistics under the null hypothesis. Clusters were formed by thresholding t‐statistics at the sample level, and their significance was evaluated against the maximum cluster‐level statistic from each permutation. All analyses were conducted using the FieldTrip Toolbox (Oostenveld et al. 2011), integrated within EEGLAB, and the cluster‐level alpha was set to 0.05 to determine statistical significance. Results Despite the complexity of the experimental task, all participants completed the task successfully without any collisions. Participants reported average scores (± 1 SD) of 4 ± 4 out of 20 on the fast motion sickness scale and a perceived rating of 5.9 ± 1.7 out of 10 on the single‐item presence questionnaire. To describe participants' clearance over the obstacle, four kinematic measures were derived from our motion capture data. Results are summarized in the bar plots displayed in Figure 4. The GEE model did not reveal significant differences between the conditions for crossing time (Χ 2 (1, 24) = 1.31, p = 0.25), foot proximity (Χ 2 (1, 24) = 1.41, p = 0.23), and foot height (Χ 2 (1, 24) = 3.11, p = 0.07). However, a significant difference in minimum clearance was observed (Χ 2 (1, 24) = 8.08, p < 0.004), with participants maintaining a significantly larger distance in the OF versus NOF condition (0.02 cm). Bar plots representing the average + standard error for each kinematic outcome describing participants' clearance over the obstacle. *p < 0.05. To characterize patterns of electrocortical activity across task conditions, ICs were grouped into four ROI using a repeated k‐means clustering algorithm. Briefly, the algorithm revealed that for all ROIs, the resulting clusters included ICs from more than two‐thirds of the participants and exhibited a residual variance of less than 6%, indicating a robust representation across the sample and good fit of the equivalent current dipole model. To help visualize the clustering results, the mean scalp projection and dipole locations of each cluster are displayed in Figure 5. Clusters of independent components for each ROI. The top row shows the mean scalp projection for each cluster. The middle and bottom rows show that the equivalent current dipole locations for each independent component included in the cluster are represented by blue spheres, and a red sphere represents the cluster centroid. The middle row displays a transverse view and the bottom row a sagittal view. Obstacle avoidance during walking in the OF and NOF conditions resulted in considerable spectral power modulations in all frequency bands examined in the current study. These results are presented in the grand average ERSP plots displayed in Figure 6. ERSPs time‐warped using gait events corresponding to the planning and clearance phases of obstacle avoidance. For the former, ERSPs were time‐warped between the time of obstacle presentation (first vertical dotted line) and the last heel strike before obstacle crossing (second vertical line). For the latter, ERSPs were time‐warped between the last heel strike before obstacle crossing (second vertical line) and the moment the leading limb's toe marker crossed the obstacle (third vertical dotted line). The figure displays the results for each cluster (l‐SMC, r‐SMC, PPC, and OC) with the OF condition in the first row, NOF condition in the second row, and the difference between the two conditions in the third row. For visualization, cluster ERSP data displaying nonsignificant differences (p > 0.05) across task conditions are shown with a gray transparency effect. Significant differences (p < 0.05) were displayed without any transparency. All cortical clusters exhibited an early phasic synchronization in the theta frequency band. This activity began after obstacle presentation and lasted for approximately 500 ms. In the parietal cluster, this synchronization was stronger in the NOF condition, whereas in the occipital cluster, it was stronger in the OF condition. Just before toe clearance, a second phasic theta synchronization of similar duration was also observed in all clusters. Although this theta activity did not differ significantly between conditions in the sensorimotor and parietal clusters, in the OC cluster, it was significantly stronger in the OF condition. Additionally, occipital theta activity showed a distinct pattern of sustained synchronization compared with other clusters, with a significantly stronger theta activity in the OF compared with the NOF condition through most of the ERSP epoch. The only exception was a brief interval immediately after obstacle presentation. Alpha activity displayed modulations across all cortical clusters and task conditions. In the l‐SMC cluster, a sustained alpha desynchronization emerged approximately 1000 ms after obstacle presentation in both conditions. In the r‐SMC cluster, a sustained alpha desynchronization was observed during the planning phase of obstacle avoidance, with similar amplitude across conditions. However, in the OF condition, it was also present before obstacle presentation and during obstacle clearance. In the parietal and visual clusters, sustained alpha desynchronization started early, ~200 ms after obstacle presentation. Our analysis revealed two periods in which alpha desynchronization in the OF condition was significantly stronger than in the NOF condition. These periods occurred before obstacle presentation and at the end of the planning phase of obstacle avoidance. This stronger desynchronization in the OF condition began approximately 1 s before obstacle clearance in the PPC cluster and about 1.5 s before clearance in the OC cluster. Regarding the beta frequency range, our analysis revealed sustained desynchronization in all clusters, following a pattern similar to that described for the alpha frequency. Comparisons between task conditions did not reveal significant differences for the clusters located in either the left or right sensorimotor areas. However, in the parietal and visual clusters, significantly stronger beta synchronizations were present in the baseline period and before obstacle clearance. Discussion The present study describes the changes in electrocortical activity associated with obstacle avoidance with and without OF. To achieve this, a VR treadmill walking task was developed to present obstacles in two virtual environments, one with OF and another without. Under these task conditions, 24 healthy young participants were tasked with stepping over virtual obstacles during continuous walking. All participants completed the task successfully with no major symptoms of motion sickness and a moderate sense of presence in VR. The results obtained in the present study highlight electrocortical modulations in the theta, alpha, and beta frequency bands across sensorimotor, parietal, and visual regions associated with the availability of OF and obstacle avoidance. These findings provide new insights into the neural dynamics supporting obstacle avoidance in different visual contexts. In the paragraphs below, we discuss our kinematic and EEG findings and, based on previous studies, propose associations with neural mechanisms of locomotor control. Kinematics Our kinematics results indicate similar avoidance behaviors between flow conditions. Concerning crossing time, this outcome measure enabled us to quantify variations in the time available for obstacle avoidance that could arise from participants' movements along the length of the treadmill belt. Additionally, this outcome was used to time warp single EEG epochs using the median crossing time across all trials. The similarity between conditions indicates that while participants could have modulated the time available between obstacle presentation and clearance by reducing or increasing their walking speed, crossing time remained consistent across OF conditions. Similar foot proximity and foot height between conditions further suggest that despite differences in visual stimuli across flow conditions, the sensorimotor system was able to properly account for them and maintain a consistent performance. In contrast with the other kinematic outcomes, minimum clearance did show a small (~2 cm) but statistically significant increase in the OF condition. This finding is in contrast with a previous study that reported a 4‐cm increase in minimum clearance when stepping over obstacles during overground walking with limited information from OF (i.e., static visual sampling) (Menuchi and Gobbi 2012). It was postulated that the stroboscopic light used to restrict OF in this experiment might have caused a visual disruption and altered distance perception, leading to a more conservative avoidance strategy (Patla et al. 1991; Menuchi and Gobbi 2012). In our paradigm, we argue that the NOF condition did not constitute a visual disruption, as the VR manipulation only involved altering the wall textures of the virtual environment rather than introducing a more disruptive stimulus such as a stroboscopic light. Moreover, the absence of OF in the NOF condition reflects what is typically experienced during standard treadmill walking. Therefore, we propose that the more conservative avoidance strategy executed in the presence of OF may reflect a greater demand on cortical resources due to the need to process visual information about self‐motion and object motion to guide a locomotor adaptation. EEG Theta Oscillations Consistent with our hypothesis, EEG results revealed that obstacle presentation elicited a short burst of theta‐band synchronization across all cortical clusters. This activity was larger in the OF condition in the occipital cluster and larger in the NOF condition in the parietal cluster, highlighting that OF influences early cortical responses in the visual processing and sensorimotor integration areas. Previous mobile EEG studies have described similar bursts of theta band synchronization during obstacle avoidance (Nordin et al. 2019; Mustile et al. 2021). However, the conclusions from these studies were slightly different. Nordin et al. (2019), reported a single burst of low‐frequency synchronization in the sensorimotor and parietal regions, occurring approximately 200 ms after obstacle presentation during treadmill walking. Drawing from the work of Drew and Marigold (2015), which described cortical contributions for obstacle avoidance, the authors proposed that this electrocortical activity, starting two steps before reaching the obstacle, indicates a critical point to initiate a locomotor adaptation (Nordin et al. 2019). Mustile et al. (2021), which described similar activity patterns across the frontal, central, and parietal areas, proposed a different explanation. Using an experimental design in which obstacles were either presented at a large distance (~2.3 m) or visible from the start of walking, the authors demonstrated that theta bursts emerge immediately following obstacle appearance and only when the obstacle appears unexpectedly (Mustile et al. 2021). Considering the similarities between our results and those of Mustile et al. 2021, we concur that this early theta activity reflects an anticipatory locomotor adaptation initiated upon obstacle detection (Gérin‐Lajoie et al. 2005), enabling the sensorimotor system to update the current gait plan and prepare for a precise foot placement before stepping over the obstacle (Drew et al. 2008; Drew and Marigold 2015). In this context, we propose that the larger occipital synchronization in the presence of OF reflects enhanced activity associated with perceiving both self‐motion and obstacle position. In contrast, the presence of stronger parietal synchronization in the absence of OF may suggest heightened neural processing demands when obstacle position must be estimated without visual information about self‐motion. Notably, our data also revealed an unexpected second burst of theta activity occurring after the trailing foot landed on the ground before the obstacle clearance. This second burst was also consistent across all cortical clusters, and considering the timing of this activity, the start of the clearance phase of obstacle avoidance (Mohagheghi et al. 2004), we suggest that it reflects visuomotor processes supporting leading limb clearance and subsequent leading foot placement after the obstacle (Drew et al. 2008; Drew and Marigold 2015). Interestingly, this second burst was significantly stronger in the occipital cluster during the OF condition. During this clearance phase of obstacle avoidance, the obstacle is largely outside one's field of vision during this period, and pedestrians show a tendency not to look at the obstacle during the clearance step (Patla and Vickers 1997). In this context, increased theta synchronization likely reflects neural computations supporting obstacle clearance as well as the processing of visual information about self‐motion when visual attention is focused on the path ahead. Together, these processes may contribute to the heightened occipital activity observed. Bursts of theta synchronization are well documented in mobile EEG studies and are closely linked to locomotor control. For example, theta bursts have been identified during gait initiation (Delval et al. 2018) and following balance perturbations (Peterson and Ferris 2018), whereas electrocortical activity has been shown to be modulated by gait phase during treadmill walking, with theta synchronization occurring after contralateral heel strike (Gwin et al. 2011; Roeder et al. 2018). Interestingly, visual perception performance has been demonstrated to vary systematically across the gait cycle (Davidson et al. 2024), suggesting a tight coupling between locomotor control, visual perception, and cortical dynamics. In the present study, cortical activity was averaged across phases of obstacle avoidance rather than aligned to the gait cycle. Although this approach allowed us to better characterize neural activity associated with obstacle avoidance, it limited our ability to examine gait‐cycle‐specific modulations. Nevertheless, the late theta burst observed during the clearance phase was time‐locked to the leading limb clearance step and closely resembled patterns reported in previous studies (Gwin et al. 2011; Roeder et al. 2018). Another consistent observation from mobile EEG studies is that sensorimotor theta activity scales with locomotor task demands, with stronger synchronizations observed under conditions that involve a greater challenge or physical effort (Sipp et al. 2013; Bradford et al. 2016; Luu et al. 2017; Roeder et al. 2018). In the present study, sensorimotor theta activity did not vary significantly across OF conditions, suggesting that task demands during obstacle stepping were not largely affected by OF. This assertion is partially corroborated by our kinematic outcomes, which showed that across all measures, only minimum clearance showed a small difference between OF conditions. The consistent theta burst across the sensorimotor, parietal, and occipital regions reflects a coordinated cortical activity in response to the demands of obstacle avoidance, which involves motor planning and execution (sensorimotor cortex), spatial awareness and sensory integration (parietal cortex), and visual information processing (occipital cortex) (Drew and Marigold 2015; Marigold and Drew 2017; Pitzalis et al. 2019). Previous studies have linked these neural processes with electrocortical activity in the theta frequency range. For instance, sensorimotor theta synchronization has been associated with the execution of voluntary movements (Pfurtscheller and Lopes da Silva 1999) and motor learning (van der Cruijsen et al. 2021). Similarly, theta synchronization in the parietal and visual areas has been associated with the integration of sensory information during spatial navigation (Aghajan et al. 2017) and in modulating visual attention (Michel et al. 2022; Gallina et al. 2024). Therefore, our findings provide additional evidence that theta oscillations reflect the functional coupling of a distributed cortical network that is involved in adapting locomotion to environmental demands. Our results reveal additional and unanticipated modulations in theta activity associated with obstacle avoidance. These effects occurred exclusively in the occipital cluster and were characterized by a sustained baseline theta synchronization in the OF condition when compared with the NOF condition. Notably, significant differences between conditions were evident from the baseline period through to obstacle crossing, except for a brief interval following obstacle presentation. Although theta activity remained consistently different between conditions, its amplitude decreased in both conditions following obstacle presentation. Previous studies have linked occipital theta activity with the processing of visual information (Köster et al. 2018; Gallina et al. 2024). Additionally, fMRI studies indicate that activity in the occipital region is involved in processing complex retinal information comprised of self‐ and object‐motion components (Pitzalis et al. 2013, 2019). Therefore, we suggest that electrocortical modulations in the OC cluster reflect computations involved in retinal flow parsing (Rushton et al. 2018; Pitzalis et al. 2019). Accordingly, baseline theta synchronization in the OC cluster likely reflects neural computations involved in recovering self‐motion when this is the only motion component present in the retinal flow. Following obstacle presentation, the observed decrease electrocortical activity suggests increased cortical engagement associated with processing both self‐motion and object motion (Warren and Rushton 2009). Therefore, our results support the previously described notion that activity in the occipital region reflects the processing of complex retinal visual information composed of both self‐ and object‐motion components (Pitzalis et al. 2019). Alpha and Beta Oscillations Across OF conditions and cortical clusters, electrocortical activities in the alpha and beta frequencies were characterized by sustained desynchronizations. These findings align with our hypothesis and indicate widespread cortical involvement in visuomotor control during walking and obstacle avoidance. Several mobile EEG studies have consistently reported similar desynchronization across the sensorimotor, parietal, and visual areas (Pfurtscheller and Lopes da Silva 1999; Wagner et al. 2014; Bulea et al. 2015; Lisi and Morimoto 2015; Oliveira et al. 2017; Malcolm et al. 2018; Cao and Händel 2019; Nordin et al. 2020). For instance, alpha power in the sensorimotor region was shown to decrease during walking compared with stationary conditions, and the extent of this desynchronization seems to vary according to locomotor demands (Bulea et al. 2015; Lisi and Morimoto 2015; Oliveira et al. 2017; Nordin et al. 2020). Additionally, parietal alpha power decreases when walking with visual feedback (Wagner et al. 2014) or in the presence of OF (Malcolm et al. 2018), highlighting the role of alpha activity in this region on neural computations that support sensorimotor integration. Lastly, occipital alpha activity also decreases during overground walking relative to standing, a change that occurs together with an increase in enhanced peripheral visual perception (Cao and Händel 2019), suggesting an association between occipital alpha desynchronization and the neural computations that support visual perception. Concerning the sensorimotor region, it is widely recognized that alpha and beta desynchronizations over this area represent an electrophysiological marker of cortical engagement in motor execution (Pfurtscheller and Lopes da Silva 1999; Kilavik et al. 2013). Notably, these desynchronizations are predominantly observed before movement execution, suggesting a relationship with movement preparation (Pfurtscheller and Lopes da Silva 1999; Kilavik et al. 2013). In agreement with our hypothesis, a sustained alpha and beta desynchronization was observed in both SMC clusters primarily after obstacle presentation. Given that this desynchronization was observed bilaterally and became more pronounced from the planning to the clearance phase, we propose that this electrocortical activity reflects processes related to motor planning and execution (Patla 1997; Pfurtscheller and Lopes da Silva 1999; Gérin‐Lajoie et al. 2005). Moreover, this progressive increase in activity likely reflects the motor system's preparation for an upcoming locomotor adaptation, guided by parietal inputs that encode the individual's relative distance to the obstacle (Drew et al. 2008). In the parietal and visual areas, sustained alpha and beta desynchronizations provide additional evidence that supports their role in visual motion processing. As displayed in Figure 6, alpha and beta desynchronizations in these regions began early after obstacle presentation. This early change in electrocortical activity in these dorsal stream areas suggests neural processes related to obstacle perception (Hebart and Hesselmann 2012). However, the presence of these desynchronizations prior to obstacle presentation in the OF condition, along with the absence of condition differences following obstacle presentation, suggests that parietal and occipital activity does not reflect cortical responses specifically selective to the obstacle. Instead, these cortical oscillations seem to reflect an active state of the parietal and visual cortices when self‐motion or external motion need to be processed. Another important finding is that, before obstacle presentation and during obstacle clearance, alpha and beta activities in the parietal and occipital areas were lower in the OF condition, which is in line with our initial hypothesis. As little visual fixation occurs at the end of the anticipatory phase of obstacle avoidance (Patla and Vickers 1997), these sustained desynchronizations are likely not associated with processing obstacle motion. Because they occur exclusively in the OF condition, we propose that these desynchronizations are related to OF processing (Pitzalis et al. 2013; Field et al. 2020). Interestingly, in the NOF condition, occipital alpha desynchronization was largely absent approximately 1 s before clearance. In contrast, this activity was sustained until obstacle clearance in the parietal cluster. This pattern suggests that the occipital cortex is active primarily in the presence of visual motion, whereas the parietal cortex remains partially engaged even in a period where visual information is minimal. This finding may relate to the role of the parietal cortex in maintaining an internal representation of the obstacle's position in the absence of visual input, a process essential for guiding limb movements during obstacle avoidance (Drew and Marigold 2015). Limitations A limitation of the present study is related to motion artifacts in EEG signals generated by locomotion. The complex processing methods to remove the artifacts (Kline et al. 2015; Klug and Gramann 2021) may have impacted trials that are time warped according to gait cycle events, which is often used in analyzing electrocortical activity involved in locomotor control (Kline et al. 2015). However, our analysis used robust mobile brain imaging methods (Klug and Gramann 2021) and trials were time warped according to phases of obstacle avoidance as opposed to gait cycles, likely reducing the effect of motion artifacts derived from these gait events. Furthermore, the symmetry across cortical clusters and the lack of broadband activity provide evidence for the robustness of our data against motion artefacts. Lastly, although our analysis focused on a narrow spectral range (theta to beta frequency bands), several studies have demonstrated associations between these frequencies and neural processes involved in visuomotor control (Seeber et al. 2014; Wagner et al. 2014; Malcolm et al. 2018; Peterson and Ferris 2018; Cao and Händel 2019). We also acknowledge that our repeated clustering approach, which involved predefining ROIs, does not capture cortical activity across all brain regions. Although this method may have limited our ability to describe widespread cortical activity involved in obstacle avoidance and OF perception, extensive research supports the involvement of our selected ROIs in these processes (Wagner et al. 2014; Malcolm et al. 2018; Cao and Händel 2019; Nordin et al. 2019; Mustile et al. 2021). Additionally, this method allowed us to address the random initialization problem inherent to the k‐means clustering algorithm. Using this approach, we were able to reliably recover clusters located near each predefined ROI and composed of the maximum number of ICs from unique subjects, while also maintaining minimal normalized spread and low residual variance (Preuss et al. 2024). Furthermore, the absence of eye‐tracking data limits our interpretations regarding visual fixation behavior during obstacle avoidance. Although prior work has shown that individuals typically look straight ahead rather than the obstacle itself during obstacle clearance (Patla and Vickers 1997), we cannot confirm whether participants adopted the same gaze strategy under the present experimental conditions. This is particularly relevant given that our virtual environment and treadmill surface were highly regular and predictable, which might reduce the need for continuous visual monitoring of the upcoming terrain compared with natural walking conditions (Matthis et al. 2018). Future studies combining mobile EEG with eye tracking would help better establish how gaze behavior interacts with electrocortical dynamics during obstacle avoidance under different OF conditions. Lastly, although VR offers a powerful platform for delivering controlled visual stimuli, current systems can only approximate real‐world sensory experiences, and treadmill walking differs from overground locomotion in visual, somatosensory, and vestibular inputs. Consequently, the electrocortical dynamics observed here may not fully capture those during natural ambulation. In addition, we examined only the presence or absence of OF, without considering variations in its quality or intensity, which constrains conclusions about how distinct properties of visual motion may shape neural responses. Finally, individual differences in simulator sickness, previously associated with enhanced parietal and occipital oscillations (Yeo et al. 2022), could also have influenced the results. Nevertheless, because our analysis involved within‐subject comparisons under similar task conditions, such effects are unlikely to have systematically biased our findings. Conclusion The electrocortical modulations described in the present study highlight the central role of OF in modulating electrocortical activity during locomotor adaptations. Across the theta, alpha, and beta frequency bands, distinct activity patterns characterize cortical processing under the OF and NOF conditions. In all cortical regions, short bursts of theta synchronization indicated early cortical activity involved in preparing the motor system for an upcoming adaptation and late cortical activity supporting leading limb clearance over the obstacle. Exclusively in the visual area, theta oscillations seem to selectively respond to self‐motion and object motion. Concerning alpha and beta activity, consistent sustained sensorimotor desynchronization across flow conditions suggests a sensorimotor process involved in motor planning and execution. In the parietal and visual areas, similar desynchronizations are likely associated with both self‐ and object motion perception. Together, these findings demonstrate that OF plays a crucial role in shaping electrocortical dynamics during obstacle avoidance. They highlight the role of the sensorimotor areas in preparing for and executing locomotor adaptation and solidify the notion that neural computations in the parietal and visual cortices support visuomotor processes during obstacle avoidance. These findings advance our understanding of the neural mechanisms underlying locomotor adaptations and provide a foundational knowledge for future research into how these electrocortical dynamics may be affected in populations with mobility impairments, such as older adults and individuals living with neurological conditions. Ultimately, this line of noninvasive brain imaging research has the potential to link altered electrocortical dynamics with mobility impairments, which will inform the development of clinically meaningful measures for monitoring the effectiveness of neurorehabilitation strategies aimed at promoting neuroplasticity. Author Contributions Marco A. Bühler: conceptualization, investigation, writing – original draft, methodology, validation, visualization, software, formal analysis, project administration, data curation. Joyce Fung: conceptualization, writing – review and editing, supervision, visualization. Anouk Lamontagne: conceptualization, funding acquisition, writing – review and editing, visualization, project administration, resources, supervision. Conflicts of Interest The authors declare no conflicts of interest. Acknowledgements We would like to thank Samir Sangani for the development of the virtual environment and technical assistance and Bradford J. McFadyen and Sylvain Baillet for their feedback on experimental design and data analysis. Lastly, we are thankful to the participants who agreed to take part in the study. Marco A. Bühler was the recipient of a PhD Scholarship from the Fonds de la recherche du Québec‐Santé. This work was supported by the Natural Sciences and Engineering Research Council of Canada (RGPIN‐2022‐03746) and the Canada Foundation for Innovation (CFI‐36053). Bühler, M. A. , Fung J., and Lamontagne A.. 2026. “Effects of Optic Flow on Electrocortical Dynamics During Walking and Stepping Over Virtual Obstacles.” European Journal of Neuroscience 64, no. 6: e70694. 10.1111/ejn.70694. Associate Editor: Yoland Smith Data Availability Statement The data supporting the findings of this study are publicly available through the Federated Research Data Repository (FRDR) at https://doi.org/10.20383/103.01758. References Associated Data Data Availability Statement The data supporting the findings of this study are publicly available through the Federated Research Data Repository (FRDR) at https://doi.org/10.20383/103.01758.