|
|
Mike Horvath <mik### [at] gmailcom> wrote:
> Are there tutorials on how set up POV-Ray to make such images? I'm not
> using the look_at keyword in my camera statement. I am using up, right,
> and direction instead. How can I compensate for this?
I'm not sure if I'm replying to the right post, but anyway. If you have MegaPOV,
I wrote a macro to generate a cross-eye pair image in a single parse and render,
using the camera pigment feature. I've listed it below for interest - if you're
after a parallel pair you can just swap the sign of the CamX vectors in the
location statements of each pigment camera. I can't remember exactly but I think
you just set the macro parameters as if for a single view, call the macro
instead of making a camera, then use double the horizontal resolution for the
render size (I don't really run MegaPOV any more these days so I can't check
quickly).
It generates images like these:
http://news.povray.org/povray.binaries.images/thread/%3C4f0b6ac6@news.povray.org%3E/?ttop=374865&toff=50
If this isn't any use to you, never mind, maybe someone else will find it
interesting!
Bill
----------------------------------------
// Stereo pair camera macro
// needs megapov for camera view pigment
#version unofficial megapov 1.21;
#macro StereoPair(CPos, CLook, CAngle, CRight, CUp, BaseLine, Border)
// camera coord system
#local CamZ = vnormalize(CLook - CPos);
#local CamX = vnormalize(vcross(CUp, CamZ));
#local CamY = vnormalize(vcross(CamZ, CamX));
// replacement camera
camera {
location CPos
up CUp
right x*CRight
angle CAngle
look_at CLook
}
// coordinates for mesh screen
#local XDist = tan(radians(CAngle/2));
#local YDist = XDist / CRight;
#local LeftP1 = CPos + CamZ - XDist*CamX - YDist*CamY;
#local LeftP2 = CPos + CamZ - YDist*CamY;
#local LeftP3 = CPos + CamZ + YDist*CamY;
#local LeftP4 = CPos + CamZ - XDist*CamX + YDist*CamY;
#local RightP1 = CPos + CamZ - YDist*CamY;
#local RightP2 = CPos + CamZ + XDist*CamX - YDist*CamY;
#local RightP3= CPos + CamZ + XDist*CamX + YDist*CamY;
#local RightP4 = CPos + CamZ + YDist*CamY;
// mesh screen
// left
mesh {
triangle { LeftP1, LeftP2, LeftP3 uv_vectors <0, 0>, <1, 0>, <1, 1> }
triangle { LeftP1, LeftP3, LeftP4 uv_vectors <0, 0>, <1, 1>, <0, 1> }
texture {
uv_mapping
pigment {
camera_view {
location CPos + CamZ*1.1 + CamX*BaseLine/2
up CUp
right x*CRight/2
angle CAngle/2
look_at CLook }
}
finish { ambient 1 }
}
no_shadow
no_reflection }
// right
mesh {
triangle { RightP1, RightP2, RightP3 uv_vectors <0, 0>, <1, 0>, <1, 1> }
triangle { RightP1, RightP3, RightP4 uv_vectors <0, 0>, <1, 1>, <0, 1> }
texture {
uv_mapping
pigment {
camera_view {
location CPos + CamZ*1.1 - CamX*BaseLine/2
up CUp
right x*CRight/2
angle CAngle/2
look_at CLook }
}
finish { ambient 1 }
}
no_shadow
no_reflection }
#local R = Border * vlength(RightP2 - LeftP1);
union {
cylinder { LeftP1, RightP2, R }
cylinder { RightP2, RightP3, R }
cylinder { RightP3, LeftP4, R }
cylinder { LeftP4, LeftP1, R }
cylinder { LeftP2, LeftP3, R/2 }
pigment { rgb 0 }
finish { ambient 0 diffuse 0 }
no_shadow
no_reflection
}
#end
Post a reply to this message
|
|
|
|
> Mike Horvath <mik### [at] gmailcom> wrote:
>> I still don't understand what is the difference between a cross-eye pair
>> and a parallel pair? Also, which should I be making for the glasses I
>> ordered?
>>
>>
http://www.amazon.com/gp/product/B004EDB1S4?keywords=stereoscope&qid=1452568122&ref_=sr_1_90&sr=8-90
>
> A parallel pair is when you have the left eye image on the left, and the right
> eye image on the right. If the separation is small, you can view these by
> looking 'through' them and resolving the 'third' image in between to get the
> stereo effect. This is what the viewing glasses use. This is also how dot
> stereograms or 'magic eye' pictures work.
>
> A cross-eye pair is swapped; the left eye image is on the right, and the right
> eye image on the left. These can be viewed by looking 'in front of' them, by
> going slightly cross-eyed to resolve the 'third' image in between to get the
> stereo effect. This can be easier than the parallel method, and is not
> restricted so much by image size / separation. I don't know if any devices exist
> to help viewing these.
>
> hope that helps!
> Bill
>
>
For the cross eyed view, there are devices that do exist, but they are
bulkier and heavier as they rely on crossed periscope like setup.
They use 4 mirrors to swap the view points.
Post a reply to this message
|
|