-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide a JSON schema for the hmdq json output #4
Comments
I believe you can, for the sake of having JSON schema, generate one from the actual data file. At the beginning the JSON format changed several times, but I believe the last time it happened was when I added support for Oculus runtime. The next big change probably will come with OpenXR. On the other hand, for example the list of properties recorded in OpenVR section is generated from OpenVR definition file (which may add or drop a property as needed), so should be considered non-reliable (apart from model and manufacturer name, which are used for rendering of visualizations in HMDGDB). If you need a "canonical" format I would suggest writing a simple translator to your JSON format, which hopefully could skip all the irrelevant info and also simplify the implementation of the additional processing as you probably would not need the data which differ between different runtimes (OpenVR and Oculus). On the other hand, the data related to the view geometry should be stable enough, so you could use them as a template (at least until OpenXR which may introduce multiview) for you schema. |
A schema file would still be prefered, and also do you know a better way to get fallback than this? |
I understand the advantage of a schema, but I am still not sure, if it makes sense in my case - I will need to think it through - and even if there will be one, it will be just a partial schema for parts which are fixed. Anyway, I am not promising anything. For what concerns the code snippet you referenced, let me put few comments in. First the general comment about the preference of OpenVR over Oculus:
Now for the particular properties:
So your BTW: It is true even for Windows MR headsets (e.g. HP Reverb) when using SteamVR runtime, except there is no explicit support (and data branch) for Windows MR runtime in
Finally, let me conclude with this thought (without knowing the details of your app): It looks like you might be interested in knowing "just" the view geometry (viewing frustums) used in a stereo rendering for particular headset. If this is the case, it may be probably far easier simply interfacing the corresponding VR runtime directly from your app and obtain those values this way as in this case you would not need to know the HAM and its (eventual) impact on views (and consequently visible FOV). |
First of all, thanks for your detailed response and the insights. I've let a online converter generate this schema for me but obviously that's hella wrong since it doesn't know whats required and what's optional and can't properly parse data types like floats.
Thanks for your take on this, i will reverse the detection in the next commit. So when OpenXR support is added it will be
OpenVrHmd is just containing the actual Hmd instance given by OpenVR since i'm not interested in other devices like base stations, controllers, etc...
No idea how i would handle WinMR since i don't know anyone with such a HMD.
That is indeed interesting. I hoped it would be more consistent. Would you mind sharing your translation table so i can show a name that makes sense to the user?
Thanks for these insights. I'm not good with math so i'll leave the headscratching stuff to @ibigsnet 🙃
That might be a possibility but i'll be honest with you i don't know if there's libraries for all the different runtimes and i really don't want to basically have to rewrite most of hmdq to get to where we are now. I just would've hoped you had split up hmdq into a library and the actual parser/ui so i could've just used DLLImport instead of the weird output capture that is probably very susceptible to errors. |
It looks like you may need only a very small subset of all values, for those, it should not be that difficult to "guess" the schema from the values.
Right.
Ah, ok, I misread the code. In this case, what do you want to look for is
You won't. Unless they are run in SteamVR context (as SteamVR headsets), they are not visible for
I understand what you want, but it would be a pain to do pretty. The data collected from any VR runtime are basically set of properties of different types (some of them are even vectors or matrices) and exposing them in a programmatic way from a library with "C" API would lead to the complexity of the original API.
What I think might be relatively easy to add though is a command line option to write the output JSON file to stdout instead of the file, if it could be of any help to you. For what concerns the translation from "raw" headset names to user friendly names, I will see if I could expose that in a consistent way. |
Currently we're using a C# class autogenerated by quicktype.io from some example outputs i got from myself and friends, but it's missing a lot of values like the oculus stuff and also quicktype is bad at recognizing ulongs and floats which requires me to do a bunch of trial and error. Would be nice if this repository contained a json schema for the output that can be easily converted to classes/parsers in a bunch of different languages
The text was updated successfully, but these errors were encountered: