Skip to main content
July 10, 2016

Oculus Rift CV1 HMDInfo device parameters

I'm working on an Oculus Rift CV1 stereo rendering simulator and my render does not match the one obtained directly using the Oculus PC SDK. If using DK2 default device parameters, results are similar to DK2 stereo rendering but not with CV1.

Looking at CV1 hardware (https://www.ifixit.com/Teardown/Oculus+Rift+CV1+Teardown/60612), it's quite different from DK2, specially the lenses, that make me think that device parameters should be also different.

Oculus Rift DK2 parameters:
HResolution = 1280;                      // HMD horizontal resolution in pixels
VResolution = 800;                       // HMD vertical resolution in pixels
HScreenSize = 0.14976f;                 // HMD horizontal size in meters
VScreenSize = 0.09356f;                // HMD vertical size in meters
VScreenCenter = 0.04678f;             // HMD screen center in meters
EyeToScreenDistance = 0.041f;        // HMD distance between eye and display in meters
LensSeparationDistance = 0.0635f;   // HMD lens separation distance in meters
InterpupillaryDistance = 0.064f;        // HMD IPD (distance between pupils) in meters
DistortionK = { 1.0f,  0.22f, 0.24f, 0.0f };         // HMD lens distortion constants
ChromaAbCorrection = { 0.996f, -0.004f, 1.014f, 0.0f };      // HMD chromatic aberration correction parameters

Oculus Rift CV1 parameters:
HResolution = 2160;                      // HMD horizontal resolution in pixels
VResolution = 1200;                      // HMD vertical resolution in pixels
HScreenSize = 0.133793f???;            // HMD horizontal size in meters
VScreenSize = 0.09356f????;           // HMD vertical size in meters
VScreenCenter = ???;                     // HMD screen center in meters
EyeToScreenDistance = ???;             // HMD distance between eye and display in meters
LensSeparationDistance = 0.064f???;  // HMD lens separation distance in meters
InterpupillaryDistance = 0.064f???;     // HMD IPD (distance between pupils) in meters
DistortionK = ???;                          // HMD lens distortion constants
ChromaAbCorrection = ???;             // HMD chromatic aberration correction parameters

I calculated CV1 HScreenSize and VScreenSize from the 90mm diagonal panels... but I don't know if it's right because screen panels can move horizontally together with the lenses to adjust to IPD...

From those parameters I compute lens positions, distortion scale, shader Scale/ScaleIn parameters and so on...

Could someone provide me with those parameters for a more accurate stereo rendering simulation?

Here it is a sample of CV1 SDK stereo render and simulator (using a mix of DK2 params and CV1 calculated ones):



5 replies

Inspiring
July 11, 2016
You're going to have problems if you are trying to use the old DK1 style distortion on CV1. So much has changed since then, I don't believe there are any values that will work with the old algorithm.

In any case, most of difficult math is hidden now with the new runtime (particularly, the distortion rendering) so you shouldn't have to worry about it. You just basically submit two views and the runtime handles the reset. See this page in the docs for more details:
https://developer.oculus.com/documentation/pcsdk/latest/concepts/dg-render/
AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV
July 16, 2016
Hi cybereality! Thank you very much for your answer!

I imagine there is no paper or presentation or documentation explaining the new stereo render mechanism for CV1... but just out of curiosity, I got a question:

Considering that the old distortion shader doesn't work any more due to the new custom lenses, are you using a mesh to map the fbo texture and simulate the distortion?

Thanks again for your answer! :)
Up and Coming
July 16, 2016
They do not use a mesh but a set of compute shader. I dump them from the service executable a few months ago, you can find them in a pc dev post i made
Up and Coming
July 16, 2016
If you are curious, here the code snippet to extract them for study purposes.

#include <fstream>
#include <vector>
#include <d3dcompiler.h>

struct Header {
unsigned int magic;
unsigned char sign[16];
unsigned int one;
unsigned int size;
unsigned int chunks;
};

int main() {
std::ifstream f(R"(C:\Program Files (x86)\Oculus\Support\oculus-runtime\OVRServer_x64.exe)",std::ios::binary|std::ios::ate);
if (!f)
return 1;

auto len = f.tellg();
f.seekg(0,std::ios::beg);

std::vector<char> file(len);
f.read(file.data(),len);

int val{};
for (std::size_t p = 0;p<file.size()-4;++p) {
if (file

!='D' || file[p+1]!='X' ||file[p+2]!='B' ||file[p+3]!='C')
continue;
Header* head = (Header*)(file.data()+p);
char name[256];
sprintf_s(name,256,"dump%03d.cso",val);
std::ofstream out(name,std::ios::binary|std::ios::trunc);
out.write((char const*)head,head->size);
sprintf_s(name,256,"// dump%03d.cso ",val); // because disassemble put the comment before //, microsoft seriously ?
ID3DBlob* result{};
if (S_OK==D3DDisassemble(head,head->size,D3D_DISASM_ENABLE_COLOR_CODE|D3D_DISASM_ENABLE_INSTRUCTION_NUMBERING,name,&result)) {
sprintf_s(name,256,"_disa%03d.html",val);
std::ofstream out(name,std::ios::trunc);
out<<"<html>";
out.write((char const*)result->GetBufferPointer(),result->GetBufferSize());
out<<"</html>";
result->Release();
}
val++;
}
}

July 16, 2016
Hello galopin! Thank you very much for your answer! Very interesting information!

And thanks for the code snippet! :)