Oculus Rift?
by NiN-NiN · in Torque 3D Beginner · 05/26/2013 (5:44 am) · 14 replies
Hi All
I have setup my existing project based on this
https://github.com/GarageGames/Torque3D/wiki/Setting-Up-Your-Project-for-the-Oculus-Rift
I made sure it pointed to the SDK (Newest version) and set my class to ExtendedMove class as well and even hit the regenerate button.
When I go into the EXE of the project I don't have tracking of the rift or the Stereoscopic 3D either am I missing something?
I believe i'm using Torque3D 2.0 as I downloaded it just after the rift demo and I can see 3.0 has been released.
I am on limited internet so I can't download 3.0 for a while but I should still be able to get this running under 2.0 correct?
Any help is appreciated :)
I have setup my existing project based on this
https://github.com/GarageGames/Torque3D/wiki/Setting-Up-Your-Project-for-the-Oculus-Rift
I made sure it pointed to the SDK (Newest version) and set my class to ExtendedMove class as well and even hit the regenerate button.
When I go into the EXE of the project I don't have tracking of the rift or the Stereoscopic 3D either am I missing something?
I believe i'm using Torque3D 2.0 as I downloaded it just after the rift demo and I can see 3.0 has been released.
I am on limited internet so I can't download 3.0 for a while but I should still be able to get this running under 2.0 correct?
Any help is appreciated :)
#2
05/26/2013 (9:20 am)
The Rift changes are in 3.0, I don't believe they were part of 2.0. It was after 2.0 when Dave was doing most of his work with it.
#3
05/26/2013 (9:36 am)
Correct, the Rift implementation was a feature added for 3.0.
#4
05/26/2013 (4:32 pm)
Thanks for the replies guys I thought so I'm glad to know they are in 3.0 i'll have to find a way to grab it shortly :)
#5
05/26/2013 (4:54 pm)
Keep in mind that even though the support is there in 3.0 you'll still need to recompile the engine to enable the Rift and ExtendedMove modules if you're planning on using the pre-compiled package. The Committee is planning for an optional Rift-centric Template for those who would prefer the pre-compiled route.
#6
I am compiling with the latest OculusSDK, 0.2.2, and the development branch of T3D MIT. I use VC 2010 express. I get this error
For now I just comment out the line and T3D compiles, but as soon as I get my Rift I expect I need that line ;)
Cheers,
Andy
05/27/2013 (12:35 am)
Sorry for the thread hijack but using this topic almost makes sense ;)I am compiling with the latest OculusSDK, 0.2.2, and the development branch of T3D MIT. I use VC 2010 express. I get this error
oculusVRSensorData.cpp 1>C:TorqueDS3DEnginesourceplatforminputoculusVRoculusVRSensorData.cpp(43): error C2662: 'OVR::SensorFusion::GetPredictedOrientation' : cannot convert 'this' pointer from 'const OVR::SensorFusion' to 'OVR::SensorFusion &'
For now I just comment out the line and T3D compiles, but as soon as I get my Rift I expect I need that line ;)
Cheers,
Andy
#7
05/27/2013 (12:45 am)
I believe that it's version 0.1.5 of the OcculusSDK that T3D is "officially" compatible with. In time the plan is to update to the newest version(s) -- but anyone in the community is welcome to help out with the updating through a pull request.
#8
Mike is correct in that T3D v3.0 has only been tested with v0.1.5 of the OculusVR SDK. The OculusVR SDK is in constant flux right now and v0.1.5 was what we had to work with at the time. I haven't personally tried to compile against the latest versions yet and there could very well be breaking changes.
If anyone else would like to contribute to the Oculus Rift work started by the Steering Committee it would be much appreciated. My own time will be limited in the coming months due to some schedule changes.
Something I haven't yet talked about publicly here is that I put together an Oculus Rift template for some people to test out. You guys could also give it a try:
Rift-Template-3-0.zip
Place this in your T3D 3.0 Templates directory and use the new Project Manager 2.0 to create your own project based on it. The instructions are in the included ReadMe.txt file. You will still need to have downloaded OculusVR SDK v0.1.5 to correctly set up your project, but you won't need to actually recompile if you just want to use the T3D v3.0 based binary. Once you've created your own project everything else should just work.
- Dave
05/27/2013 (9:42 am)
Hey All.Mike is correct in that T3D v3.0 has only been tested with v0.1.5 of the OculusVR SDK. The OculusVR SDK is in constant flux right now and v0.1.5 was what we had to work with at the time. I haven't personally tried to compile against the latest versions yet and there could very well be breaking changes.
If anyone else would like to contribute to the Oculus Rift work started by the Steering Committee it would be much appreciated. My own time will be limited in the coming months due to some schedule changes.
Something I haven't yet talked about publicly here is that I put together an Oculus Rift template for some people to test out. You guys could also give it a try:
Rift-Template-3-0.zip
Place this in your T3D 3.0 Templates directory and use the new Project Manager 2.0 to create your own project based on it. The instructions are in the included ReadMe.txt file. You will still need to have downloaded OculusVR SDK v0.1.5 to correctly set up your project, but you won't need to actually recompile if you just want to use the T3D v3.0 based binary. Once you've created your own project everything else should just work.
- Dave
#9
Just out of curiosity but is there any resource on how to recompile the engine for the rift support to be in use?
I was going to create a post on how to use T3D for Rift Development on reddit so others can start creating something :)
05/27/2013 (4:20 pm)
I will test this tonight david I was able to get a copy of 3.0 so I will install that and the template and see how I go.Just out of curiosity but is there any resource on how to recompile the engine for the rift support to be in use?
I was going to create a post on how to use T3D for Rift Development on reddit so others can start creating something :)
#11
I will try it all tonight and let you guys know how it goes :)
I'm hoping once I post about setting it up on reddit the engine will be used a lot more by everyone
05/27/2013 (6:38 pm)
Thanks for that i seem to have totally missed that page and only found the setup rift page.I will try it all tonight and let you guys know how it goes :)
I'm hoping once I post about setting it up on reddit the engine will be used a lot more by everyone
#12
Although there seems to be a bug with the water it's not showing correctly in one of the views I did my best to remove it thinking it was the foam etc as on one view it shows a white boarder along the edge of the water in the Konserian level and the best i could do was minimize it to a small white boarder in the one view I assume this is o do with the engine.
Overall very simple and easy to get up and running with the rift and i even used the new SDK without issues as well.
05/28/2013 (3:36 am)
Ok I just tried the template and it worked fantastic I even took a stroll through Konserian Highlands pack that was recently showed off.Although there seems to be a bug with the water it's not showing correctly in one of the views I did my best to remove it thinking it was the foam etc as on one view it shows a white boarder along the edge of the water in the Konserian level and the best i could do was minimize it to a small white boarder in the one view I assume this is o do with the engine.
Overall very simple and easy to get up and running with the rift and i even used the new SDK without issues as well.
#13
A workaround while we wait for them to turn the getter into a const function again is:
orientation = const_cast<OVR::SensorFusion&>(data).GetPredictedOrientation();
but I doubt anything so ugly would get accepted as a pull request ;-)
06/09/2013 (4:49 pm)
The oculus rift SDK 0.2.2 compile error seems to be because the GetPredictedOrientation is no longer const and we are trying to access it from the const object "const OVR::SensorFusion& data" passed into the function.A workaround while we wait for them to turn the getter into a const function again is:
orientation = const_cast<OVR::SensorFusion&>(data).GetPredictedOrientation();
but I doubt anything so ugly would get accepted as a pull request ;-)
#14
Agreed, a change in 0.2.2 where OVR::SensorFusion is no longer a const.
How I went about fixing it:
In oculusVRSensorData.h line 59
change
to this
and in oculusVRSensorData.cpp line 37
change
to this
Compiles OK now in VS2010, However I get a linker error in VS2008 doing a release build (ok in debug).. I read that Oculus recommends VS2010, so it may be a compatibility thing.
06/09/2013 (9:46 pm)
Re: error with Oculus SDK 0.2.2cannot convert 'this' pointer from 'const OVR::SensorFusion' to 'OVR::SensorFusion &'
Agreed, a change in 0.2.2 where OVR::SensorFusion is no longer a const.
How I went about fixing it:
In oculusVRSensorData.h line 59
change
void setData(const OVR::SensorFusion& data, const F32& maxAxisRadius);
to this
void setData(/*const*/ OVR::SensorFusion& data, const F32& maxAxisRadius);Or just delete the const
and in oculusVRSensorData.cpp line 37
change
void OculusVRSensorData::setData(const OVR::SensorFusion &data, const F32& maxAxisRadius)
to this
void OculusVRSensorData::setData(/*const*/ OVR::SensorFusion &data, const F32& maxAxisRadius)Or just delete the const
Compiles OK now in VS2010, However I get a linker error in VS2008 doing a release build (ok in debug).. I read that Oculus recommends VS2010, so it may be a compatibility thing.
NiN-NiN
Warning: require(C:/Torque3D/Tools/projectGenerator/modules/oculusVR.inc): failed to open stream: No such file or directory in C:\Torque3D\Tools\projectGenerator\projectGenUtils.inc on line 87
Fatal error: require(): Failed opening required 'C:/Torque3D/Tools/projectGenerator/modules/oculusVR.inc' (include_path='.;C:\php5\pear') in C:\Torque3D\Tools\projectGenerator\projectGenUtils.inc on line 87
I'm assuming the Rift changes were in the GitHub and not on the binary I downloaded then.
Are they in T3D 3.0? if so I will have to wait till I can download it.