Game Development Community

dev|Pro Game Development Curriculum

Torque 3D and Oculus Rift (A Tale in Pictures)

by Dave Wyand · 03/25/2013 (1:36 pm) · 33 comments







Torque 3D and Oculus Rift (A Tale in Pictures)

Back on September 20, 2012, we launched the MIT licensed version of Torque 3D on GitHub. Next on December 19, 2012, we launched the first new release under open source, version 2.0. Then on January 10, 2013, the T3D Steering Committee announced the roadmap for version 3.0. Within this roadmap was improved support for various input devices to take advantage of current and future controllers that are entering the PC market.

The first new input device was the Leap Motion with support added to the development branch as announced in my blog on January 24, 2013. the second new input device was the Razer Hydra, whose support was also added to the development branch as announced in my blog on February 22, 2013.

On the heels of these two devices, I am pleased to announce that I have been working on a third device but have not been allowed to talk about it until now. It is the Oculus Rift, a head mounted display and tracking system. Some of you may be aware of the Kickstarter project that allowed the Rift to become a reality, and I know there are community members that were part of that Kickstarter (myself included).

Thanks to the fine folks at Oculus VR I was able to procure a preview version of the Rift and have been modifying Torque 3D to work with it. I'm not yet ready to merge my work into the development branch but I did want to share with you all my progress. So let's get started!


The Story Begins...

Back in February, 2013, this happened:

www.gnometech.com/torque/images/blog-2013-03-25/2013-03-25-RiftAwe.jpg

Trying out the preview version of the Oculus Rift for the first time. It works even better when plugged in. With apologies to notch and crew


And then I tried this:

www.gnometech.com/torque/images/blog-2013-03-25/2013-03-25-FakeStereoRendering.jpg

Fake stereo rendering by starting with the normal screen, taking a vertical slice, and pasting with an offset for each eye. Works remarkably well and will likely remain as a fallback for underperforming systems.


Using the included Oculus VR SDK documentation, I was then able to get this:

www.gnometech.com/torque/images/blog-2013-03-25/2013-03-25-FakeStereoWithDistortion.jpg

The same fake stereo rendering but with the proper barrel distortion applied for the Rift.


After doing some work to make Torque 3D support true stereo rendering and the Rift's projection offset, I ended up with this:

www.gnometech.com/torque/images/blog-2013-03-25/2013-03-25-TrueStereoWithDistortion.jpg

True stereo rendering. Advanced lighting shadows are calculated once, with left and right views being rendered separately.


Torque 3D's graphics pipeline was not originally intended for stereo rendering so I ended up with errors like this:

www.gnometech.com/torque/images/blog-2013-03-25/2013-03-25-ShadowErrors.jpg

Sun shadows did not like the required projection offset.


And errors like this:

www.gnometech.com/torque/images/blog-2013-03-25/2013-03-25-LightErrors.jpg

Spot and point lights were being cleared after the left eye was rendered.


Fortunately, I was able to solve these issues:

www.gnometech.com/torque/images/blog-2013-03-25/2013-03-25-StereoBanking.jpg

Correct shadows and lights. Full head tracking, including support for bank/roll with the standard Player class. I will also be adding full head tracking to the Camera class.


And with the Rift, it looks something like this:

www.gnometech.com/torque/images/blog-2013-03-25/2013-03-25-RiftStack.jpg

Top: View in Rift without the lenses. Middle: The lenses attached. Bottom: The view through the right Rift lens with my testing Torque 3D level.


When I merge my changes into the development branch we will also include a demo to showcase Torque 3D and the Oculus Rift:

www.gnometech.com/torque/images/blog-2013-03-25/2013-03-25-DemoLevel2.jpg

Torque 3D demo level for the Oculus Rift. Completely original art created by our very own Ron Kapaun. Way to go, Ron!


We may also have a surprise or two for those that have been following my previous blogs:

www.gnometech.com/torque/images/blog-2013-03-25/2013-03-25-RiftAndHydra.jpg

A VR world with one gun in each hand? OMGWTFBBQ!


The journey continues...

- Dave

Page«First 1 2 Next»
#21
03/27/2013 (6:35 am)
http://www.gnometech.com/torque/images/blog-2013-03-25/2013-03-25-RiftAwe.jpg -- DO THE ROBOT!
#22
03/28/2013 (3:02 pm)
I believe the SDK for the Kinect motion camera is now being released by MS....much wider market base, I imagine?!?
#23
03/28/2013 (4:33 pm)
Damn!! Now why aren't my game designed for this kind of cool stuff? Awesome stuff you show week after week here on GG :o)

My mouse and keyboard game will look very old and Gothic soon if you keep on adding goggles and Razer stuff to T3D all the time :o)

#24
03/28/2013 (6:29 pm)
Very cool, I was hoping you were working on this quietly in the background. Is that some kind of advanced humanoid fly-catcher?
#25
03/28/2013 (6:47 pm)
nice to see the old True 3D glasses getting a remake, god knows where my old set are from the 90's. ;)
#26
04/05/2013 (2:58 pm)
Fantastic! Great job, y'all!

@Ron:
Quote:Designing for the Rift is VERY different then anything we have had to do previously.

Can you elaborate? I would assume that 3D assets are 3D assets, and would "just work" with the Rift. What was different about creating art content with the Rift in mind?

#27
04/05/2013 (5:30 pm)
About "Designing for the Rift", Polycount, Frames per Second, and Milliseconds it takes to render a single frame all need to be taken into account. Sorry to say it, but you will NOT be able to slap on your Rift and play Crysis 3. From what I have seen, games NEED to be designed with the Rift's limits in mind. Here is a good example; My Conifer Forest Demo pulls anywhere between 30 and 50 fps. However, it usually takes nearly 30 milliseconds to render 1 frame. This is about Twice what Rift requires to counteract the lag when moving. You counter this with smaller areas, and VERY optimized models. So, a tree that is normally 500 polys would need to be cut in half, polycount wise. You also have to be really aware of the scene as a whole. It's things like that... I needed to rethink and create an art pipeline specifically for Rift.

The great thing, it will only improve as rift gets used and optimized. Most of the demo we made was made on 1st version software. So things will get better.

Ron
#28
04/05/2013 (6:39 pm)
Thanks, Ron. That makes sense... Basically, build your levels like it's 1999. =)
#29
04/05/2013 (7:14 pm)
Well, no.... Not 1999 but somewhere between 1999 and today.... and This will improve over time. Eventually, you will be able to plug in and play your games. We just are not there yet.

Ron
#30
04/05/2013 (9:32 pm)
That was meant as a joke. (Guess it sucked.) =D
#31
04/07/2013 (12:44 am)
AWESOME!!! Definitely have to buy you guys a beer. We should all figure out Dave and Rons favorite pub and call in some beer orders for them:) Thanks for doing the up front leg work to get the Rift integrated with Torque!

I have been waiting around for this to add to iTerraform:) I can't wait to get my Rift:)

#32
04/10/2013 (3:44 pm)
make no mistake... this is not a rework of the old 3D Glasses tech... this is the real deal...

imagine being able to immerse yourself inside the game/walkthrough/etc instead of having to be an external player...

this promises to change the game in a BIG way... all we need now is a tactile hand interface... (i can see it now... a virtual world inhabited by one handed being on wheels :) )

THANKS for taking Torque (and us) in this direction...

--Mike
#33
04/10/2013 (3:53 pm)

Just a matter of time and this video shows how it could be/look with a device that could be used interactive
along with merging the player into the game
ofc just virtualy ;)
Page«First 1 2 Next»