USE AT YOUR OWN RISK!
This is a collection of utilities for the Pimax P2 series headsets.
The python scripts require the module hidapi to be installed and apppropriate udev rules for accessing the hid device.
This script can send various commands to the headset. These include:
scaler <on|off>: only relevant for the 8K headsets that can actually run at 2x4k resolution. Switches between native and upscaled mode.hz: sent by pitool when changing the refresh rate. Unknown what it actually does.bl <brightness>: sets the brightness of the backlightbar <on|off>: enables or disables the lightbar on the fronton: default, turns on the displays, doesn't quite work for all headsets (some seem to need a slightly different sequence of commands, and there's probably a better way to do this)
Usage: python3 displays.py <command> <args>
A terminal for the headset's debug console. After using this, the headset seems to have to be rebooted to work properly over the normal HID interface again (it can be used fine if the headset it already being used by monado).
Some known commands:
debug hid: outputs the log from the headset over the HID interfacehelporHELP: prints the help, orhelp <command>for a specific commandBRIGHT <percentage> <percentage>: sets the backlight brightness
Arguments for some commands seem to be case sensitive, and the help seems to be incomplete or sometimes wrong. Figuring out more commands could be done from a firmware image.
This is the distortion mesh dumper. Building it requires the Pimax PVR SDK (can be downloaded from their website) and cmake. The build process is just a standard cmake build.
A mesh has to be dumped for each display resolution that is used. If you're just using it yourself, dumping only what you use is fine. If you're dumping a mesh to submit it to the mesh repository, please ideally dump for all display resolutions the HMD supports. These are easiest to find by looking at the EDID of the headset, and can be indirectly selected by changing the refresh rate in PiTool (not all refresh rates use different resolutions).
To dump a mesh, launch PiTool or Pimax Play, make sure parallel projection is disabled and ideally set any display offsets to 0. Then:
- Set the IPD on your headset to one extreme
- Launch the dumper
- Slowly move the IPD through the whole range. Distortion values will be captured every 2mm.
- Once done, stop the dumper (press CTRL+C most of the time). There should be a file called
meshDump.json. If you're dumping for more than one resolution, move or rename this file and start again at step 1 with the next resolution. - After dumping all the meshes with the dumper, convert them using
meshconvert_json.py, see the help from the script for usage. Note: The resolutions passed tomeshconvert_json.pyare not the whole display resolution, but the resolution of just one eye, which is generally the reported display resolution with the width halved and rotated by 90° (so a reported 4320x3168 would be 3168x2160).