POV-Ray : Newsgroups : povray.general : Overlaying object over an image : Re: Overlaying object over an image Server Time
26 Nov 2022 22:10:12 EST (-0500)
  Re: Overlaying object over an image  
From: m@b
Date: 24 Jul 2022 05:55:42
Message: <62dd171e@news.povray.org>
It has been pointed out that "image_width" and "image_height" are 
built-in POV-Ray variables.

Here is a corrected version of my answer:

> 
> here is mt previous answer rotated into the x, z, plane:
> 
> /////////////////////////////////////////////////////////////////////////


#declare Image_W = 2592;
#declare Image_H = 1944;


// perspective (default, not required) camera
camera {
   orthographic
   location  <Image_W/2, 10000, Image_H/2,>
   look_at   <Image_W/2, 0, Image_H/2>
   right     x*Image_W/1944   // aspect
   //direction<3129.6857,3102.3533,0>
   focal_point < 563.2927, 0, 1366.9001>
   aperture 3.6171875
   // direction z                        // direction and zoom
   angle 16                           // field (overides direction zoom)
}


box{<0,0,0>,<1,1,0.001>
     pigment {image_map {"D:/Files/Photos/Historic boats/027.JPG" once 
map_type 0 interpolate 2 } }
     finish {ambient 1 diffuse 0}
     scale <Image_W, Image_H, 1>
     rotate<90,0,0> // Rotate into the x,z plane
}

box{<0,0,0>,<900,2,-80>        // Size
     pigment{rgb<1,0,1>}           // Colour
     finish {ambient 1 diffuse 0}  // Make it visible
     translate<88,1,88>          // Move it about (the y*1 puts it above 
the image box)
}



> ////////////////////////////////////////////////////////////////////////


Post a reply to this message

Copyright 2003-2021 Persistence of Vision Raytracer Pty. Ltd.