Game Development Community

Oculus Rift DK2

by Steve Lamperti · in Torque 3D Professional · 01/08/2015 (10:38 am) · 57 replies

I guess this post is a bit of an appeal for help. I work for a company that has a 3D window in our product that is based on T3D. We're always working on a new version, and when a customer said something about the Oculus Rift, I got excited, and told them that we might be able to support the rift in our next release, because I had seen information on this site about the engine supporting the rift.

I ordered the DK2, and was having a great time setting it up and playing with it, until I actually started trying to work with the code.

The DK2 interface is quite different then the DK1, and the current code in the engine is seriously out of date. The process of updating it is out of the scope of what I can do with the time I have available to work on it.

There is information on the OculusVR website about using T3D with the rift, and it's currently the case that anyone from there who tries will encounter the same problem.

After playing with the Rift for a while, it does seem like a powerful device, and it's sad if the T3D support is completely dropped.

I'm hoping that someone can update the code in the engine to support the DK2.
Page«First 1 2 3 Next»
#41
05/18/2015 (3:59 pm)
Hi, I just started with t3d, and want to use it with the Rift Dk2 as well. I was looking over some of the old tutorials for using t3d with Dk1 to get an idea of what to expect.

Is there a new version of the Rift template that needs to be used? I downloaded these revisions and set the path to the Oculus SDK, but was unsure of how to move forward to make some basic demos.

Thanks!
#42
05/25/2015 (11:13 am)
@Shae

I have yet to write a nice wiki page for this, but the quickstart guide is as follows:

1) Checkout the oculus_dk2 branch from https://github.com/jamesu/Torque3D/tree/oculus_dk2
2) Copy the "Full" template from https://github.com/jamesu/Torque3D/tree/or_dev/Templates/Full
3) Make sure https://github.com/jamesu/Torque3D/blob/or_dev/Templates/Full/buildFiles/config/project.conf has "$TORQUE_EXTENDED_MOVE" set to true.
4) Download and install the 0.5 Oculus SDK to C:\OculusSDK (or wherever is preferable)
5) Make sure %TORQUE_OCULUSVR_PATH% is set to your oculus SDK folder (or modify https://github.com/jamesu/Torque3D/blob/oculus_dk2/Tools/projectGenerator/modules/oculusVR.inc)
6) Generate the project using the php project generator
7) Build & run "Full" with your oculus device plugged in and running in "Extended Mode".

Most of the information in the DK1 wiki pages also applies, though instead of using the PostFX system the current code renders the distortion effect using the Oculus SDK.
#43
07/01/2015 (5:42 am)
@James
I followed your directions and was able to build Torque3D and get it to work with my DK2.

I have some issues, but I can get it to work enough to be usable for testing.

Here is my story. I am running Win7 x64, MSVS 2010 on a Dell M6800 laptop. I downloaded the latest version of the Oculus SDK without thinking. I had 0.4.4 and I updated it to 0.6.0 thinking newer is better. I ran into errors with not finding OVR_CAPI_0_5_0.h. I set that to 0_6_0.h to match what I had, but every oculusVR* file had errors with bad call signatures. I went back and got the 0.5.0.1 release of the SDK. That worked better. Yes, there are changes from 0.5 to 0.6. Next I ran into machine type errors (x86, x64) with some .obj files. I had set my VS configuration to Release/x64 without thinking. I looked at my notes from building Torque3D way back when and saw that x64 was not supported. I searched quickly on the forums and saw that someone (that @James guy!) had success with Torque2D and x64. I followed the instructions. Removed some .asm files from the build, could not find unicows.lib. This gave me lots of d3d8 errors? I thought for sure we were using d3d9? I went back in to the project properties file and in Linker->General->Additional Library Directories made some edits.

$(DXSDK_DIR)/lib/x86 -> $(DXSDK_DIR)/lib/x64
..../OculusSDK/LibOVR/Lib/Windows/Win32/Release/VS2010 -> ..../OculusSDK/LibOVR/Lib/Windows/x64/Release/VS2010

That did the trick and I had a working Full.exe.

My laptop has the NVIDIA Optimus graphics switching, with both integrated Intel graphics and discrete NVIDIA Quatro K4100M graphics. I had to tell the system to use NVIDIA graphics for Full.exe. I can only get the DK2 to work with extended mode and not direct mode. The highest I can set the resolution is 1600 x 900 @75 Hz. If I go to 1920 x 1080 windowed I get an error that it won't fit on my 1920 x 1080 screen. If I try fullscreen at 1920 x 1080 @75 I get flicker and a ghost image of the Torque3D splash screen. 1600 x 900 @75 works fine and looks pretty good for now.

Two more video issues. If I exit a game level and then try to Play again I get a black screen. I still get sound and actions (gun) but no graphics. If I use the "Windows key + arrow" to move the window from the Oculus extended monitor back to the laptop screen I get the same black screen. I have no idea what that is all about.

Thanks again for all your work on enabling all this!
#44
09/21/2015 (4:39 pm)
Having some trouble, which I hope someone can help me with. I've got my project set up to start working with the rift, I believe, but as soon as I add the contents of the oculusVR folder into the project I get a crash that doesn't happen without those files included. It doesn't crash in the oculus files as all, but rather when creating textures while initializing the engine. I'm at a bit of a loss as to how to report this to see if anyone can help. The crash is in the GFXD39TextureManager, specifically in _innerCreateTexture. The specific line of code that crashes is
retTex->mMipLevels = retTex->get2DTex()->GetLevelCount();

If anyone has an idea why adding the OculusVR files would muck with the texture creation, I would appreciate hearing about it.

I believe that get2DTex() may be returning a NULL, which I could confirm if it would help anyone point me in the right direction.
#45
09/22/2015 (4:26 pm)
Steve,

Not sure why that would be crashing. Sounds a bit fishy to me.

Unfortunately I cant do much testing ATM since I had to update my only suitable dev machine to windows 10, which only seems to work with the latest oculus SDK, which coincidentally no longer uses the extended mode nor includes d3d9 support. Unless the steering committee roll in D3D11 support soon I'm not sure what the future is of oculus support.
#46
09/24/2015 (11:34 am)
DX11 support is on the docket for 3.9.

Once that's in, we should be able to get Oculus updated to use the current SDKs and hopefully that stabilizes things a little.
#47
09/24/2015 (11:47 am)
Alternatively I could try and get it working in GL (there is already code for this). I'm not 100% sure what the state is with GL in the latest oculus sdk however.

Based on experience though I'd say a working d3d11 renderer would be preferable at least for windows.
#48
09/24/2015 (11:49 am)
Thanks for the replies, and thanks for your hard work James. I'll leave off trying to get this up and running in my project for the moment.
#49
01/21/2016 (6:14 pm)
Do you known how the camera work and dou you have the test code?
#50
03/19/2016 (3:29 pm)
Hey guys, just a heads up - I'm updating the code to work with the d3d11 branch and the latest oculus SDK. Hopefully should have something working tomorrow.

I'm also looking into adding OpenVR support for the HTC Vive, but that is largely dependent on receiving a vive as this stuff is hard to test without the proper hardware.
#51
03/19/2016 (7:30 pm)
@James

Thank you for updating us and for working on this to begin with -- you are much appreciated!
#52
03/21/2016 (9:22 am)
Great to hear. Thanks.
#53
04/06/2016 (11:01 am)
Just started looking into Rift VR and wanted to give a heads up, the current Rift SDK is 1.3 and the Rift retail unit is being shipped but the Torque 3D Oculus Rift Setup Wiki (http://wiki.torque3d.org/coder:oculus-rift-setup) is still referencing SDK 0.1.5 and was last updated March 2015 which is unsettling.

When can we look forward to updated information and Torque/Rift integration tutorial?

P.S. Thank You for those who are working on this, this is the future of gaming.
#54
04/06/2016 (11:26 am)
@CSMP - Check out James post 2 up from yours. It's almost done. It won't be a tutorial though, just full on integration to the base engine if I'm not mistaken.
#55
04/06/2016 (11:31 am)
@CSMP

I had it working for the 0.8 sdk here ( https://github.com/jamesu/Torque3D/tree/dx11_oculus ) but as usual the oculus devs decided to release a new sdk and rename everything and move stuff around like they're playing musical chairs, so my fixes are largely moot at this point until its updated to whatever version they're on now.
#56
04/08/2016 (12:16 pm)
Ok, Thanks for the heads up, I'll check out the .8 sdk.
#57
07/14/2016 (12:50 pm)
I am finally getting back to my T3D/DK2 project. My computer has been re-imaged a couple of times, so it took me a while to get my old test game running again. Still using the Oculus 0501 SDK.
I still can't run in "fullscreen" mode with my laptop. (Optimus issue?, DK2 runtime issue?) I did figure out how to run at actual screen size in "windowed" mode from this post: http://www.garagegames.com/community/forums/viewthread/73289
In core/scripts/client/canvas.cs set %resX >= %deskResX to ">" instead of ">=" for X and Y.

Now my question for @jamesu. When I view my scene in the DK2 the 3D appears correct when I look to the right, but when I look to the left the left/right eye offset seems reversed. Look right in scene. Open/close one eye then the other. The perspective shift seems correct for each eye. Look left in scene. Open/close one eye then the other. The left eye image appears to be what the right eye SHOULD be seeing and vice versa. ?? It is as though the left/right eye viewpoint shift was based on some global location rather than my player eye location? Any thoughts?
Page«First 1 2 3 Next»