Aven in stereoscopic 3D
Olly Betts
olly at survex.com
Fri Feb 16 22:07:49 GMT 2018
> On Fri, Feb 09, 2018 at 01:16:41AM +0000, Pedro Silva Pinto wrote:
> > #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.
I think your glFrustrum() changes are actually about right - the
resulting separations aren't actually exactly the same, but the effect
is fairly subtle.
I've adjusted this code to match an example in some SGI OpenGL docs:
ftp://ftp.sgi.com/opengl/contrib/kschwarz/GLUT_INTRO/SOURCE/PBOURKE/index.html
Since I don't have suitable hardware, I added a simple coloured stereo
mode, which I've tested it using coloured filter glasses from breakfast
cereal packets (red/green and red/blue both work - red for the left
eye):
https://survex.com/img/colour-stereo.png
I've pushed an experimental "stereo" branch to git with this code. It
defaults to trying to use opengl stereo (untested, but matches your
code), but you can comment out a '#define' in src/aven.h to get coloured
stereo.
Would people find a colour stereo mode useful? It was actually
something Survex's original "caverot" viewer had, but it seemed to be a
gimmick rather than something useful so I never bothered to reimplement
it for aven. But I notice therion's loch viewer supports it.
Cheers,
Olly
More information about the Survex
mailing list