help with oculus rift pc sdk
Hello I have been trying for a week now to write a simple app to display an image on oculus rift ( same for both eyes ). OculusTinyRoom is the only sample using OpenGL and it is way too complicated to adapt. I am reaching the point where I am starting to doubt that this library is maintained any longer. Are there better alternatives? The oculus sdk guide is outdated and almost every sample I can find on the net is at least 3 years old, would not compile against the newest sdk, and using an older sdk would often result in blank screens or all kind of errors. I am using C++ / OpenGL / Visual Studio 2017. Can anyone please help me with a link to an updated sample? Thank you !682Views0likes0CommentsovrInputState issue with Touch
Hi, I am trying to get the button state with the code on the documentation : if (OVR_SUCCESS(ovr_GetInputState(this->session_, ovrControllerType_RTouch, &RtouchinputState))) { std::cout << "last update Rtouch : " << RtouchinputState.TimeInSeconds << std::endl; if (RtouchinputState.Buttons) { std::cout << "Rtouch button pressed" << std::endl; } if (RtouchinputState.Buttons & ovrButton_A) { std::cout << " Handle A button being pressed " << std::endl; } } And the input state seems to stay at 0 whatever the button i press. The touch are working, i can use them in others applications. Also the updated time spent is always 1.854e+06, is it normal ? The tracking state looks to work, i can get the poses of my right and left touch. Any ideas ? Best regards,498Views0likes0Comments[C++]LINK ERROR 1104 can't find '...\ovr_sdk_win_1.25.0_public\OculusSDK\LibOVR\Include.obj'
Hello, in developing process making a DLL by C++ for getting Orientation data in real time into LabVIEW, I got a problem like the above title. But I can't find any 'Include.cpp' file to compile in Oculus SDK. It'll be really thankful if you let me know how can I solve this problem. ps) I'm sorry the capture image is written in Korean but pretty sure that you can figure out what the error is.744Views0likes1CommentovrInput State: How to get button state correctly
I'm a native C# coder so my C++ is a little rusty. How can you check if a button was pressed in this frame and not just held down? Is there an event or something I can hook into instead of using a while statement? while (true) { ovrInputState inputState; if (OVR_SUCCESS(ovr_GetInputState(session, ovrControllerType_Touch, &inputState))) { if (inputState.Buttons & ovrButton_Enter) { std::cout << "Pressed" << std::endl; } } }947Views0likes1CommentsRGB render target issue
I created an sRGB render target + view and my app clearly appears too bright in the HMD. I used: desc.Format = OVR_FORMAT_R8G8B8A8_UNORM_SRGB; desc.MiscFlags = ovrTextureMisc_None; and verified that ovr_CreateTextureSwapChainDX() returns a DXGI_FORMAT_R8G8B8A8_UNORM_SRGB texture. Checking the Tiny Room sample, I was surprised to find that it doesn't follow the guideline from: https://developer.oculus.com/documentation/pcsdk/latest/concepts/dg-render/ and creates a non-sRGB view for the sRGB render target. I am puzzled, can somebody explain what is going on? OculusRoomTiny: main.cpp: bool Init(ovrSession session, int sizeW, int sizeH) { Session = session; ovrTextureSwapChainDesc desc = {}; desc.Type = ovrTexture_2D; desc.ArraySize = 1; desc.Format = OVR_FORMAT_R8G8B8A8_UNORM_SRGB; desc.Width = sizeW; desc.Height = sizeH; desc.MipLevels = 1; desc.SampleCount = 1; desc.MiscFlags = ovrTextureMisc_DX_Typeless; desc.BindFlags = ovrTextureBind_DX_RenderTarget; desc.StaticImage = ovrFalse; ovrResult result = ovr_CreateTextureSwapChainDX(session, DIRECTX.Device, &desc, &TextureChain); if (!OVR_SUCCESS(result)) return false; int textureCount = 0; ovr_GetTextureSwapChainLength(Session, TextureChain, &textureCount); for (int i = 0; i < textureCount; ++i) { ID3D11Texture2D* tex = nullptr; ovr_GetTextureSwapChainBufferDX(Session, TextureChain, i, IID_PPV_ARGS(&tex)); D3D11_RENDER_TARGET_VIEW_DESC rtvd = {}; rtvd.Format = DXGI_FORMAT_R8G8B8A8_UNORM; rtvd.ViewDimension = D3D11_RTV_DIMENSION_TEXTURE2D; ID3D11RenderTargetView* rtv; DIRECTX.Device->CreateRenderTargetView(tex, &rtvd, &rtv); TexRtv.push_back(rtv); tex->Release(); } return true; }758Views0likes0CommentsHas Oculus removed the ability to run C++ console exes?
Issue summary: It appears Oculus Home is no longer allowing C++ console exes to connect to the HMD OR is expecting an additional prompt to allow dismissal of the "Please Wait" screen after the Health and Safety warning has been acknowledged. Any input about possible causes behind this issue would be appreciated. Okay, here are the details on our issue: We've put together a simple C++ / Qt console program which interfaces with the Oculus HMD but projects no video -- it only provides accompanying audio in response to user head gestures and controller input. The app connects to the HMD, reads the device orientation to detect head nods, device taps and the like and is designed to work alongside Oculus movies and games. All was well through to Runtime v0.8.0 but, on v1.3.2, after dismissing the Health and Safety warning the app is left to hang at the "Please Wait" screen, as if Oculus Home is expecting to hear something else from the app. When left at that "Please Wait" screen the app runs by itself without issue, but that "Please Wait" screen then makes it impossible to start anything else from Oculus Home. The expected behaviour when using our app would be: User opens Oculus Home. User starts our exe from Windows. User opens up their game, move, experience and our exe continues to operate alongside it. That is how things operated under the v0.8.0 runtime and earlier. The behaviour we're seeing now is: User opens Oculus Home. User starts our exe from Windows. User is left waiting at the "Please wait..." screen after dismissing the health and safety warning. For another use case: User opens Oculus Home. User starts their game or experience (e.g. open up Farlands and sit at the deployment screen) User starts our exe from Windows. User is presented with the health and safety warning again and, on dismissing it, is left at the "Please wait..." screen on the HMD even though the game/experience remains loaded and displayed in a window on the PC. All is well to run our app solo, all exes are digitally signed, and the Oculus Home "Unknown Sources" "Allow apps that have not been reviewed by Oculus to run on my Rift" option has been toggled on. It seems that things are being blocked somewhere else, as if the Oculus is no longer capable of working with C++ console exes. Is it now no longer possible to run a C++ exe with an Oculus HMD, or must an extra action be sent to the HMD after the health and safety warning is dismissed in order to get past the "Please Wait" screen?3.2KViews1like11CommentsDIffuse/Paralel Lighting Example for the C++ API
Hello! I'm trying to adapt the RoomTiny example to use it for visualization of 3D Models in the Rift. I'm using the DX11 sample, on the latest OVR SDK. I've managed to load several triangle-based files (STL, VTP). The problem is that they don't have any lighting based shading, they look doll. So I googled around and found a decently explicative DirectX11 set of examples, but as I'm un(experienced, I can't figure out how to adapt this(https://www.braynzarsoft.net/viewtutorial/q16390-simple-lighting) tutorial for the RoomTiny example. Does anyone have a working example of Diffuse Lighting or an adaptation of RoomTiny that includes it(even better)/tutorial on how to implement lighting to the C++ API? I'd greatly appreciate it. Edit: This example is also very detailed: http://www.rastertek.com/dx11tut06.html814Views0likes2CommentsovrAvatarVisibilityFlag_FirstPerson getting unset when controller is held still
I'm rendering controllers using the Avatar SDK in C++ and running into an issue where the 1st person visibility flag bit (ovrAvatarVisibilityFlag_FirstPerson ) is unset as soon as I stop moving the controlller. This happens when the controller is resting on a desk or if I hold the controller still. Moving the controller causes it to get set again. The controller position/orientation is still tracking the whole time (it's connected) This is causing the controllers to disapper when they are not visible as I'm checking this flag while rendering: https://gist.github.com/jacres/ab9e5d5a17355ab092cd8272308503f7 Is this normal behavior? Has anyone seen this or have any ideas on how to work around it?1KViews0likes3CommentsNew libraries for using Oculus Rift in .Net applications (announcement)
If you are a .Net programmer and you have an Oculus Rift headset, then I have some great news for you. 1) I have updated the outdated .Net wrapper for Oculus SDK (OculusWrap) so that it now supports the latest version of the SDK. It can be get with full source code for free from GitHub: https://github.com/ab4d/Ab3d.OculusWrap. This means that if you know how to program with DirectX (with using SharpDX) you can now use the latest features from Oculus SDK. 2) If you do not want to work with low level Oculus SKD or do not know how to program with DirectX or OpenGL, then I would like to invite you to try the Ab3d.DXEngine. The Ab3d.DXEngine is a DirectX 11 rendering engine for desktop .Net applications. It is not another game engine where you use game editor, but is a general purpose 3D engine that allows you to build your 3D scene just as you build your 2D GUI. This makes it great for business or engineering applications that require 3D graphics. The great news is that with using Ab3d.DXEngine you can add full Oculus Rift support to your .Net application with just a few lines of code. A sample project is available on GitHub. To quickly check how easy is to define a 3D scene and add Oculus rift support, you can check the main sample file: https://github.com/ab4d/Ab3d.OculusWrap/blob/master/Ab3d.OculusWrap/Ab3d.DXEngine.OculusWrap.Sample/MainWindow.xaml.cs The following screenshot shows that the engine can easily run with great performance at 90 FPS: I hope that the added support for .Net will make the great world of real VR much closer to many .Net developers around the world. Note and disclaimer: The Ab3d.DXEngine library is a commercial library. You can get a 60-day trial from https://www.ab4d.com/Downloads.aspx. The Ab3d.OculusWrap library (.Net wrapper for Oculus SDK) is free. I am the CEO and lead developer for AB4D company that develops the Ab3d.DXEngine library.992Views0likes0Comments