Ogre / Oculus Rift DK2 Progress

A place for users of OGRE to discuss ideas and experiences of utilitising OGRE in their games / demos / applications.
Crashy
Google Summer of Code Student
Google Summer of Code Student
Posts: 1005
Joined: Wed Jan 08, 2003 9:15 pm
Location: Lyon, France
x 49
Contact:

Re: Ogre / Oculus Rift DK2 Progress

Post by Crashy »

I totally agree with you. When we've added support of the Oculus 1 into our game, we were quite satisfied of the result, and were eager to try a kit with a geater resolution.

When we've finally grabbed a DK2..cool...everything is flipped now, and all the stuff we've done before has to be thrashed.
At this time I decided to not waste time porting everything to DK 2, because I was pretty sure everything will change again with final release.

This was the best decision in my life :mrgreen:
Follow la Moustache on Twitter or on Facebook
Image
User avatar
Kojack
OGRE Moderator
OGRE Moderator
Posts: 7157
Joined: Sun Jan 25, 2004 7:35 am
Location: Brisbane, Australia
x 534

Re: Ogre / Oculus Rift DK2 Progress

Post by Kojack »

While I feel the pain too (obviously, since my stuff keeps breaking), I also understand that so far I've been using a 0.x beta sdk that has been going through heavy changes. It's not like there's a ton of VR sdks out there as prior art to be inspired from. The claim for a long time has always been that the 1.x series would have stable compatibility, so I wasn't surprised that jumping from a 0.8 beta to 1.3 stable would mean breaking things.
Although if I was working on a commercial product I'd be very annoyed with the changes of course.

I do wish they didn't block developers from keeping up with the changes for so long (5 months).
User avatar
mkultra333
Gold Sponsor
Gold Sponsor
Posts: 1894
Joined: Sun Mar 08, 2009 5:25 am
x 114

Re: Ogre / Oculus Rift DK2 Progress

Post by mkultra333 »

Anyone know any sales figures for Oculus Rift versus HTC Vive? I did a quick google but didn't find much. Vive sold 15000 units in 10 minutes, and Oculus pre-orders were "better than expected" but that's about it.

I'm still tossing up whether to get a Vive or a Rift. I'm leaning toward a Vive because of the Steam link and OpenVR, plus the kit has extra bits (thought it costs more too.) But if the Rift has radically outsold the Vive I'd probably get a Rift instead because of the bigger market.
"In theory there is no difference between practice and theory. In practice, there is." - Psychology Textbook.
User avatar
c6burns
Beholder
Posts: 1512
Joined: Fri Feb 22, 2013 4:44 am
Location: Deep behind enemy lines
x 138

Re: Ogre / Oculus Rift DK2 Progress

Post by c6burns »

I went with Vive, but I do not know sales figures and I won't receive my unit for a few weeks. I highly doubt Oculus is going to somehow pull ahead of Vive by an order of magnitude when it's selling off the front page of steam for a few months now.
User avatar
Kojack
OGRE Moderator
OGRE Moderator
Posts: 7157
Joined: Sun Jan 25, 2004 7:35 am
Location: Brisbane, Australia
x 534

Re: Ogre / Oculus Rift DK2 Progress

Post by Kojack »

Get a Rift and you can play Oculus and OpenVR games.
Get a Vive and you can only play OpenVR games.
:)

It is a hard choice at the moment though, there's no clear winner. Vive comes with the wands, but they don't sound as good as the Oculus Touch controllers due later in the year. Vive claims to have larger tracking volume, but the CV1 is lighter and more comfortable to wear. Vive has slightly larger fov, but since they both use the same resolution panels, wider fov means lower pixels per degree (I need high pixels per degree for flight sim HUDs). CV1 has integrated headphones and DAC, but also has a glare artifact from the fresnel lenses.

For every pro, there's a con.

For now I'm sticking with Oculus. I've already got 2 Oculus hmds while HTC wouldn't accept me as a developer when they were giving out free Vives. Oculus also will have a larger software library, thanks to OpenVR supporting it in addition to it's own content. Plus my work is probably getting a Vive, I can use it there. :)
User avatar
mkultra333
Gold Sponsor
Gold Sponsor
Posts: 1894
Joined: Sun Mar 08, 2009 5:25 am
x 114

Re: Ogre / Oculus Rift DK2 Progress

Post by mkultra333 »

Well great, now I don't have a clue what to get. :P

Probably I would go with whoever sold the most units, since the idea is to add VR to my game. But I have no idea who that is.
"In theory there is no difference between practice and theory. In practice, there is." - Psychology Textbook.
User avatar
Kojack
OGRE Moderator
OGRE Moderator
Posts: 7157
Joined: Sun Jan 25, 2004 7:35 am
Location: Brisbane, Australia
x 534

Re: Ogre / Oculus Rift DK2 Progress

Post by Kojack »

If you want the biggest audience with the least work, code for OpenVR (you'll get Oculus, Vive and Razer OSVR owners).
But that doesn't affect the headset you buy, since both are supported by OpenVR.


I just got Ogre partly running on the Oculus 1.3 sdk. They've changed the way textures are handled again. Similar, but a couple of extra steps, renamed members (did they really need to break ovrEyeRenderDesc by renaming HmdToEyeViewOffset to HmdToEyeOffset?), and changed how the swap chain textures are used.
By "partly" I mean it now shows a flickering distorted screen instead of the default oculus grey world (before an app takes over, the oculus runtime now shows a grey world). I expected it to be a bit broken, I haven't fixed the ogre compositor yet (all the sample code now only uses one texture for both eyes, not a texture per eye like I was using previously, so I've changed over to that too, but haven't changed the viewport parameters yet).

Two annoyances...
First: every time I exit the oculus home app activates it's audio. I'm sitting here with headphones on to listen to music / youtube videos while I code, but oculus wants me to listen to a crackling fireplace and flowing water. Damn it, now I need to pee. It's not too annoying, fairly soft, but it's still there every time you exit a vr app. If you close oculus home (their store / launcher), then it restarts next time you start any vr app.
Second: The F***ING health and safety warning is even more annoying! Can't be disabled now it seems and can't be exited by a keypress, you have to use an xbox controller or use your head to aim at a rectangle button for 2 seconds. It doesn't time out anymore (will sit there waiting for you) and IT APPEARS EVERY GOD DAMN TIME I START MY CODE. How I tend to do oculus stuff: start program, hold oculus to my face (don't use head straps), put it down a few seconds later, back to code.

I hope there's some method I haven't seen yet to remove the warning. It's going to piss me off no end. I'm already here ranting on a forum about it and I've only been using the sdk for under an hour.

Back to code...

(not for long though, I need to prepare a class for tomorrow morning on floating point issues and it's 6:38pm now)
User avatar
Kojack
OGRE Moderator
OGRE Moderator
Posts: 7157
Joined: Sun Jan 25, 2004 7:35 am
Location: Brisbane, Australia
x 534

Re: Ogre / Oculus Rift DK2 Progress

Post by Kojack »

Both eyes working now.
But the projection matrix is faulty. Apparently in the previous sdk their projection function was always returning a left handed matrix. Now it's changed to right handed by default, with a flag to restore it to left handed.
All I did in the past was copy the matrix into ogre and use it as a custom proj matrix on the camera. Now that results in a distorted projection that rotates around the wrong axes and stretches things. I tried the flag to go back to left handed, that's even worse.
Strange that it used to be a left handed matrix, considering everthing else they did was right handed.

I'm going to have to look at the matrix values, see if I can spot the anomaly. :(
User avatar
Kojack
OGRE Moderator
OGRE Moderator
Posts: 7157
Joined: Sun Jan 25, 2004 7:35 am
Location: Brisbane, Australia
x 534

Re: Ogre / Oculus Rift DK2 Progress

Post by Kojack »

Hmm, no answer so far.
The projection method actually used to be left handed but with a flag for right handed (which I did use to make it ogre friendly). Now it's right handed but with a flag for left handed (which I don't use). Looking at the code (this is one of the few sdk functions that is still open source, I was actually surprised to find it), there should be no difference, they just use the handedness flag to set a variable to -1 or 1 and they swapped the if statement when they changed the flag name. So it should be identical. All the math is the same.
If I use the standard ogre projection, it looks ok (but won't have the correct offset for the screens / player's eyes, each eye has an asymmetric fov so regular projection matrices aren't good enough). But with the sdk projection, the view is twisted upwards (can't tell if it's distorted rotation or skewing) around 45 degrees.

Here's the most annoying bit of this: I can't look back at the values it output from the 0.8 sdk, because it no longer runs due to 1.3 now being on here. Options:
- reboot into my windows 8 partition (don't feel like that right now, and constantly swapping OS while debugging is going to be very annoying)
- wait for tomorrow, I can check on my laptop (have to borrow the campus DK2 so my code runs)
- try to get my DK2 running on my Surface Pro 2. Very unlikely to work.

Sigh

More news tomorrow night maybe.
User avatar
cybereality
Hobgoblin
Posts: 563
Joined: Wed Jul 12, 2006 5:40 pm
x 12

Re: Ogre / Oculus Rift DK2 Progress

Post by cybereality »

I wish I could be of help but I haven't really dug into the 1.3 SDK much at all, so I'm not sure about those issues.

Strange that you have a problem with the projection matrix, as that should be fairly straight-forward to copy from one of the example projects.

Could it be something with row-major versus column-major? I doubt that changed, but maybe worth a look.

Also, did you see this guide: https://developer.oculus.com/documentat ... migration/
User avatar
Kojack
OGRE Moderator
OGRE Moderator
Posts: 7157
Joined: Sun Jan 25, 2004 7:35 am
Location: Brisbane, Australia
x 534

Re: Ogre / Oculus Rift DK2 Progress

Post by Kojack »

Turns out the matrix was fine. I made a stupid error in setting up the eye layer's viewport dimensions and that threw off the distortion rendering, making it look wrong on the hmd (the layer code was changed since my 0.8 test because I went from two textures to one shared SBS texture).

So now Oculus 1.3 is running fine in DX11 on Ogre 2.1. :)
I'll get GL going on the weekend. (Wait, I need to wake up for work in 4 hours? But it feels like I just got home! I was going to research monitors tonight too!)

For the hell of it, I decided to stress the async time warp a little. I forced ogre to run at 30fps. When close to objects head movement had a little judder, but head rotation (if I kept the same position) was perfectly smooth. Vastly better than I had today in Unreal using oculus 0.8 (I was running some unoptimised student maps in unreal, so it dropped below 75fps ocassionally).
I moved away from the scene objects, the movement judder wasn't noticable at all now, and rotation still smooth. I wouldn't even guess it was 30fps instead of 75.


I'm thinking of trying out OpenVR too. Some of my students have Vives, so they can test for me. (Kind of sad that I ordered my CV1 way before them, but they already have their Vives).
But I'm not really comfortable releasing code for hardware I don't own and can't test myself. Hey Valve, give me a free Vive! :)

Then I need to play around with Leap Motion Orion and Ogre.
al2950
OGRE Expert User
OGRE Expert User
Posts: 1227
Joined: Thu Dec 11, 2008 7:56 pm
Location: Bristol, UK
x 157

Re: Ogre / Oculus Rift DK2 Progress

Post by al2950 »

Kojack wrote: So now Oculus 1.3 is running fine in DX11 on Ogre 2.1. :)
Awesome :D
User avatar
cybereality
Hobgoblin
Posts: 563
Joined: Wed Jul 12, 2006 5:40 pm
x 12

Re: Ogre / Oculus Rift DK2 Progress

Post by cybereality »

Great news!
User avatar
Kojack
OGRE Moderator
OGRE Moderator
Posts: 7157
Joined: Sun Jan 25, 2004 7:35 am
Location: Brisbane, Australia
x 534

Re: Ogre / Oculus Rift DK2 Progress

Post by Kojack »

GL working now too.
Germanunkol
Halfling
Posts: 87
Joined: Mon Oct 11, 2010 6:39 pm
x 12

Re: Ogre / Oculus Rift DK2 Progress

Post by Germanunkol »

Yay! :D

This is really cool, well done so far!
Now Oculus needs to start supporting Linux again... :P Then we're back on track.

You''re not the only one annoyed by the safety warning and the breaking changes Oculus made so often...
User avatar
Zeal
Ogre Magi
Posts: 1260
Joined: Mon Aug 07, 2006 6:16 am
Location: Colorado Springs, CO USA

Re: Ogre / Oculus Rift DK2 Progress

Post by Zeal »

So now Oculus 1.3 is running fine in DX11 on Ogre 2.1.
So the only way to use a rift in Ogre is to upgrade to 2.1?
User avatar
TheOnlyJoey
Halfling
Posts: 53
Joined: Sun Apr 10, 2011 12:05 pm
Location: The Netherlands
x 6
Contact:

Re: Ogre / Oculus Rift DK2 Progress

Post by TheOnlyJoey »

Zeal wrote:
So now Oculus 1.3 is running fine in DX11 on Ogre 2.1.
So the only way to use a rift in Ogre is to upgrade to 2.1?
Or by using OpenHMD which has been working with Ogre since 1.8 and up to the latest version.
Will currently as of writing give you support for DK1/DK2 with CV1 and Vive pushed to main really soon.
Also will add at least 2 other HMD's over the course of next 2 months.
User avatar
Kojack
OGRE Moderator
OGRE Moderator
Posts: 7157
Joined: Sun Jan 25, 2004 7:35 am
Location: Brisbane, Australia
x 534

Re: Ogre / Oculus Rift DK2 Progress

Post by Kojack »

Zeal wrote:
So now Oculus 1.3 is running fine in DX11 on Ogre 2.1.
So the only way to use a rift in Ogre is to upgrade to 2.1?
It would probably work fine in 1.x, but I don't use it anymore, all my ogre test stuff is 2.1 now. :)
TheOnlyJoey wrote:
Zeal wrote:
So now Oculus 1.3 is running fine in DX11 on Ogre 2.1.
So the only way to use a rift in Ogre is to upgrade to 2.1?
Or by using OpenHMD which has been working with Ogre since 1.8 and up to the latest version.
Will currently as of writing give you support for DK1/DK2 with CV1 and Vive pushed to main really soon.
Also will add at least 2 other HMD's over the course of next 2 months.
I'll have to have a look at that, sounds cool.
User avatar
Zeal
Ogre Magi
Posts: 1260
Joined: Mon Aug 07, 2006 6:16 am
Location: Colorado Springs, CO USA

Re: Ogre / Oculus Rift DK2 Progress

Post by Zeal »

Forgive my noobness, but is this a plugin? Or is this something built into Ogre? (never touched the Oculus SDK, only through Unity)

*and btw thanks for all the work you've done with this!
User avatar
Kojack
OGRE Moderator
OGRE Moderator
Posts: 7157
Joined: Sun Jan 25, 2004 7:35 am
Location: Brisbane, Australia
x 534

Re: Ogre / Oculus Rift DK2 Progress

Post by Kojack »

Zeal wrote:Forgive my noobness, but is this a plugin? Or is this something built into Ogre? (never touched the Oculus SDK, only through Unity)
For my one, it's an addon provided as a couple of source files you can add to your C++ project. It wraps around some of the Oculus sdk, mainly doing the Ogre compositor setup, stereo camera creation, render texture passing to oculus and position/orientation updating. It doesn't wrap all functionality of the Oculus sdk, you can still use any of that manually, it just simplifies the actual Ogre to Oculus bit.
While Unity, Unreal, Cryengine are building VR support in as a default feature, I'd prefer not to bloat Ogre with features that aren't currently widely required, especially when they are hardware specific.

(My April estimated CV1 delivery that was delayed to June due to parts shortage may be even later because australian customs have blocked all rift imports into the country. No idea why, but shipping here has halted. Oh joy. I could buy a Vive, but they are already estimated as June or later as well)
User avatar
mkultra333
Gold Sponsor
Gold Sponsor
Posts: 1894
Joined: Sun Mar 08, 2009 5:25 am
x 114

Re: Ogre / Oculus Rift DK2 Progress

Post by mkultra333 »

TheOnlyJoey wrote: Or by using OpenHMD which has been working with Ogre since 1.8 and up to the latest version.
Will currently as of writing give you support for DK1/DK2 with CV1 and Vive pushed to main really soon.
Also will add at least 2 other HMD's over the course of next 2 months.
Thanks TheOnlyJoey, I hadn't heard of that one.
"In theory there is no difference between practice and theory. In practice, there is." - Psychology Textbook.
User avatar
Kojack
OGRE Moderator
OGRE Moderator
Posts: 7157
Joined: Sun Jan 25, 2004 7:35 am
Location: Brisbane, Australia
x 534

Re: Ogre / Oculus Rift DK2 Progress

Post by Kojack »

OpenHMD looks like it might be ok for linux or mac users (since oculus dropped support for them), but it's not a wrapper around official sdks, it reverse engineers them. It's feature level is sitting around oculus 0.3-0.4 level (from my very brief look at it). For windows developers, using SteamVR / OpenVR (OpenVR is SteamVR without the Steam bit) would give you cross HMD support with more features.
User avatar
mkultra333
Gold Sponsor
Gold Sponsor
Posts: 1894
Joined: Sun Mar 08, 2009 5:25 am
x 114

Re: Ogre / Oculus Rift DK2 Progress

Post by mkultra333 »

Ah, ok.

Why on earth is customs stalling the Rift? And the Vive is delayed as well? Dammit. I'm in Australia too so that sucks. I'll be ordering a Vive next week.
"In theory there is no difference between practice and theory. In practice, there is." - Psychology Textbook.
User avatar
Kojack
OGRE Moderator
OGRE Moderator
Posts: 7157
Joined: Sun Jan 25, 2004 7:35 am
Location: Brisbane, Australia
x 534

Re: Ogre / Oculus Rift DK2 Progress

Post by Kojack »

Vive isn't delayed as such, it's just the backlog of orders getting longer.
No idea what's going on with cv1 in australia, hopefully it will be sorted soon.

Although if you want a CV1 rift, people ordering the rift / pc bundle just days ago from the Microsoft store got next day shipping, while those of us who ordered just the rift in January are still waiting.

Sixense are going to make an announcement this week about Stem shipping. It was supposed to ship this month (well, 1.5 years ago, but latest estimate was this month).
There's two anonymous leaks on reddit claiming to be sixense staff. One says the company is dropping Stem and we will only get a partial refund. The other one says that's false, but he misspelled Sixense as Sixsense. So I don't trust either.
User avatar
Zeal
Ogre Magi
Posts: 1260
Joined: Mon Aug 07, 2006 6:16 am
Location: Colorado Springs, CO USA

Re: Ogre / Oculus Rift DK2 Progress

Post by Zeal »

For my one, it's an addon provided as a couple of source files you can add to your C++ project.
Have you (or anyone) released the source for your wrapper/plugin? Or is everyone rolling their own?
Post Reply