Run Any Desktop Application in Immersive VR with Eye Tracking
SightLab VR enables you to capture and display real-time content from any application or browser window directly inside your VR/AR environment. This is a powerful feature for research, teaching, and mixed reality presentations - especially if you want to run standard desktop experiments (like PsychoPy) in a virtual setting while leveraging VR and eye tracking.
Watch this example video on screencasting in SightLab VR Pro.
Python Libraries (install via Vizard IDE > Tools > Package Manager):
pip install opencv-python pillow pywin32
If casting from a browser:
Disable hardware acceleration for best compatibility (especially with Chrome):
You can capture any window interactively or specify by title from a dropdown of all open applications:
screen_capture = WindowCapture(ask_user=True, flip_code=1, record_screen=True)
Or to select a specific window:
screen_capture = WindowCapture(window_title="PsychoPy", flip_code=1, record_screen=True)
This is already added in the example environment
screen = viz.add('video_screen_object/3D_Video_Screen.osgb')
screen.texture(screen_capture.get_texture())
You can also use a custom 3D object (e.g., monitor, phone) for display.
passthrough.setEnabled(True)
viz.clearcolor(viz.BLACK, 0.0)
Best method: Open the screen object in the 3D model Inspector and scale as desired, or use keyboard controls in the script:
vizact.onkeydown('m', scaleVideoUp)
vizact.onkeydown('n', scaleVideoDown)
If record_screen=True, SightLab automatically records video for each trial:
screen_capture.start_recording()
screen_capture.stop_recording()
<timestamp>_<participantID>_experiment_data_trial_<trialNumber>.mp4
Want to include mobile phone tasks? Mirror your phone screen and capture it into VR:
Android: Use scrcpy (USB debugging on, run scrcpy on PC)screen_capture = WindowCapture(window_title="scrcpy", flip_code=1, record_screen=True)
iPhone: Use LonelyScreen for AirPlay mirroringscreen_capture = WindowCapture(window_title="LonelyScreen", flip_code=1, record_screen=True)
Attach the video texture to a phone-shaped model for immersion:phone_model = vizfx.addChild('Resources/Virtual_Screencast/smartphone.osgb')
phone_model.texture(screen_capture.get_texture())
phone_model.setPosition([0, 1.5, 1.2])
All screencast sessions are automatically recorded and can be reviewed with SightLab’s replay tools:
This makes it easy to visualize and analyze how participants interact with content—whether it’s a video, web page, or experiment interface.
With SightLab’s screencasting, you can bridge traditional behavioral experiments with the power of VR, enabling advanced gaze analytics, realistic immersion, and seamless integration of your existing tools.
For more information about how you can incorporate Worldviz VR software tools such as SightLab into your research or setting up full VR Labs and consultation contact sales@worldviz.com
To request a demo of SightLab click here