More VR Fun: Rendering Real 3D for VR
I have experimented a little with trying to create 3D images that actually look 3D. Years ago, I did the Stereo “Magic Eye” thing.
(this is supposed to be a woman reading a book on a couch)
About a decade ago, I also attempted my own red-cyan anaglyph (which doesn’t look that good).
So with Oculus Go, I discovered I could make my own 3D images with true left and right eye separation. The question is how?
Suffice it to say it took a lot of experimenting, but I finally created a 3D image that actually looks 3D when viewed in an Oculus, and you can download it here.
To view it, download the full 6000×3000 image to your computer, connect your Oculus Go to the PC using a USB cable. Put on Oculus to “allow” access to from the PC. Open up VR-Headset Drive, internal shared storage, and “Pictures” folder, and drop the beachside3D image into this folder. Put on the headset, open the “Gallery”, then “On this device”, then select the beachside3D image, then click on the 2D projection in the corner, and change it to 3D 180 projection. The result is a beautiful 3D image seen at the top of this post.
Yeah I know it’s complicated to view. Just as complicated to make.
Creating the Image
These instructions are for Poser, but you should be able to figure it out with DAZ Studio or any other 3D Rendering software.
First, you need a 3D set with a decent amount of complexity and depth. Then a subject matter that is positioned front and center. You want to use “Dolly Camera” with focal length 25mm (a wide angle lens) and Roll (z-axis spin) at 0.
Render however you want, but do not use depth of field, everything must be in focus. In this example I rendered 1280×720 resolution. If you make it bigger, you will have to adjust the dimensions of the black field accordingly. Once rendered, this is going to be your “right eye” image. Save it as a png file. To make the left eye, take the “yaw” angle (x-axis spin) and subtract 5 degrees, then adjust the x-axis camera position to re-center the main subject, and render again. Save it separately.
Oculus Go’s 3D 180 view assumes that the left eye and right eye information contains full 180 degree spherical view. Most 3D rendering programs like Poser and Daz Studio, do not have a way to do this natively, so you have to do multiple renders and stitch them together with panorama maker software like Hugin, but that is outside of the scope of this tutorial, as that takes hours maybe days to create and still might turn out wrong. We’re just making a view master style image.
Since the left, right, up and down views of the 180 degree view don’t exist, we are just going to frame our image in a square black window. Basically we are projecting our image and the black frame onto a spherical wall. If we make the frame too big, the image part will look too small, if we make the frame too small the image will look distorted.
After experimenting, I found a 1280×720 picture in a 3000×3000 black frame is a fair compromise. So we take the two png files and use our photo editing software to create a 3000×3000 black image with our picture centered in the middle. Once I have the two 3000×3000 pixel images, I combine them into a single 6000×3000 image, with the “left” image on the left, and “right” on the right.
If you don’t have an Oculus Go or some other VR, you can try using your eyes to combine the two images into one to see the basic effect.
Now that I have the basic formula down, I might try making more of these later. Let’s just say I have about a dozen failed experiments to get this one right.