x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Specific code for SteamVR Windows Mixed Reality headsets C++

Hi guys,

I tested my VR game on the 3 following headsets:

  • HTC Vive

  • Oculus Rift

  • Lenovo Explorer (Windows Mixed Reality)

I noticed the colors were really different on each platform. I started developing for the HTC Vive, so I'm trying to reproduce the same colors/brightness on the Oculus Rift and the Windows Mixed Reality platforms, which are the platforms supported on Steam. So in order to do that, I tweak the Saturation and Gamma of my Post Process according to the platform.

My problem is that Windows Mixed Reality headsets will return EHMDDeviceType::DT_SteamVR as device type if you call GEngine->XRSystem->GetHMDDevice()->GetHMDDeviceType(). So I'm trying to figure out how to know what VR headset is being used.

I found out that:

  1. Calling GEngine->XRSystem->GetHMDDevice()->GetHMDMonitorInfo(MonitorInfo) gives "WindowsHolographic" in the returned MonitorInfo.MonitorName variable, which hopefully is the case for ALL Windows Mixed Reality headsets. This string is obtained by querying vr::Prop_SerialNumber_String (see FSteamVRHMD::Startup() function).

  2. Querying the vr::Prop_ModelNumber_String like in the FSteamVRHMD::RecordAnalytics() function will give "Lenovo Explorer" as a DeviceName.


If you have another Windows Mixed Reality headset, could you check what do vr::Prop_SerialNumber_String and vr::Prop_ModelNumber_String return for this other Windows Mixed Reality headset? (so that we can make a list and have specific code for each of them)


Windows Mixed Reality headsets:

  • Lenovo Explorer: Prop_SerialNumber_String = "WindowsHolographic" and Prop_ModelNumber_String = "Lenovo Explorer"

  • Samsung Odyssey: ?

  • HP: ?

  • Acer: ?

  • Dell Visor: ?

Product Version: UE 4.18
Tags:
more ▼

asked Dec 29 '17 at 02:29 PM in C++ Programming

avatar image

Steeve Kilhoffer
79 2 6 13

avatar image hillsidebro5 Jan 12 '18 at 08:35 PM

I will test this for you. However, I am having trouble accessing the functions. What libraries did you include to get access to vr::Prop_ModelNumber_String ?

avatar image Steeve Kilhoffer Jan 12 '18 at 08:41 PM

I added a GetHMDDeviceName() function in the FSteamVRHMD class so I did not need to add any include (SteamVRHMD.cpp having all it needs).

If you just want to test it though, you can add a breakpoint in one of the 2 occurences of (still in SteamVRHMD.cpp) to check what is returned by:

 GetFStringTrackedDeviceProperty(VRSystem, vr::k_unTrackedDeviceIndex_Hmd, vr::Prop_ModelNumber_String);

I believe it gets called when you start the game.

avatar image hillsidebro5 Jan 17 '18 at 07:31 PM

It appears I still don't have access to these functions. I'm trying to include "openvr.h" but it says it can't find it.

avatar image Steeve Kilhoffer Jan 17 '18 at 07:42 PM

I can't help you there. I did not access these functions directly. I added a GetHMDDeviceName() function in the FSteamVRHMD class, because this class can call GetFStringTrackedDeviceProperty(...). Then from my project, I call GetHMDDeviceName().

If you want to do the same as me, take a look at how the GetVersionString() function works and do the same.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question