POV-Ray : Newsgroups : povray.binaries.images : Playing with the mesh camera : Re: Playing with the mesh camera Server Time
1 Jun 2023 14:54:40 EDT (-0400)
  Re: Playing with the mesh camera  
From: Kenneth
Date: 26 May 2023 12:55:00
Message: <web.6470e1e1df2a87159b4924336e066e29@news.povray.org>
"Kenneth" <kdw### [at] gmailcom> wrote:
> "Kenneth" <kdw### [at] gmailcom> wrote:
> SO...after *MANY* experiments and failed attempts, here is my first successful
> meshcam color anaglyph-- rendered in a single pass with the 'meshcam_persp_demo'
> file, only slightly modified.
> The first thing you might notice is that all of the objects pop *out* of the
> screen, not into it...

I solved the 3-D depth problem of the objects appearing solely in front of the
'screen plane', and I'm generally happy with the single-render effect--
although the method I used is not ideal. (The only post-processing I did was to
add the text.)

Essentially, there is a basic horizontal translation of the 2nd camera mesh to
*get* the 3-D, then I rotated that mesh horizontally (about it's 'spherical
center point') to correct the in/out depth effect. But rotating the camera mesh
introduces subtle 'lens distortion' when that view is combined with the 1st
camera mesh; it's most pronounced near the diagonal edges of the frame, as
slight vertical color offsets . The mesh-camera's 'angle' setting (c_angle)
affects the amount of this distortion; I used 65 for this view, which is rather
wide-angle. With, say, 45, there is less offset.

Ideally, the objects in the two colored views should appear to have only strict
horizontal displacement; without the needed rotation, that IS so. To correct the
3-D depth appearance, I tried other strict translations instead-- but they
caused depth-REVERSAL problems (or wiped out the 3-D altogether.)

I think I understand why the rotated mesh causes the slight offset, but I don't
know how to correct for it.  It looks kind of like lens 'barrel distortion', but
not quite. So I tried invoking that feature in the demo scene, in a 'reverse'
way, but it affects BOTH meshes (since a single created mesh is used for both
views.) Of course, it's possible that there are other code changes or tricks
that might work instead of a simple rotation, but no luck so far.

As was suggested earlier, the *best* way to get such a stereogram would be to
use two separate mesh CAMERAS, rather than two meshes in a single camera. I
tried that-- but multiple 'camera' statements in a scene are not allowed, with
the usual error message, "More than one camera in scene, ignoring previous

Meanwhile, I continue to learn new things!

Post a reply to this message

Download 'meshcam_anaglyph_2_kw.jpg' (194 KB)

Preview of image 'meshcam_anaglyph_2_kw.jpg'


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