Oculus dk2 75hz


Im playing with a oculus dk2, using ofxOculusdk2 from James George but i get jitter (choppy movement when you move the head), in the oculus forum i read that its a common issue because the rift needs to use 75hz and i can not set the main monitor to use this refresh rate (only get 60hz).

Its someone playing also with a dk2? Are you getting any choppy movement?

natxo pedreira gonzalez

Yes, you need a hell of a GFX card to run the demo stuff at 75hz. You can run the system down to 60hz for your own work and it will be ok, as long as your GFX card can keep up with what you are doing.

What gfx card are you running? If you are coding your own stuff what FPS do you get from your app?

Im using that on a alienware x51, win7, of64, nvidia 660.

I was porting an old dk1 project (a gp bike sim), basically i have a 2dof platform, a gp bike over that and a helmet with the oculus and audio embedded. We record some laps with a 360 camera and also record the bike telemetry (so i can use the telemetry to move the 2dof platform) and the user can ride a real racing lap.

In the of app if i disable vertical sync i can get around 150-200 fps, when i enable vertical sync it locks the framerate to 60hz or 75hz. (depends on the hz that i set to the nvidia for the oculus screen) but i don’t get an smooth movement.

I tried without luck:

  • set the oculus as primary monitor
  • lower the dk2 resolution
  • use 60hz or 75hz
  • create a custom resolution for my pc monitor to run at 75hz (using a lower resolution)

natxo pedreira gonzalez

Ok, I am not sure, I had some jitter but I thought it was because of a pal video signal going to the 60hz and I did not have an NTSC to test with at the time.

It was a few months back since I worked with the rift, does the addon use the latest SDK? I know there has been 2 revisions since I last worked with ofxOculusdk2.


The addon was updated to use the 0.4.3 sdk, few days ago oculus released 0.4.4

But the addon does not use direct mode rendering (which supposed to get better performance) and my knowledge its not good enough to implement that. I think that direct mode / OpenGL works only on pc

Its a same because the image quality its much better in dk2 but im getting out of ideas to try

Did you use direct mode? mirror screen? extend desktop?

I used mirror screen, I was running on OSX.

Well, accidentally i found my issue, i have an nvidia card with optimus because the alienware has an internal GPU. I had it configured to use the nvidia for my app, so i understand that it going to use the nvidia card for rendering in my app, this always worked for me.

But what a surprise when i boot to the bios disable the discrete gpu and now my project works smoothly

I don’t really understand what happened here but seems solved now !!

i was able to get rid of the jitter (“judder”?) on my dk2 by enabling low persistence mode.

this isn’t supported in the current version of the OF addon, but i’m hoping to add that functionality soon.

 void ofxOculusDK2::setLowPersistance( bool bLowPersistence ){
    unsigned hmdCaps = 0;
    if( bLowPersistence ) hmdCaps |= ovrHmdCap_LowPersistence;
    ovrHmd_SetEnabledCaps(hmd, hmdCaps);
1 Like

Awesome! That explains the Estrella Galicia video stills you shared previously. Is your app available for download?

I think that its on the addon, reading on the oculus forum seems like my alienware x51 with an nvidia 660 its less than the minimun recommended, they talk about a 770 or better.

int hmdCaps;
hmdCaps |= ovrHmdCap_DynamicPrediction;
hmdCaps |= ovrHmdCap_LowPersistence;

Mantissa are your ussing the dk2 on osx?

Hi pizthewiz, do you know estrella galicia brand? its a very nice beer, right now i can not share the video but i can share the code if you are interested. In a pair of months we will make a post with info about that installation with more info

@pandereto yes, exactly, dk2 on osx.

i wasn’t aware of this version by Matt Ebb that controls low persistence. nice!

Yes, that version its great i forked that and replace few lines to be able to compile using the last sdk 0.4.4

@pandereto i noticed an issue with this DK2 add-on. hmdCaps is not being initialized before the bitwise operation, so other flags might be turned on.

int hmdCaps;
hmdCaps |= ovrHmdCap_DynamicPrediction;
hmdCaps |= ovrHmdCap_LowPersistence;

ovrHmd_SetEnabledCaps(hmd, hmdCaps);

I do believe it should be:

int hmdCaps=0;
hmdCaps |= ovrHmdCap_DynamicPrediction;
hmdCaps |= ovrHmdCap_LowPersistence;

ovrHmd_SetEnabledCaps(hmd, hmdCaps);

thanks, i have corrected on github.

Hi everybody!

I am trying to use the ofxOculusdk2 addon in windows 7 and/or 8.1 Pro, but I am not even close to the problems that other oF+DK2 users are posting in the forum. I am not being able to connect the few hints I’ve found, so any help with the following questions will be appreciated.

  • It seems that using a 64 OF version is a must. Is that true? Do I need VS 2013 also? Since there’s not any official version for these options, how do you find/choose the right one?
  • From Pandereto’s answer in another post, is not clear to me if I have to compile ofxOculusDK2Lib first, in order to be able to work with the addon.
  • I have two graphic card options: GeForce GTX 260M (Alienware M15X) and Intel Iris Pro 5200. Trying the DK2 with Unity or the raw Oculus SDK (VS2013), both are doing their job, but I would love to have the OF option. Pandereto, the problem you were having with the nvidia 660 was solved or I am doomed with my options?


Nab Nab

Hi nabetse

  • you can use 32 bit oF, no problem with that
  • you only need to compile ofxOculusDK2Lib in 64 bit if you use oF 64
  • in my case i need to render an extra screen, and i worked ok, also i was rendering a big spherical video

You need to get a 75Hz refresh rate to get good performance

Hi Pandereto, thanks for your reply.

Finally made it, but it was not as straight forward as you said. Am I doing something wrong or maybe there is something misconfigured? I hope you can tell me. This is what I did.

  1. I opened ofxOculusDK2Lib.sln and compiled as a release Win32 version. No problem with that.
  2. In the folder ‘libs’ I replaced ‘3rdParty’ and ‘LibOVR’ directories with the ones in the latest OculusSDK (0.4.4-beta)
  3. Created new project with projectGenerator including ofxOculusDK2 addon.
  4. Then copied the resulting file of step 1 (ofxOculusDK2Lib.lib) to the ‘bin’ directory in the new project folder.
  5. I didn’t add any code, just tried a simple debug and the following errors came out:

Error 6 error C3861: ‘ovrHmd_GetEyePose’: identifier not found c:\of_v0.8.4_vs_release\addons\ofxoculusdk2\src\ofxoculusdk2.cpp 335 1 DK2test
Error 5 error C2447: ‘{’ : missing function header (old-style formal list?) c:\of_v0.8.4_vs_release\addons\ofxoculusdk2\libs\libovr\src\kernel\ovr_math.h 241 1 DK2test
Error 4 error C2143: syntax error : missing ‘;’ before ‘{’ c:\of_v0.8.4_vs_release\addons\ofxoculusdk2\libs\libovr\src\kernel\ovr_math.h 241 1 DK2test
Error 3 error C2062: type ‘double’ unexpected c:\of_v0.8.4_vs_release\addons\ofxoculusdk2\libs\libovr\src\kernel\ovr_math.h 241 1 DK2test
Error 7 error C2039: ‘ViewAdjust’ : is not a member of ‘ovrEyeRenderDesc_’ c:\of_v0.8.4_vs_release\addons\ofxoculusdk2\src\ofxoculusdk2.cpp 375 1 DK2test
Error 8 error C1189: #error : define OVR_D3D_VERSION to 10 or 11 c:\of_v0.8.4_vs_release\addons\ofxoculusdk2\libs\libovr\src\capi\d3d1x\capi_d3d1x_util.h 34 1 DK2test
Error 9 error C1189: #error : define OVR_D3D_VERSION to 10 or 11 c:\of_v0.8.4_vs_release\addons\ofxoculusdk2\libs\libovr\src\capi\d3d1x\capi_d3d1x_util.h 34 1 DK2test

Errors 3-5 had to do with this line in OVR_Math.h, the one between ifdef-endif

> #ifdef OVR_CC_MSVC
> inline int isnan(double x) { return _isnan(x); };
> #endif

5.In c++ reference isnan is already defined for double values so I just commented that block. I compiled and these errors were gone.
6. For Errors 6 and 7 I checked oculusSDK documentation and discovered that from version 0.4.2, ovrHmd_GetEyePose was replaced by ovrHmd_GetHmdPosePerEye, and supposed something similar happened for ViewAdjust - HmdToEyeViewOffset. Yes, errors gone
7. For the last error message:

Error 1 error C1189: #error : define OVR_D3D_VERSION to 10 or 11 c:\of_v0.8.4_vs_release\addons\ofxoculusdk2\libs\libovr\src\capi\d3d1x\capi_d3d1x_util.h 34 1 DK2test

When I tried a line like [ #define OVR_D3D_VERSION 10 ] at the beginning of capi_d3d1x_util.h a lot of new errors appeared. I read some posts in oculus forums about the same issue, asking where to define it or how to deal with error C1189: always unanswered. That made me feel the problem was very stupid or the solution was really obvious or documented somewhere. Not being able to find that answer I decided to get rid of all the d3d1x files in CAPI (maybe those are there for a future DX release, don’t know). That was the solution and it finally worked.

I don’t remember to have to do that, i used that on a recent project in a win7, of64 bits 0.8. In fact i only change a pair of calls to make that compatible with sdk 0.44

I don’t use the project generator to import the addon, have you tried to compile the example?

Compiling the example was my first try but the addon was not included as a filter in the VS solution:

Error 1 error LNK1181: cannot open input file ‘libovrd.lib’ C:\of_v0.8.4_vs_release\addons\ofxOculusDK2\ofxOculusDK2Lib\LINK ofxOculusDK2Lib
Error 4 error C1083: Cannot open include file: ‘ofxOculusDK2.h’: No such file or directory c:\of_v0.8.4_vs_release\addons\ofxoculusdk2\example-oculusriftrendering\src\testapp.h 4 1 OculusRenderingBasic

So I decided to go for the projectGenerator (even if I know how to add the addon manually, I also noticed that the project has references to other addons and projects I do not require, i.e. ofxCameraSave, ofxGenerative…).

Well, I have been able to play for a while with the addon in windows 32 & 64. Really cool.

Pandereto, you mentioned you were rendering an extra screen and I am on a similar situation, needing to render the stereo image on the HMD, a single version of the 3D scene for another monitor, and a control -basic GUI- screen.

The first problem I found was that there was not an option in the addon for drawing in a specific location with specific size parameters. My first option was to search trough the addon code in order to deactivate the auto-resize behavior but I couldn’t. Second option: to use an FBO to wrap the oculus rendering (I put all the oculus rendering stuff that was running in the draw function in between an ofFbo begin and end functions in the update). That worked but two strange things happened:

  • the image was vertical inverted (I simply rotate the ofFbo).
  • It seems to have a different and lesser quality (mesh wires are not that clear, horizon line is not getting to the edges, and there is a white line surrounding the vision field.

Here you have the images side by side.

Any ideas for a better way to do this?