Seeing a recent discussion on anaglyphs, I wondered if we could make
them in a single render. I did a search and found a trick used to make a
stereo image, using mirrors. See "Dawn Patrol" in
http://www.irtc.org/stills/1998-02-28.html
It's a simple extension of that method to make an anaglyph. I have
attached the final result, with two diagrams to show how it was made.
(Please note the model changed a bit in between these renders.)
The picture with the checkered floor (put in just for clarity in this
picture) shows the optical system. There are four "special" mirrors:
- The bright one nearest us has transmit 1 and reflection 1. So it's a
povray supermirror, transmitting *and* reflecting 100% of the light.
- The one directly behind it is just a normal mirror.
- On the right of the supermirror is a "blue" mirror, reflecting only
blue.
- On the left of the plain mirror is a "red" mirror.
"anaglyph1.jpg" shows what happens when the camera looks through the
system. Note that the two mirrors in the centre are at 45 degrees to the
x-y plane. The coloured mirrors are tilted a little from 45 degrees,
such that when we look directly towards the object, the centre of the
blue and red images are coincident.
Please note that on the two explanatory figures, I have given the
mirrors some diffusion to make them visible. Also, I have put a grey
background in these cases.
I think of the optics combined with the camera as the effective camera
system. I put a variable for the angle subtended by the two colour
mirrors. (The code is a bit dirty so I am a bit embarrassed to upload it
;-)
Problems:
---------
1. Note that I have cheated by choosing a greyscale image. This is
because the two coloured images should have the same tonality. If an
object in the scene were blue, it would look bright in the blue half,
and black in the red half. This is why I posted a message today about
whether a scene can be rendered in black and white (which ABX replied
to):
http://news.povray.org/povray.general/32924/
What we need ideally is a magic filter to put in between the camera and
the object to make it look monochromatic. I leave this for the povray
'dudes' to ponder on.
2. The mirrors have a finite size, so it would be difficult to use this
method with a very wide angle in the camera.
-- Big thank you to all the povray team for a great program!
--
Kaveh
Post a reply to this message
Attachments:
Download 'anaglyph.jpg' (75 KB)
Download 'anaglyph1.jpg' (47 KB)
Download 'anaglyph2.jpg' (86 KB)
Preview of image 'anaglyph.jpg'
Preview of image 'anaglyph1.jpg'
Preview of image 'anaglyph2.jpg'
|