Skip to content

Commit

Permalink
Cosmetic, refining changes before the release.
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard Musil committed Apr 18, 2020
1 parent fe71585 commit 2471eba
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 32 deletions.
4 changes: 2 additions & 2 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# HMDQ Tools Change Log

## 2.0.0 - xxxxx xx, 2020
## 2.0.0 - April 18, 2020
Major release which includes mainly:
* Completely redesigned internal architecture.
* Added support for Oculus runtime, which means now that Oculus headsets can be queried directly without SteamVR intervention and can provide more information than what SteamVR exposes for them.
* Added support for Oculus runtime, which means that now Oculus headsets can be queried directly without a SteamVR intervention and can provide more information than what SteamVR exposes for them.

## 1.3.90 - April 13, 2020
* Release candidate RC1 before 2.0 release.
Expand Down
53 changes: 26 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
![hmdq](docs/images/hmdq_128.png) ![hmdv](docs/images/hmdv_128.png)

# HMDQ Tools
HMDQ Tools is a set of two command line tools for some VR headsets (now supports both OpenVR and Oculus) and other hardware introspection:
HMDQ Tools is a set of two command line tools for some VR headsets and other hardware introspection with support for both OpenVR and Oculus runtimes:

## `hmdq`
is a main tool, which connects to a VR subsystem and collects all available data about the connected devices (_tracked devices_ in OpenVR world, trackers and controllers in Oculus world).
is a main tool, which connects to a VR subsystem and collects all available data about the connected devices (_tracked devices_ in OpenVR world, headsets, trackers and controllers in Oculus world).

It can either display the info in the console, or save all the collected information plus some additional calculated data to a file in JSON format.

To get some useful data, one needs to have either OpenVR or Oculus runtime installed, which means SteamVR or Oculus application and, of course, the hardware.
One needs to have either OpenVR or Oculus runtime plus the corresponding hardware installed and connected to use the tool.

## `hmdv`
is a complementary tool, whose only purpose is to process the data files created by `hmdq` and display them in more human friendly way.
is a complementary tool, whose only purpose is to process the data files created by `hmdq` and display them in a human friendly way.

Both tools use very similar command line interface. The only (major) difference is that `hmdq` reads the data it shows (and stores) from actual VR runtime, while `hmdv` reads the data from already stored file. The following paragraphs address both tools, unless it is explicitly specified otherwise.

## Installation
Get the latest binary ZIP from [releases](https://github.com/risa2000/hmdq/releases) and unzip it wherever you want to run it. The package should contain both `hmdq` and `hmdv` tools, this README file, LICENSE file, OpenVR API JSON file and some batch files for simplified execution.
Get the latest binary ZIP from [releases](https://github.com/risa2000/hmdq/releases) and unzip it wherever you want to run it. The package should contain both `hmdq` and `hmdv` tools, this README file, LICENSE file, OpenVR API JSON file and some additional files to ease the use.

## Operation
Since both tools are command line tools, it is better to run them from Windows console or any terminal (window) which supports standard I/O.
Expand Down Expand Up @@ -104,17 +104,17 @@ Options:
```

#### `geom`
Displays the headset geometry as advertised by the OpenVR subsystem to the application. It includes:
Displays the headset geometry which is normally advertised by VR subsystem to the application. It includes:

* View geometry (rendered FOVs) for each eye.
* Total stereo rendered FOVs and the overlap.
* Rotation (canting) of the panels.
* Rotation of the virtual cameras (views).
* IPD value.

Additionally to that, it also shows:

* The recommended render target resolution (for the application in whose context `hmdq` run).
* The statistics of the _hidden area mask_ (HAM) mesh (if supported by the headset).
* The recommended render target resolution.
* The size of the _hidden area mask_ (HAM) mesh (if supported by the headset).

Example (excerpt):
```c
Expand All @@ -125,13 +125,13 @@ Total FOV:
overlap: 93.45 deg

View geometry:
left panel rotation: 0.0 deg
right panel rotation: 0.0 deg
left view rotation: 0.0 deg
right view rotation: 0.0 deg
reported IPD: 63.0 mm
```

#### `props`
Prints out all different _properties_ for all currently detected _devices_. For OpenVR it includes not only the headset and the controllers, but also the lighthouses and the additional (not tracked) devices as the gamepads. The number of properties shown depends on the _verbosity_ level specified by the user, which, by default, is set to `0`.
Prints out all different _properties_ for all currently detected _devices_. For OpenVR it includes not only the headset and the controllers, but also the lighthouses and the additional (not lighthouse tracked) devices as the gamepads. The number of properties shown depends on the _verbosity_ level specified by the user, which, by default, is set to `0`.

Example (excerpt):
```c
Expand Down Expand Up @@ -173,11 +173,11 @@ You can update this file independently from the tools to let them recognize new
#### `--out_json <filename>`
When specified, all the information collected by the tool (not only what is actually displayed in the console, but all possible retrievable information), plus some additional information calculated by the tool in the process (e.g. different _FOV points_, HAM mesh optimized layout, etc.) is stored in the specified file in JSON format.

This file is mostly useful for additional processing, comparison, and future reference.
This file is mostly useful for additional processing, evaluation, and future reference.

**NOTE:** _The amount of the information stored in the file, **is not controlled by the verbosity level**. Every time the file is created, all the available information plus the additionally computed data are stored in the file. The reason for that is to have a well defined set of data, which is guaranteed to be present._

When used with `hmdv` it basically rewrites the information from the input file to the output file. It is useful to anonymize the input file or to update the data content to the latest version (see the Changelog file for the details).
When this option is used with `hmdv` it just rewrites the information from the input file to the output file. It is useful to anonymize the input file or to update the data content to the latest version (see the Changelog file for the details).

#### `-v <level>, --verb <level>`
Verbosity level of the output (to the console). There are five levels defined:
Expand All @@ -198,27 +198,29 @@ Adds as well all the properties, which are defined by the OpenVR API, but are ne
The levels can be redefined in the configuration file. The values listed above are the default ones.

#### `-n, --anonymize`
If specified, it will anonymize values in defined tracked device properties which are predefined in the default configuration (config file). Others can be added to the config file if needed.
If specified, it will anonymize values of some "sensitive" properties defined in the configuration file. Others can be added to the config file if needed.

The anonymization happens in both the console output and in the output JSON file.

This could be useful when sharing the output data in the public, without disclosing the unique identifiers.
This could be useful when sharing the output data publicly, without disclosing the unique identifiers.

The anonymized values are computed by using the secure hash function [Blake2](https://blake2.net) set with 96-bit wide output. The hash is computed over three properties: manufacturer name (#1005 `Prop_ManufacturerName_String` in OpenVR), concatenated with model name (#1001 `Prop_ModelNumber_String` in OpenVR), and finally with the incriminated value to anonymize. The manufacturer and model names are used to pre-seed the hash with distinct values, so the same serial numbers from different manufacturers will not anonymize into the same values.

#### `--openvr`
Will only show data collected from OpenVR runtime (if one is present and a headset is connected).
Will only show data collected from OpenVR runtime (if one is present and any hardware is connected).

#### `--oculus`
Will only show date collected from Oculus runtime (if one is present and a headset is connected). Both options are meant to only control the program output, but the data are logged and saved into the data file (if requested by `--out_json` option) for both.
Will only show date collected from Oculus runtime (if one is present and a headset is connected).

Both options are meant to only control the program output, but the data are logged and saved into the data file (if requested by `--out_json` option) for both subsystems.

#### `--ovr_max_fov`
Show also data for Oculus _Maximum FOV_ defined by the runtime.
Shows also data for Oculus headset _Maximum FOV_.

### Configuration
The configuration file `<tool_name>.conf.json` is always created with the default values, and can be changed later by the user. The tool will not "touch" the configuration file as long as it exists and only create a new one if none is present.

It has a consequence when updating the tool to the new version. It may happen that the new version of the tool introduces new config values, which are not present in the old configuration file, or remove some old ones. When it happens the tool will refuse to run and ask the user to manually update the configuration file.
It has a consequence when updating the tool to the newer version. It may happen that the new version of the tool introduces new config values, which are not present in the old configuration file, or remove some old ones. When it happens the tool will refuse to run and ask the user to manually update the configuration file.

One way how to do it is letting the tool to create a new (default) config file (e.g. by renaming the old one) and then manually copy any custom setting from the old config to the new one.

Expand All @@ -236,16 +238,13 @@ Configuration options:
* `geom` is the level at which all the geometry properties (displayed in `geom` command) are shown.
* `max` defines the level at which all properties _with meaningful values_ are included in the console output.
* `error` - the level which, when specified, will also display unsupported properties (with errors).
* `openvr` (only used by OpenVR runtime or when processing OpenVR data)
Sets the operational conditions related to OpenVR. Currently only one is supported:
* `app_type`
Defines how the tool initializes the OpenVR subsystem in `vr::VR_Init` call. The different application types are described [here](https://github.com/ValveSoftware/openvr/wiki/API-Documentation#initialization-and-cleanup).
* `openvr` (only used by OpenVR runtime or when processing OpenVR data)
* `app_type` defines how the tool initializes the OpenVR subsystem in `vr::VR_Init` call. The different application types are described [here](https://github.com/ValveSoftware/openvr/wiki/API-Documentation#initialization-and-cleanup).
**Note**: _Basically anything different from the default value is untested and unsupported. Putting in a wrong type can also impact the reported values. So only change it if you know what you are doing._
* `verbosity`
* `properties` defines the individual verbosity levels for listed properties. The default list is more of an example than some sophisticated choice. The number defines the minimal required verbosity level specified by the user, in order to have the property value displayed in the output.
* `properties` defines individual verbosity levels for listed properties. The default list is more of an example than some sophisticated choice. The number defines the minimal required verbosity level specified by the user, in order to have the property value displayed in the output.
* `anonymize`
* `properties` defines a list of tracked device properties which are anonymized, if requested either by the user with the command line option or by specifying the default behavior in the config file.
* `props`
* `properties` defines a list of tracked device properties which are anonymized, if requested either by the user with the command line option or by specifying the default behavior in the config file.
* `oculus` (only used by Oculus runtime or when processing Oculus data)
* `init_flags` default value for the runtime initialization.
* `verbosity` (the same as for OpenVR)
Expand Down
6 changes: 3 additions & 3 deletions hmdq/prtdata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,10 @@ void print_fov_total(const json& jd, int ind, int ts)
void print_view_geom(const json& jd, int ind, int ts)
{
const auto sf = ind * ts;
constexpr auto s1 = 22; // strlen("right panel rotation: ");
iprint(sf, "{:{}s}{:6.1f} {:s}\n", "left panel rotation:", s1,
constexpr auto s1 = 21; // strlen("right panel rotation: ");
iprint(sf, "{:{}s}{:6.1f} {:s}\n", "left view rotation:", s1,
jd[j_left_rot].get<double>(), DEG);
iprint(sf, "{:{}s}{:6.1f} {:s}\n", "right panel rotation:", s1,
iprint(sf, "{:{}s}{:6.1f} {:s}\n", "right view rotation:", s1,
jd[j_right_rot].get<double>(), DEG);
const auto ipd = jd[j_ipd].get<double>() * MM_IN_METER;
iprint(sf, "{:{}s}{:6.1f} {:s}\n", "reported IPD:", s1, ipd, MM);
Expand Down

0 comments on commit 2471eba

Please sign in to comment.