http://www.roadtovr.com/gdc-2014-oculus ... -11am-pst/
At GDC Oculus VR talked about an interesting method of decreasing input to rendering latency developed by John Carmack, called Time Warp.
In typical VR rendering:
- read the sensor orientation, apply it to the camera, render each eye into a render texture, apply barrel distortion compositor, present to the headset.
The problem is that the render to each eye step is slow. Even when we can render fast, there's still a delay from when it reads your head orientation to when you see the result. In normal games that doesn't really matter much, but in VR it hurts immersion.
Time Warp inserts a second sensor read between the render and the distortion compositor:
- read the sensor orientation, apply it to the camera, render each eye into a render texture, read the sensor a second time, apply barrel distortion and orientation compensation compositor, present to the headset.
So the main scene is rendered with the first head orientation. The distortion shader now includes support for the second orientation, showing an approximation of what you would see.
The latency between head orientation and view is now just the time it takes to do the compositor and presentation.
Handling position changes is harder.
The Oculus 0.3 SDK (not out yet) has some interesting stuff:
- C interface (with C++ helpers)
- position tracking
- support for DK1 and DK2
- SDK rendering (the sdk does all the shaders and stuff for you). They say this is the preferred way (no mention yet of how this integrates into an existing engine).
- Game rendering (the old way). The sdk provides a mesh that does the distortion and time warp using uv mapping instead of a per pixel distortion shader. This should be faster.
Interesting. I wonder how tricky it will be to get Ogre (in particular 2.0) to use a different mesh in a compositor (a distorted grid instead of a simple quad)?
Oculus Timewarp Rendering
- Kojack
- OGRE Moderator
- Posts: 7157
- Joined: Sun Jan 25, 2004 7:35 am
- Location: Brisbane, Australia
- x 534
-
- OGRE Expert User
- Posts: 1119
- Joined: Sat Jan 01, 2011 7:57 pm
- x 216
Re: Oculus Timewarp Rendering
IIRC you can register custom compositor passes (unless that was removed in 2.0, I don't know)Interesting. I wonder how tricky it will be to get Ogre (in particular 2.0) to use a different mesh in a compositor (a distorted grid instead of a simple quad)?
- Kojack
- OGRE Moderator
- Posts: 7157
- Joined: Sun Jan 25, 2004 7:35 am
- Location: Brisbane, Australia
- x 534
Re: Oculus Timewarp Rendering
The compositor is one of the parts of Ogre I haven't touched much (along with the terrain addon and rtss).