Stereoscopic render

Started by Dune, December 23, 2021, 06:43:51 AM

Previous topic - Next topic

Dune

I am asked to make a steroscopic render (probably not equirectangular, but a plain view), which is also new to me, so any advice is welcome. Anyone having experience with this? Preferred size, etc.
Reading in the wiki: Zero par. dist. (metres): This value sets the distance between the camera and the zero parallax plane, the point in the scene at which the terrain features or 3D objects have no parallax.
I don't quite get how to interpret that. If I were to make a birdseye view of a village in the woods and the center of attention should be the village center, should I set converge (instead of parallel) and set distance from cam to center village? Or is this merely for small objects in front?

EDIT: it might need to be equirectangular ánd stereoscopic. Anyone tried that before? Advice?

EDIT 2: I begin to doubt if it's even possible to do this, unless there's some magic in TG as written in this article: https://www.videopoetics.com/tutorials/capturing-stereoscopic-panoramas-unity/
First half is easy to understand, but then there's code, too much code for me! An approximation seems possible, but it needs a special renderer, and I guess that's not the case in TG?

Hannes

I already made some 3D stereo images, but I used them for crosseyed viewing. So I just used the TG-internal 3D camera and rendered out the left and right images. Actually this is no problem, but I'm not sure, if you can do that to create equirectangular images. If I understood "equirectangular" correctly, it's for some sort of VR viewing, right?

Dune

Yes, right, so you can look around you on monitor or through VR glasses. But it's a bit strange, because when you turn your head, your eyes also turn and the view behind you can't be rendered from one camera. It would need a rotating camera and a lot of narrow vertical strips or render stitched together, if it's to work. At least that's what I learned so far.
I think I'm beginning to get my answer, but any additional input is by no means wasted ;)

Matt

#3
Terragen's stereo options work with the spherical camera. The strangeness that you refer to requires that each pixel of the image is rendered with the virtual "head" rotated to look in that direction. As you noted, this can't be done with two cameras at different positions, but you can simply enable the stereo option on the camera and Terragen will render this for you correctly.

The stereo effect diminishes to zero towards the poles at the top and bottom of the image where all head rotations are equally valid, and this is necessary to avoid discontinuities.
Just because milk is white doesn't mean that clouds are made of milk.

WAS

I keep forgetting we even have this. I never once have tried it so far. Lots of cool images that could be viewed this way.

Dune

You're my saviour, Matt! Thanks a lot. I knew TG to be very sophisticated, but didn't know you already had this implemented so coolly :) :) :)
A museum wants to have a medieval landscape with some castles and a monastery for a stereoscopic viewer in a new exhibition. Don't know precisely, but now I can at least get on with the negotiations.

Matt

#6
Quote from: Dune on December 23, 2021, 06:43:51 AMReading in the wiki: Zero par. dist. (metres): This value sets the distance between the camera and the zero parallax plane, the point in the scene at which the terrain features or 3D objects have no parallax.
I don't quite get how to interpret that. If I were to make a birdseye view of a village in the woods and the center of attention should be the village center, should I set converge (instead of parallel) and set distance from cam to center village? Or is this merely for small objects in front?

"Zero parallax" is where an object has the same pixel position in both images. "Zero parallax distance" is the distance from the camera at which this occurs.

When viewed on a 3D television or 3D cinema screen, "zero parallax" results in objects appearing right on the screen itself - neither closer nor further away. Objects closer to the camera than the zero parallax distance will appear to pop out of the screen, while objects further away than the zero parallax distance will appear to be pushed back into the screen.

Quote from: undefinedEDIT: it might need to be equirectangular ánd stereoscopic. Anyone tried that before? Advice?

If the equirectangular image is intended to be viewed on a VR headset, it is best to use the "parallel" mode. This effectively sets the zero parallax distance to infinity. In other words, objects far away from the camera will appear at the same pixel position in both eyes, and nearby objects will have some parallax.

If the images are intended for some other use, you would need to ask the client to be more specific about their requirements.
Just because milk is white doesn't mean that clouds are made of milk.

Dune

Thanks again, Matt. Absolutely clear.

Hannes

Curious to see, what you'll come up with!

WAS

Im gonna have to run some basic tests with that equirectangular method. Yeah definitely thanks for sharing this info. This topic peaked my interest.

Dune

Is there anyone with a stereoscope or VR-glasses, who can see if this little test works? If it does, I'll do some more elaborate tests, but at least I have some confidence to talk with the client ;)

René

Well, for what it's worth: I tried cross-eye 3D and it shows some depth. Same with red-green glasses, but only by shifting one image a bit horizontally, and besides, the red and green colors are probably not entirely correct. I overlaid both images and they are almost identical, only in the foreground there is a slight difference between left and right. Of course, these are rather clumsy tests, but it seems that there should be more space between the cameras. :)

Hannes

Isn't it normal, that there is a difference especially in the foreground?

Dune

I guess you really need the glasses to check it out indepth (literally), but thanks for taking the trouble. Also, as this is spherical, crosseyed watching won't reveal any depth 'behind' you (I guess).
I looked at some of these VR-glasses, but they're not something to buy in a whimsy just to check this out. I hope someone visits who can tell if this works alright. I used TG's basic spherical and stereo settings, so I wouldn't know about eye difference. Perhaps it depends on the glasses/stereoscope it's used in.

René

#14
Quote from: undefinedIsn't it normal, that there is a difference especially in the foreground?

Sure, it' s normal, that' s what gives the illusion of depth, but usually the differences are more significant, especially in landscapes that stretch over long distances. If you look at the shadow of the balustrade in the photo, you can see a redshift to the left in the foreground and further away to the right. Where red and green intersect is where the focus point should be.  :)

This is a very long article but only the first quarter is substantial.
http://paulbourke.net/stereographics/stereorender/