|
|
Nekar Xenos nous apporta ses lumieres en ce 2007/11/19 03:36:
> Here's a different approach to stereoscopic imaging without having to parse
> twice or use the clock setting. I don't know enough about lenses but I think
> someone might be able to tweak this to work correctly. I used a repeated
> spherical camera normal to get 2 images.
>
> //----------------------------------------------------
>
> #include "colors.inc"
>
> global_settings {
> assumed_gamma 1.0
> max_trace_level 5
> }
>
> // ----------------------------------------
>
>
> camera {
> right x*image_width/image_height
> location <0.0, 0.5, -4.0>
> look_at z
>
> normal {spherical /*scale <10,10,01>*/ translate <.5,.5,-.5> //
> pattern modifier
> warp {
> repeat x // repeat direction
> }
> translate -.5*y
> scale <.7,.7,10>
> //
> }
>
> }
>
>
> sky_sphere {
> pigment {
> gradient y
> color_map {
> [0.0 rgb <0.6,0.7,1.0>]
> [0.7 rgb <0.0,0.1,0.8>]
> }
> }
> }
>
> light_source {
> <0, 0, 0> // light's position (translated below)
> color rgb <1, 1, 1> // light's color
> translate <-30, 30, -30>
> }
>
> // ----------------------------------------
>
> plane { // checkered floor
> y, -1
> texture
> {
> pigment {
> checker
> color rgb 1
> color blue 1
> scale 0.5
> }
> finish{
> diffuse 0.8
> ambient 0.1
> }
> }
> }
>
> sphere { // reflective sphere
> 0.0, 1
> texture {
> pigment {
> color rgb <0.8,0.8,1.0>
> }
> finish{
> diffuse 0.3
> ambient 0.0
> specular 0.6
> reflection {
> 0.8
> metallic
> }
> conserve_energy
> }
> }
> }
>
> //-----------------------------------------------------------------
>
Try with this camera:
camera {
right x*image_width/image_height/3 //Otherwise, the sphere is
//stretched verticaly, a lot!
location <0.0, 0.5, -4.0>
look_at z
normal {cylindrical 0.5/*scale <10,10,01>*/ translate <.5,.5,-.5>
//pattern modifier
warp {
repeat x // repeat direction
}
translate -.5*y
scale <.7,.7,10>
//
}
angle 60 // to keep the sphere images from drifting apart
}
This camera get rid of the spherical distortion.
Good for parallel vewing.
--
Alain
-------------------------------------------------
Grandchildren are God's reward for not killing your own.
Post a reply to this message
|
|