Import Stereoscopic Photos into VR Platforms

Jay Kusnetz
4 min readOct 31, 2021

--

This guide is specific to AltspaceVR. I suspect most of it will be applicable to other platforms like VRChat. While it could use some more screenshots, I think it’s good enough to publish. Thanks to everyone in the Altspace community who has helped with this method. (Dave Comeau, Ben G, Jimmy, etc)

Most of this could be automated, would love someone to tackle it.

What is needed:

side by side (sbs) format stereoscopic photos
Dummy photo
stereoscopic shader
note; the above are contained in the “release” zip file.

Stereophotomaker
Unity
XNViewMP
spreadsheet like Google Sheets
AltspaceVR account
VR Headset

The end result we want is a kit of stereoscopic photos, that will have the correct thumbnail and spawn properly. For example the Coney Island 01 kit, which can be accessed when you join the 3D Stereophotographs group.

First thing is to follow Jimmy’s tutorial on creating a kit.

Go to your folder of sbs images and make sure they have short descriptive names. ie small dog 01, small dog 02, large dog 01, etc.
DO NOT use anything but letters, numbers and spaces

Make a folder named how you want the kit named, with a -2k. ie: “Various Dogs -2k” and also a folder named “512”

Use Stereophotomaker to resize the pics to max dimension of 2048, saving the output to the -2k folder

Use Stereophotomaker Multiconvert to resize the pics to a max dimension of 512, AND set output type to be “single image”, saving the output to the “512" folder

Use XNViewMP and select all the pictures in the -2k folder. Menu “Create/File Listing”

Save as a “CSV”

Import that csv into a spreadsheet, you may have to define “:” as the separator

Column D label “Ratio X” and Column E label “Ratio Z”

The formula for Ratio X is:
=round(((B2 / 2) / C2),2)

The formula for Ratio Z is:
=round((C2/(B2 / 2) ),2)

do the magic drag thing to populate the formula columns

We will use the <1 ratio to set the image to the correct ratio in Unity

Copy the dummy photo to Unity Assets/Pictures. Copy the stereo-shader to Unity Assets/Pictures. Copy the -2k folder to Unity Assets/Pictures

In Unity Assets/Pictures create a new material. Assign the stereo shader to it, and the dummy picture to that. Ctrl-D to duplicate it. Move the duplicate to the -2k folder

In the -2k folder duplicate the material so that you have one for each image

In Unity, menu Game Object/3D Object/Plane

change the Plane to Rotation X90, Z180

Then duplicate it so you have one for each image.

Copy the first image file name. Select the first Plane’s name and paste. Then select the first material’s name and paste. Repeat for all the images

Start of Loop

Drag an image onto the matching name material’s stereo shader

Then drag that material onto the matching named plane

Set the Plane’s scale as per the spreadsheet. You want to use the number that is less than one. For landscape images that will be Z, for portrait that will be X

Repeat Loop for all the images

Now you can make them into a kit just as you did for the first step.

Chances are there will not be preview images of the pictures in the kit.

On altvr.com go to the kit, and on the left column click on “artifacts”

For each one, right click to open in a new tab. Then in each tab, you can click on “edit”. There will be an “image” field that you can use the “choose image” button. Use the 512 folder’s images for this. Adding tags might be a good thing. After “update” you can close the tab and go onto the next.

That’s it, you should now have a kit of stereophotos

--

--