POV-Ray : Newsgroups : povray.newusers : image as a background? : Re: image as a background? Server Time
30 Jul 2024 02:27:51 EDT (-0400)
  Re: image as a background?  
From: Slime
Date: 18 Nov 2004 12:53:06
Message: <419ce182$1@news.povray.org>
> how can you use an arbitrary image as a background in a pov file? i want
to
> put a photograph as the background, then generate my image over top of it.
> any ideas?

You should use the screen.inc include file ("3.7.20.3 screen.inc" in the
documentation). Then you can use the Screen_Plane (Texture, Scaling,
BLCorner, TRCorner) macro to place a plane in front of the camera, but use a
large value for Scaling so that it's farther away than the rest of your
scene.

This can all be done like this:

#include "screen.inc"

Set_Camera_Location(<1,2,3>) // use your camera's location
Set_Camera_Look_At(<4,5,6>) // use your camera's look at point

#declare backgroundImage = texture {
 pigment {
  image_map {
   tga "your_image.tga"
  }
 }
 finish {
  // ignore light sources
  ambient 1
  diffuse 0
 }
}

Screen_Plane (backgroundImage, 10000, <0,0>, <1,1>)

 - Slime
 [ http://www.slimeland.com/ ]


Post a reply to this message

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