Stereoscopic Interlaced Camera Rig Mode

I have a number of old 3d monitors which support passive interlaced stereo 3d. I’ve managed to create a RIG_MODE_STEREOSCOPIC_INTERLACED mode which works alongside the existing other modes and lets me use these monitors with babylon. Is there any interest in my packaging these changes up as a pull request and contributing them to the project or is this too niche a requirement to be of value to the wider community?

2 Likes

Of course yes;) this is really cool

As a former Stereographer, I can say this is one of the coolest things i’ve heard of in a while! YES PLEASE contribute these changes! LOVE it!

I did the original stereoscopic rigs, designed for a 3D TV. The post process was already interlaced.
https://github.com/BabylonJS/Babylon.js/blob/master/src/PostProcesses/stereoscopicInterlacePostProcess.ts

Can you be more specific on how yours is different?

Hi,
The current stereoscopic rigs support the following modes: (from camera.ts)

public static readonly RIG_MODE_NONE = 0;
    /**
     * Simulates a camera Rig with one blue eye and one red eye.
     * This can be use with 3d blue and red glasses.
     */
    public static readonly RIG_MODE_STEREOSCOPIC_ANAGLYPH = 10;
    /**
     * Defines that both eyes of the camera will be rendered side by side with a parallel target.
     */
    public static readonly RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL = 11;
    /**
     * Defines that both eyes of the camera will be rendered side by side with a none parallel target.
     */
    public static readonly RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED = 12;
    /**
     * Defines that both eyes of the camera will be rendered over under each other.
     */
    public static readonly RIG_MODE_STEREOSCOPIC_OVERUNDER = 13;
    /**
     * Defines that both eyes of the camera should be renderered in a VR mode (carbox).
     */
    public static readonly RIG_MODE_VR = 20;

    /**
     * Defines that both eyes of the camera should be renderered in a VR mode (webVR).
     */
    public static readonly RIG_MODE_WEBVR = 21;
    /**
     * Custom rig mode allowing rig cameras to be populated manually with any number of cameras
     */
    public static readonly RIG_MODE_CUSTOM = 22;

To these I have added:

    /**
     * Defines that both eyes of the camera will be rendered on successive lines interlaced for passive 3d monitors.
     */
public static readonly RIG_MODE_STEREOSCOPIC_INTERLACED = 14;

Using this mode,the first row of the display window will receive the image from the left camera, the second row from the right camera and so on.

None of the existing modes does this. Most 3d TVs allow you to convert a side-by-side or over-under image to the native interlaced display format of the TV, but my 3d monitor doesn’t.

My code renames and modifies your stereoscopicinterlacePostProcess.ts constructor with an extra parameter to indicate whether the new interlaced monitor mode is wanted, and if so sets a flag for the shader. I then modified the shader to do the right thing in that case.

Is that what you wanted to know?

I have now created a github request with my changes

Merged! Thanks a ton!

1 Like

Yes, that does, thanks.