Aven in stereoscopic 3D

Pedro Silva Pinto pedrospinto at netcabo.pt
Fri Feb 9 01:16:41 GMT 2018


Thanks for the tips, Olly!
After a bit of trial and error, I finally got it to render a different
picture for each eye (take a look at the picture), but there are a few
things to fix:

#1: Even though a picture is generated for each eye, they are exactly alike.
In Stereo, you'd expect objects to render left and right with different
separations depending on their position along the Z axis. You can see in
this image that deeper parts of the cave are rendered with the same
separation as the rest. This happens both in plane and profile view (or
anything in between). Still, a perspective view is being generated, because
if I drag the view in any direction, closer objects move faster than more
distant ones.

#2: Scale is gone. I added glDrawBuffer(GL_BACK) to the start of
SetIndicatorTranform(), but no scale just the same.

#3: Camera positioning is somewhat affected. On first drawing and
plan-to-profile changes (and vice-versa) the objects are rendered out of
view. I need to zoom out to see them.

Issue #1 is the only major one. I'm guessing the math in the glFrustum call
needs to be changed (and probably also in glTranslated or glTranslatef
calls), but I'm clueless right now and the variations I tried didn't produce
results. Can you take a look?
Attached are the source files I changed. Look for the //PPinto comments.
Thanks!

Best

Pedro




More information about the Survex mailing list