POV-Ray : Newsgroups : povray.windows : MUST, be very simple: Win bmp as texture on objects : Re: MUST, be very simple: Win bmp as texture on objects Server Time
26 Apr 2024 15:38:25 EDT (-0400)
  Re: MUST, be very simple: Win bmp as texture on objects  
From: syntotic
Date: 2 Jan 2011 18:20:00
Message: <web.4d2106fd5827f18fb51759700@news.povray.org>
So! For a bmp image 595x345,
placed as a pigment image_map, interpolation 2, once,
translated [-.5,-.5,0] and _scaled_ 1330*<595,345,1>/345,
on a plane {z,2300}
seen through a camera at [0,0,0] looking_at [0,0,2300],
the original image displays well at size 597x345
with top corner located at 101,127
on a render size image of 800x600.

You get the idea... Height was adjusted, but width does not fit without losing
the vertical adjustment. Translate the image_map [-.6677,-.1367,0]: now it is
aligned to the top corner for a 800x600 render image size, but dims become
598x346. See the magic numbers? The script is brittle though may be enough for
my particular purpose... One pixel error in size does not seem much, but given
all other there possible adjustments... Once upon a time I had an image cropper
utility for these cases to ignore the black background and extract the image
only, (and a digested C++ COM controlled POV RAY version) but not anymore.
There _must_ be a simpler expression to locate a picture in a scene! I suspect
such expression may be quite simple for camera types other than default.


Post a reply to this message

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