Version 19 (modified by edy, 9 years ago) (diff)

--

Active Stereoscopic 3D for Unity

Bring true active stereoscopic 3D to your games!

By using two Unity Camera objects this plugin provides a true active stereoscopic 3D signal to the 3D hardware. Perfect support for stereoscopic real-time shadows and image effects. Settings include eye distance and parallax with parallel frustrum.

Windows only, 32 and 64 bits. Requires Unity 4 Pro or Unity 5 and the NVidia 3D Vision driver. Supported hardware includes IR emitters, DLP TVs (DVI/HDMI cable), LCD displays (dual-link DVI cable), anaglyph glasses and any HDMI 1.4-compliant stereoscopic 3D device (TV, bluray, etc). Devices not directly supported by 3D Vision require the software NVidia 3DTV Play to be installed. This package includes a modified version of the free script Stereoskopix 3D.

Available now at the Unity Asset Store!

Prerequisites:

  • NVidia 3D Vision driver for Windows is required (download).
    NVidia 3DTV Play for hardware not directly supported by NVidia 3D Vision (more).
  • Test your stereoscopic hardware using the 3D Vision Test tool.
    NVidia Control Panel > 3D Vision > Set up stereoscopic 3D > Test Stereoscopic 3D > Run Setup Wizard
  • Configure the 3D Vision settings at NVidia Control Panel:
    - NVidia Control Panel > 3D Vision > Set up stereoscopic 3D
    - Enable stereoscopic 3D
  • Configure your project at Unity 3D:
    - Target platform: PC Standalone, Windows x86 or x64

Demo:

A compiled demo is available for download . Use it for testing if your hardware supports the Active Stereoscopic 3D plugin. If the demo properly runs the Active mode in your hardware, then any Unity 3D project using the plugin will work as well.

Setup:

  1. Import the package (Asset Store > My Stuff > Active Stereoscopic 3D for Unity > Import)
    Unity 4 only: at the Project view, move the Plugins folder from the folder Active Stereoscopic 3D Plugin to the root of your Project.
  2. A Stereoscopic Main Camera prefab is provided, which includes all necessary components for composing the stereoscopic 3D image and communicating with the 3D Vision driver. Use this camera instead of the regular Main Camera.
  3. See below for detailed instructions on using the Plugin.

How to build the Demo project:

  1. Create a new Unity 3D project which includes the Character Controller package.
  2. Import the package Active Stereoscopic 3D for Unity into the project (Asset Store > My Stuff)
    Unity 4 only: Move the Plugins folder from Active Stereoscopic 3D Plugin to the root of your Project.
  3. Open the Demo Scene and click Play.
    You should see a side-by-side picture in the Game window. This is ok and means that the plugin is working properly. 3D Vision doesn't work inside the Unity Editor, but the plugin is combining the two cameras correctly in the Game view.
  4. Prepare to build the scene:
    - File > Build Settings: choose PC and Mac Standalone. Target platform: Windows.
    - Ensure the Demo Scene is the only one at Scenes in Build. Click Add Current if it's not there.
  5. Click Build and Run, then choose a folder for the built project.
    - You should see the scene in active stereoscopic 3D using your 3D hardware.

How to use Active Stereoscopic 3D for Unity in an existing project:

  1. Import the package Active Stereoscopic 3D for Unity into the project (Asset Store > My Stuff)
    Unity 4 only: Move the Plugins folder from Active Stereoscopic 3D Plugin to the root of your Project.
  2. Change your Main Camera with the provided Stereoscopic Main Camera prefab.
    Ensure to update all references to your old Main Camera so they now point to the Stereoscopic Main Camera.
  3. Configure scripts and effects:
    - Non visual scripts and effects (i.e. movement or behavior) should go into the Stereoscopic Main Camera gameobject.
    - Visual effects should go into both children Camera L and Camera R cameras. They are the cameras that actually take the pictures.
  4. Clicking Play should show you a side-by-side picture in the game view. This is ok and means that the plugin is working properly. 3D Vision doesn't work inside the Unity Editor, but the plugin is combining the two cameras correctly in the Game view.
  5. Build the scene following the same instructions as explained above for the Demo project.
    - PC and Mac Standalone, Windows.

FAQ:

Do i need a NVidia 3D Vision kit or a NVidia-certified projector?

No. The plugin works with any hardware supported by NVidia 3D Vision, which includes many devices from several brands. See the complete list. Ensure to test your hardware using the 3D Vision Setup Wizard (NVidia Control Panel > 3D Vision > Set up stereoscopic 3D > Test Stereoscopic 3D > Run Setup Wizard). Once it works there, the Active Stereoscopic 3D Plugin for Unity will work as well.

If your hardware is not directly supported by NVidia 3D Vision you need to install NVidia 3DTV Play. It provides compatibility with almost any 3D HDMI 1.4-compliant hardware, including HDTV, Bluray, etc.

nVidia 3D Vision already provides stereoscopic 3D for games. What's the difference with this plugin?

nVidia 3D Vision provides stereoscopic 3D effects for most 3D games based on Unity, without needing any plugin. It does that by "expanding" the camera at the driver level (DirectX) while Unity is rendering the scene.

nVidia 3D Vision stereoscopic 3D has some limitations, whcih are fixed by Active Stereoscopic Plugin for Unity:

  • Real-time shadows and image effects are not properly supported. They often cause "ghosting" and other artifacts in the stereoscopic scene. This happens because of the shadow phase still being applied once per frame, instead of once per eye and frame.
  • Expanding the camera at DirectX level can cause more camera displacement than the scene was designed to. The typical effect is to see through walls when approaching them if the collider is adjusted for monoscopic vision (as usually is).
  • Advanced 3D stereo settings cannot be properly achieved. You can tweak the parameters exposed by nVidia 3D Vision only. For instance, you cannot setup a frustrum-based stereoscopic parallax projection.

By using Active Stereoscopic 3D for Unity you can set up your scene using two Unity Cameras, one per eye. Then tweak the stereo parameters in the way you want. You have complete control over the settings for both cameras. A fully working camera rig prefab is included, which allows setting true stereoscopic 3D parameters such as parallax distance, frustrum convergence, etc. Each camera renders the full scene to each eye so everything is displayed as expected, including shadows and image post-processing effects.

Can I build a webplayer with this package?

No. The plugin uses a native DLL which is not suitable for the web player. Only Windows Standalone is supported.

I receive an error DllNotFoundException: NvStereoRenderer or Unity closes (no crash report) when loading the Demo Scene and clicking Play

At the Project view, move the folder Plugins from Active Stereoscopic 3D Plugin to the root of the project. Otherwise Unity will fail to load the DLL which is an essential part of the plugin.

I see a side-by-side picture in the Game view within Unity 3D, but no active stereo

This is ok and means that the plugin is working properly. 3D Vision doesn't work inside the Unity Editor, but the plugin is combining the two cameras correctly in the Game view.

Active Stereoscopic 3D will be available at the built project.

I see a side-by-side picture when running the built project, but no active stereo

  • Verify that Nvidia 3D Vision is properly configured in the Nvidia Control Panel as described in Prerequisites above.
  • Ensure that the component StereoCam in the Stereoscopic Main Camera has its parameter "Stereo Mode" as "Active".
  • Target platform at Build Settings must be PC Standalone, Windows.
  • "Use Direct3D 11" must be disabled at Edit > Project Settings > Player > Other Settings.
  • "D3D9 Fullscreen Mode" must be "ExclusiveMode" at Edit > Project Settings > Player > Resolution and presentation.

If the problem persist ensure that your system meets all the Prerequisites as described above.

The camera goes through the walls when approaching them

Update the plugin to the latest version.

I can't see a side-by-side picture, no active stereo, nothing, just a regular scene

Try building the Demo scene as described above. If you can now see the side-by-side picture in the Game view then there's something wrong with your project/scene:

  • Remove or disable any of your previous Camera objects. Keep only the Stereoscopic Main Camera from the prefab.
  • The component Stereo Cam in the Stereoscopic Main Camera must have its parameter "Stereo" as "Active".
  • Ensure you're not receiving any error DllNotFoundException. (See the corresponding FAQ question above).
  • Follow the checklist at the FAQ question above about having a side-by-side picture but no stereo.
  • Restart the Unity editor. Sometimes this is required to force a re-load of the plugin DLL.

If you still cannot see the side-by-side picture then there's something wrong with the plugin DLL. Find the component Nv Stereo in Stereoscopic Main Camera and enable "Show Log" to see what's happening.

About

This product is developed and maintained by Edy for Dembeta SL.
Feel free to contact me at edy @ dembeta.com.