POV-Ray : Newsgroups : povray.general : Overlaying object over an image : Re: Overlaying object over an image Server Time
18 Apr 2024 19:38:56 EDT (-0400)
  Re: Overlaying object over an image  
From: jr
Date: 23 Jul 2022 15:45:00
Message: <web.62dc4efa8506b8621be3cd4b6cde94f1@news.povray.org>
"jr" <cre### [at] gmailcom> wrote:
> ...
> conceptually:
> ...

a simple example (I did have a little time on my hands :-)):

-----<snip>-----
#version 3.7;

global_settings {assumed_gamma 1}

#declare pigment_ = pigment {
  image_map {
    png "tinai.png"
    once
    map_type 0
    interpolate 2
  }
  scale <2.048,1.519,1>
};

#declare box_ = box {
  0, <2.048,1.519,.1>
  texture {
    pigment {pigment_}
    finish {ambient 0}
  }
};

#declare line_ = cylinder {0,<2.048,0,0>,.05 no_shadow};

light_source {<-1,1,-1>*1e3 color srgb 1 parallel}

camera {
  location <1,.75,-5>
  right x * (4/3)
  up y
  angle 35
  look_at <1,.75,0>
}

object {box_ translate <0,0,1>}

object {line_ pigment {color rgb x} translate <0,.5,0>}
-----<snip>-----

note that the image dimension (2048x1519) and such should all be stored in
variables, "magic numbers" in the code invariably lead to more work)


regards ,jr.


Post a reply to this message


Attachments:
Download '6digit.png' (16 KB)

Preview of image '6digit.png'
6digit.png


 

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