|
|
Somewhere in the distant past I had a set up where I could render an
image in tiles by rotating the camera towards the region to be rendered
and shearing the camera to compensat for the 'distortions'. It required a
'long lens' so wasn't extremly usefull. This code is lost though and the
sad part is that I can't code it again as I don't remeber how.
Anyway, I thought to do it with the user_defined camera. No rotations or
shearing (I hope), just select a small section of the image and render it
to the proper resolution. But I fail.
In the scene below, two camera's, the user_defined one gives an identical
image to the commented out perpective one, pixel perfect says imagemagick
(without AA). With the commented out part of the user_defined camera I
intend select the top left quadrant and render that to a square image. I
get an image of a quarter sphere, not in the position I want and
stretched in strange ways. It looks as if the "canvas" needs to be moved.
But how?
ingo
---%<------%<------%<---
#version 3.8;
global_settings {assumed_gamma 1}
// +w400 +h400 +a0.001 +am3
camera {
user_defined
location 0
direction{
function{u*tan(radians(90)/2)}
function{v*tan(radians(90)/2)}
//function{select((u>-0.5 & u<0 ),0,0,u*radians(90)/2)}
//function{select((v> 0 & v<0.5),0,0,v*radians(90)/2)}
function{.5}
}
}
//camera{
// perspective
// location 0
// look_at <0,0,1>
// direction z
// right x
// up y
// angle 90
//}
background{rgb 1}
light_source {<100,100,-100> rgb 1}
sphere{<0,0 , 1>,0.5 texture{pigment{checker}} scale 5}
sphere{<0,0.5, 1>,0.2 pigment{rgb z} scale 5}
Post a reply to this message
|
|