New 3D StereoscopicRenderer plugin: Take your games into the next dimension!

 

Get it now:  3D StereoscopicRenderer Plugin

A little background on the road to stereoscopic 3D...

In the latest release of my Windows Phone app HoloPhone3D (http://holophone3d.com) I decided that I wanted to take the immersive depth experience even further and the only way I could do that was with stereoscopic 3D.  In theory, it sounded pretty simple, you already have one camera - so just offset it and toe it in and render the scene using each camera position.  Turns out that produced pretty poor results, it didn't really look very 3D and just generally gave me a headache.  So I decided that I would do some research on how to do it 'right'.  As part of my research I found an amazing talk from GDC given by Blizzard about the fundamentals of 3D they used to implement stereoscopic 3D for Starcraft 2.  (http://www.nvidia.com/content/PDF/GDC2011/Stereoscopy.pdf)  This paper is a fantastic read for people that want to understand how I built the plugin, but if you just want to use it - you can jump to the 'What it does Section'.  Also, with this plugin I've released the source.  The plugin is actually just one class that cleanly demonstrates the math behind stereoscopic 3D as well as lots of very cool pieces of technology for people that might be newer to programming such as: simple shaders, render targets, callbacks, and more.

 

What does the plugin do?

The plugin enables you to run your application in 5 different stereo rendering modes (NoStereo,  AnaglyphicRedCyan, AnaglyphicRedCyanOptimized, SideBySideFullColor, TopAndBottomFullColor).  These modes allow you to easily and dynamically target all available 3D formats from RedCyan glasses to 3D TV's and Monitors.  Most other 3D solutions on the market today require end users to have different configurations for different video cards and such.  This plugin will enable you to deliver 3D that just works everywhere, and you can easily build UI inside your game to let the user control their 3D settings.  Additionally, the plugin supports dynamically changing the stereo focal length (convergence - distance where things PopIn vs. PopOut) as well as an overall 'DepthEffect' property that controls the overall 3D experience for users (just like the slider on the Nintendo 3DS). 

 

How do I use it?

First, get the plugin in the 'Resources' section of the site (http://www.synapsegaming.com/downloads/resource.aspx?guid=46f57a92-57b3-4e34-80e0-418d5cf737f3).  The plugin augments the existing rendering constructs for SunBurn to enable you to make minimal changes (often less than 5 lines of code) and have full stereoscopic support for your game (and the ability to turn it off aswell).  The plugin handles all the heavy lifting behind the scenes so that you can write your game just like you normally would without having to make any changes.  The instructions are super simple, but I've also included a 10 minute tutorial video that shows how to use this plugin with the DoJo example.  The APIs are very simple and well documented, so hopefully you can just dive right in.  And of course if you want to know more, just debug it using the plugin source.

 

Anything else I should know?

Stereoscopic 3D in SunBurn works everywhere SunBurn does(Windows/XBOX/Wp7), however it still requires a little tuning of the parameters to get the best look and feel to complement your game.  Play with the tunable parameters by setting the EnableDebugTuning to true and using (R,F and T,G) to adjust the values of your 3D in real time.  Additionally, on average you can expect about a 40% performance impact as a result of rendering each frame twice.  Just keep that in mind, when thinking of your render cost,  if you need both 3D and high framerates.

 

What's next?

Please go off and try this on your stuff, post pics, videos and let me know how it goes.   I'm especially interested to see if this can work on XBOX titles (I'm looking at you, Orbitron ;) )  If you don't have 3D hardware check out my website for how to get some free 3D glasses just to get you going (http://holophone3d.com/free-3d-glasses/).   Also, please help support HoloPhone3D so that I can keep finding reasons to write code like this in my spare time. ;) 

 

Go forth and embrace the future of all things stereoscopic in SunBurn!   

-Holophone3D


Posted 05-10-2012 12:29 AM by holophone3d

Comments

CJ Bailey wrote re: All new 3D StereoscopicRenderer plugin : Take your SunBurn games into the next dimension with full stereoscopic 3D support... in less than 5 lines of code.
on 05-10-2012 4:24 AM

Simply stunning!

JohnK "bobthecbuilder" wrote re: All new 3D StereoscopicRenderer plugin : Take your SunBurn games into the next dimension with full stereoscopic 3D support... in less than 5 lines of code.
on 05-10-2012 8:00 PM

Awesome work, and the Holophone update looks amazing! :)

cemalsensivas wrote re: New 3D StereoscopicRenderer plugin: Take your games into the next dimension!
on 05-11-2012 11:12 AM

Fantastic!

cemalsensivas wrote re: New 3D StereoscopicRenderer plugin: Take your games into the next dimension!
on 05-15-2012 4:24 AM

Hello ! Is it normal when I use AnaglyphicRedCyanOptimized and look to final render, all orange-red things turns to appear greenish ? Regardless of the glass.. By the way its a great plugin!

cemalsensivas wrote re: New 3D StereoscopicRenderer plugin: Take your games into the next dimension!
on 05-15-2012 7:27 AM

And one more thing, how can we setup different stereoRenderer.StereoFocalLength adjustments for different objects ? For example if I tweak the values for a "popped out" spaceship so that my eye does not ache and there is no ghost effect, and look then to a far away object lets say a bird - it has "ghost"... Do I have to "batch" the objects according to their camera distances and then render in batches with different tweak values ? What do you think ?

Community Blogs wrote Oculus Rift 3D stereoscopic rendering support in SunBurn is here!
on 03-19-2013 1:16 AM

[View:www.youtube.com/watch] Start coding: 3D StereoscopicRenderer Plugin



Please login to post comments.