|
|
Aha! I posted an incorrect solution earlier today, but I've apparently fixed
it. I will defineitly add this to my Camera Effects stuff.
Here is the code.
#local CamLook = <0,0,3>; // Camera's Look_at
#local CamLoc = <0,0.5,-6>; //where the camera's location is
#local cam_z = 2; //the amount of camera zoom you want
#local back_dist = 100; // how far away the background is
#local cam_a = 4/3; // camera aspect ratio
#local cam_s = <0,1,0>; // camera sky vectoy
#local cam_d = vnormalize(CamLook-CamLoc);
#local cam_r = vnormalize(vcross(cam_s,cam_d));
#local cam_u = vnormalize(vcross(cam_d,cam_r)); // camera up vector
#local cam_dir = cam_d * cam_z;
#local cam_right = cam_r * cam_a;
#declare fz = vlength(cam_dir);
#declare fx = vlength(cam_right)/2;
#declare fy = vlength(cam_u)/2;
camera {
location CamLoc
up cam_u
right cam_r * cam_a
direction (cam_d * cam_z)
}
box { <0,0,0> <1,1,0.1>
pigment { image_map { png "background.png"
map_type 0
interpolate 2 } }
translate <-0.5,-0.5,0>
scale 2*<fx,fy,0.5>
translate fz*z
scale back_dist
#local nz = vnormalize(CamLook-CamLoc);
#local nx = vnormalize(vcross(cam_s,nz));
#local ny = vcross(nz,nx);
matrix <nx.x,nx.y,nx.z,
ny.x,ny.y,ny.z,
nz.x,nz.y,nz.z,
CamLoc.x,CamLoc.y,CamLoc.z> }
Gev### [at] jpberlinde wrote:
> Hi!
>
> Is there any possibility to render images with a background image instead
> of a background color?
>
> Is there any patch for it?
>
> Gevatter
--
Josh English
eng### [at] spiritonecom
ICQ: 1946299
"Stress is when you wake up screaming and realize you haven't fallen asleep
yet."
Post a reply to this message
|
|