POV-Ray : Newsgroups : povray.newusers : rendering stereo pairs in povray? : Re: rendering stereo pairs in povray? Server Time
29 Jul 2024 14:18:22 EDT (-0400)
  Re: rendering stereo pairs in povray?  
From: PM 2Ring
Date: 19 Sep 2005 12:15:01
Message: <web.432ee2b51d9357d37ac32c540@news.povray.org>
"spl" <nomail@nomail> wrote:
> Is there any intrinsic ability in povray that I've missed in my reading that
> supports rendering stereo pairs?

No, but there is an unofficial patched version of POV 3.5 called StereoPOV
at

http://stereopov.ichthyostega.de/

It renders both views simultaneously, for efficiency. Sometimes, a stereo
scene will only take 10% to 20% longer than the monoscopic view. It can do
stereo-aware antialiasing which is very efficient and allows you to use
jitter in antialias, which is normally a no-no for stereo pairs.

However, StereoPOV rotates the views, which is not the best way to make
stereo pairs. Still, I find StereoPOV a handy program to have for quick 3D
work.

> I can, of course, twiddle the look_from
> and look_at parameters appropriately but I was hoping that there might be
> some command or macro that I've managed to miss in my research.

I leave the camera location & look_at vectors alone and translate the camera
sideways as the last statement in the camera block. Assuming the camera is
looking straight ahead parallel to the z axis, then (according to the
literature) that if the distance from the camera to the centre of the scene
is D, then translate -0.014*D*x for the left eye & 0.014*D*x for the right
eye view.

I use NetPBM to join the pair into a .pns or .jps for flexibility in 3D
viewing.

Here's a stereo version of my RSOCP post, for a somewhat condensed example:

//--------------------------------------------------------------

//POV-Ray 3.1+ Scene File. Classic Pickover shell.
global_settings{max_trace_level 99 assumed_gamma 1}
#declare N=99;#declare K=.75;#declare A=-2;#declare D=(11/3-A)/N;
#declare B=.15;#declare C=.35/B;union{#declare I=1;#while(I<=N)
#declare T=I/N;#declare TH=A*2*pi;#declare R=B*exp(A*K);
sphere{<R*cos(TH),R*sin(TH),C*R>,R pigment{rgb<T,.6,1-T*T>}
finish{phong .7 reflection {0,1}}}#declare I=I+1;#declare A=A+D;
#end rotate x*9 translate<0,3,9>}light_source{<2,4,-8>rgb 1.3}
plane{y,-9 pigment{checker rgb 0 rgb 1 scale 5 rotate 45*y}
finish{reflection 1 ambient 0}rotate -x*35}
camera{translate x*0.014*5}

//--------------------------------------------------------------

And here's the .pns file:

http://i2.photobucket.com/albums/y43/PM2Ring/ShellQuick2LR.png

I've posted a few more stereo pairs in p.b.i over the last few months, but
most of them were just done in StereoPOV.

I love stereo pairs. I'm amazed that more POV people aren't doing them.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.