|
|
> 2- Use this camera in your scene:
> (sorry, actually doesn't support vector3 direction)
>
> #declare ipd = 0.065; // Interpupillary distance
> #declare cameraLocationX = 0;
> #declare cameraLocationY = 0;
> #declare cameraLocationZ = 0;
> camera {
> user_defined
> location {
> function { cameraLocationX + cos(select(x,(x+0.5)*2,(x*2)) * 2 * pi -
> pi)*ipd/2*select(x,-1,1) }
> function { cameraLocationY }
> function { cameraLocationZ + sin(select(x,(x+0.5)*2,(x*2)) * 2 * pi -
> pi)*ipd/2*select(x,-1,1) }
> }
> direction {
> function { sin(select(x,(x+0.5)*2,(x*2)) * 2 * pi - pi) * cos(pi / 2 -
> (1-(y+0.5))*pi) }
> function { sin(pi / 2 - (1-(y+0.5))*pi) }
> function { cos(select(x,(x+0.5)*2,(x*2)) * 2 * pi - pi) * cos(pi / 2 -
> (1-(y+0.5))*pi) }
> }
> }
Hmmm... I don't know what I'm doing wrong, but even with a simple
test scene all I get is a black image. I'm using the latest alpha, and
it doesn't gives any error, but the ray count on the output is zero. Any
ideas?
--
#version 3.7;
global_settings{
assumed_gamma 1.0
}
plane{y,-10
pigment{rgb 1}
}
sphere{0,10
pigment{rgb <1,0,0>}
translate <0,0,50>
}
light_source{
100*y,10
}
/*
camera{
location <0,0,-1>
direction 1*z
}
*/
// ODS camera by Clodo
#declare odsIPD = 0.065;
#declare odsLocationX = 0;
#declare odsLocationY = 0;
#declare odsLocationZ = -1;
#declare odsDirectionX = 0;
#declare odsDirectionY = 0;
#declare odsDirectionZ = 1;
camera {
user_defined
location {
function { odsLocationX + cos(select(x,(x+0.5)*2,(x*2)) * 2 * pi -
pi)*odsIPD/2*select(x,-1,1) }
function { odsLocationY }
function { odsLocationZ + sin(select(x,(x+0.5)*2,(x*2)) * 2 * pi -
pi)*odsIPD/2*select(x,-1,1) }
}
direction {
function { sin(select(x,(x+0.5)*2,(x*2)) * 2 * pi - pi) *
cos(pi / 2 -
(1-(y+0.5))*pi) }
function { sin(pi / 2 - (1-(y+0.5))*pi) }
function { cos(select(x,(x+0.5)*2,(x*2)) * 2 * pi - pi) *
cos(pi / 2 -
(1-(y+0.5))*pi) }
}
}
--
jaime
Post a reply to this message
|
|