POV-Ray : Newsgroups : povray.general : Background Images? Server Time
16 Oct 2026 23:57:43 EDT (-0400)
  Background Images? (Message 1 to 28 of 28)  
From: Valerie Robbins
Subject: Background Images?
Date: 7 Jan 2000 00:14:05
Message: <3875761d@news.povray.org>
Is it possible with POV Ray 3.1 to put in a background image.  I know about
the sky sphere, but I would like to have my objects in the foreground, and
then a bitmap (or some other graphic format) in the back, like a picture of
some snowy mountians.  Is this possible without actually modelling the
mountains?  I know that many software packages have features like this, but
I'm at a loss to find anything mentioned in the POV documentation on it.

-Val


Post a reply to this message

From: Alan Kong
Subject: Re: Background Images?
Date: 7 Jan 2000 01:22:00
Message: <lf1b7sk7moiosk7lnr1u2an7iaag721hs3@4ax.com>
Val, please see POV-Ray documentation, section 4.7.1.5 - "Image Maps".
Yes, an image can be used as a background or mapped to objects. Photo
images of people, product labels, or even other rendered images may be
used.

On Thu, 6 Jan 2000 21:20:40 -0800, in message
<3875761d@news.povray.org>, "Valerie Robbins" <vro### [at] earthlinknet>
wrote:

>Is it possible with POV Ray 3.1 to put in a background image.  I know about
>the sky sphere, but I would like to have my objects in the foreground, and
>then a bitmap (or some other graphic format) in the back, like a picture of
>some snowy mountians.  Is this possible without actually modelling the
>mountains?  I know that many software packages have features like this, but
>I'm at a loss to find anything mentioned in the POV documentation on it.

-- 
Alan - ako### [at] povrayorg - a k o n g <at> p o v r a y <dot> o r g
http://www.povray.org - Home of the Persistence of Vision Ray Tracer


Post a reply to this message

From: Nieminen Juha
Subject: Re: Background Images?
Date: 7 Jan 2000 05:36:57
Message: <3875c1c9@news.povray.org>
There's no way in povray to say "if the first ray shot from the camera
doesn't hit anything, then take that pixel from this image".
  This could be an interesting feature, though.

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Nieminen Juha
Subject: Re: Background Images?
Date: 7 Jan 2000 08:05:22
Message: <3875e492@news.povray.org>
mr.art <mr.### [at] gcinet> wrote:
: sky_sphere takes a pigment. A pigment can use an image map. And an 
: image_map can use map_type 1.
: sky_sphere { pigment { image_map {png "I:\Images\earth.png " map_type
: 1}}}

  It's not the same thing.
  My idea was that if the ray shot from the first pixel doesn't hit
anything, then the first pixel of the image is taken, and so on. This
regardless of the position of the camera.

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: mr art
Subject: Re: Background Images?
Date: 7 Jan 2000 08:14:07
Message: <3875E68F.99B68CD5@gci.net>
You could use one of the text positioning macros that I have seen
posted here. Just use the same math to place a plane or sphere segment
in the camera direction of view (camera normal?) and then put your image
on that. Everywhere you look, the image would be sure to follow.

Nieminen Juha wrote:
> 
> mr.art <mr.### [at] gcinet> wrote:
> : sky_sphere takes a pigment. A pigment can use an image map. And an
> : image_map can use map_type 1.
> : sky_sphere { pigment { image_map {png "I:\Images\earth.png " map_type
> : 1}}}
> 
>   It's not the same thing.
>   My idea was that if the ray shot from the first pixel doesn't hit
> anything, then the first pixel of the image is taken, and so on. This
> regardless of the position of the camera.
> 
> --
> main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
> ):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/

-- 
Mr. Art

"Often the appearance of reality is more important 
than the reality of the appearance."
Bill DeWitt 2000


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Background Images?
Date: 7 Jan 2000 09:08:33
Message: <3875f361@news.povray.org>
In article <3875c1c9@news.povray.org> , Nieminen Juha 
<war### [at] punarastascstutfi>  wrote:

>   There's no way in povray to say "if the first ray shot from the camera
> doesn't hit anything, then take that pixel from this image".
>   This could be an interesting feature, though.

Yes, for 3.5?


    Thorsten


____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

From: Robert J Becraft
Subject: Re: Background Images?
Date: 7 Jan 2000 10:05:41
Message: <387600c5@news.povray.org>
This can be done using image maps... see my site:
http://www.angelfire.com/md2/castlewrks/

While my use wasn't explicitely backgrounds, the technique can be used in
that fashion.

My own personal interest is in being able to build multiple image maps of
background terrain and plant materials that would be impossible to model
with the memory constraints current imposed by POVRAY.

Regards,
Robert J Becraft
aka cas### [at] aolcom


Post a reply to this message

From: Chris Huff
Subject: Re: Background Images?
Date: 7 Jan 2000 10:10:49
Message: <chrishuff_99-9A553C.10105907012000@news.povray.org>
In article <387600c5@news.povray.org>, "Robert J Becraft" 
<cas### [at] aolcom> wrote:

> My own personal interest is in being able to build multiple image maps of
> background terrain and plant materials that would be impossible to model
> with the memory constraints current imposed by POVRAY.

What memory constraints? The limit on the number of objects is so large 
I highly doubt you would ever reach it by accident. And to reach it on 
purpose would require a huge system, huge being an understatement.

-- 
Chris Huff
e-mail: chr### [at] yahoocom
Web page: http://chrishuff.dhs.org/


Post a reply to this message

From: Ken
Subject: Re: Background Images?
Date: 7 Jan 2000 10:19:21
Message: <3875FF95.7DCE6A01@pacbell.net>
"mr.art" wrote:
> 
> sky_sphere takes a pigment. A pigment can use an image map. And an
> image_map can use map_type 1.
> sky_sphere { pigment { image_map {png "I:\Images\earth.png " map_type
> 1}}}
> 
> I used a large png file.

Mr Art,

 Could you please refrain from posting images to this group. If necessary
post in .images and tell where it is posted.

-- 
Ken Tyler -  1300+ Povray, Graphics, 3D Rendering, and Raytracing Links:
http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/


Post a reply to this message

From: Paul Vanukoff
Subject: Re: Background Images?
Date: 7 Jan 2000 11:58:58
Message: <38761b52@news.povray.org>
Well ... maybe it wouldn't be *too* hard to write a little macro to position
a plane (or a flat box) a specified number of units (few thousand) away,
perpendicular to the camera's vector, and map an image onto at the right
size and ratio. If one knows one's mathematics that is .. hmm ...

--
Paul Vanukoff
van### [at] primenetcom


Nieminen Juha wrote in message <3875c1c9@news.povray.org>...
>  There's no way in povray to say "if the first ray shot from the camera
>doesn't hit anything, then take that pixel from this image".
>  This could be an interesting feature, though.
>
>--
>main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
>):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Mikael Carneholm
Subject: Re: Background Images?
Date: 7 Jan 2000 12:39:00
Message: <387624A9.770C0A88@ida.utb.hb.se>
Nieminen Juha wrote:

>   There's no way in povray to say "if the first ray shot from the camera
> doesn't hit anything, then take that pixel from this image".
>   This could be an interesting feature, though.

I've thought of this, too. Should fit in the background statement, if
background could take a pigment statement, like this:

background{
  pigment{
    image_map{
      ..
    }
  }
}

The BNF would then have to be modified to something like this:

<background_statement> ::= background { <color_statement> |
<pigment_statement> }
<color_statement> ::= color <3dim_def> <3dim_vector> | <4dim_def>
<4dim_vector>
<pigment_statement> ::= pigment { <const_color_statement> |
<image_map_statement> }
<4dim_def> ::= rgbt | rgbf
<3dim_def> ::= rgb
etc.


Post a reply to this message

From: Lance Birch
Subject: Re: Background Images?
Date: 7 Jan 2000 12:41:00
Message: <3876252c@news.povray.org>
Wouldn't it be MUCH simpler to use a format that outputs an alpha channel
and open it up in your favourite editor and simply overlay it onto the
background image with the alpha channel as the mask?

--
Lance.
The Zone - http://come.to/the.zone


Post a reply to this message

From: Chris Huff
Subject: Re: Background Images?
Date: 7 Jan 2000 12:41:22
Message: <chrishuff_99-2A343D.12413207012000@news.povray.org>
In article <3875c1c9@news.povray.org>, Nieminen Juha 
<war### [at] punarastascstutfi> wrote:

>   There's no way in povray to say "if the first ray shot from the camera
> doesn't hit anything, then take that pixel from this image".
>   This could be an interesting feature, though.

A "sky_plane" feature? Or "sky_box"? What about the reflections?
I think "sky_sphere" is sufficient. There is some distortion, but that 
can be corrected with the appropriate camera if the background image is 
rendered with POV-Ray.

-- 
Chris Huff
e-mail: chr### [at] yahoocom
Web page: http://chrishuff.dhs.org/


Post a reply to this message

From: AC
Subject: Re: Background Images?
Date: 7 Jan 2000 15:26:44
Message: <38764c04@news.povray.org>
Why not make the background work like a object so one can use normals on it
and all the other fancy things too.

Another day is gone.
Ambis

Chris Huff  wrote :
> What memory constraints? The limit on the number of objects is so large
> I highly doubt you would ever reach it by accident. And to reach it on
> purpose would require a huge system, huge being an understatement.
>


Post a reply to this message

From: Chris Huff
Subject: Re: Background Images?
Date: 7 Jan 2000 15:43:30
Message: <chrishuff_99-298844.15434007012000@news.povray.org>
In article <38764c04@news.povray.org>, "AC" <amb### [at] teliacom> wrote:

> Why not make the background work like a object so one can use normals on 
> it and all the other fancy things too.

If you want that, why not just use an object?

The background and sky sphere are not real objects, but they behave like 
objects at an infinite distance. All light rays hit at the same angle, 
normals and finishes wouldn't make any useful difference in the 
appearance, they would be a waste of processing power, and things like 
reflection might be impossible. Especially blurred reflection.

The sky sphere is more than adequate for most things, and if you need 
something to act like a real object you should use a real object.

-- 
Chris Huff
e-mail: chr### [at] yahoocom
Web page: http://chrishuff.dhs.org/


Post a reply to this message

From: Chris Huff
Subject: Re: Background Images?
Date: 7 Jan 2000 15:53:48
Message: <chrishuff_99-209397.15535807012000@news.povray.org>
In article <387624A9.770C0A88@ida.utb.hb.se>, Mikael Carneholm 
<sa9### [at] idautbhbse> wrote:

> I've thought of this, too. Should fit in the background statement, if
> background could take a pigment statement, like this:
> 
> background{
>   pigment{
>     image_map{
>       ..
>     }
>   }
> }

That isn't possible with the background statement, because rays aren't  
always shot from the camera. Where on the image_map or pigment would you 
sample for a refracted or reflected ray?

The sky_sphere feature is basically this feature(a pigment for the 
background) with that problem solved by using the direction of the ray 
to sample the pigment as if a sphere with that pigment surrounded the 
origin of that ray. At least, that is how I understand it.

Having an image follow the camera might be useful, but it shouldn't be 
mixed up with the background statement. And it might be better solved 
with a macro. I think there are already macros that do this.

-- 
Chris Huff
e-mail: chr### [at] yahoocom
Web page: http://chrishuff.dhs.org/


Post a reply to this message

From: Josh English
Subject: Re: Background Images?
Date: 7 Jan 2000 19:24:07
Message: <3876839E.CC3285A7@spiritone.com>
I came up with this solution a month ago for another similar post:
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> }


It uses a variation on the code that Peter Popov (I beleive) created to add a
renderd signature to scenes.

Josh English
eng### [at] spiritonecom

Valerie Robbins wrote:

> Is it possible with POV Ray 3.1 to put in a background image.  I know about
> the sky sphere, but I would like to have my objects in the foreground, and
> then a bitmap (or some other graphic format) in the back, like a picture of
> some snowy mountians.  Is this possible without actually modelling the
> mountains?  I know that many software packages have features like this, but
> I'm at a loss to find anything mentioned in the POV documentation on it.
>
> -Val


Post a reply to this message

From: Josh English
Subject: Re: Background Images?
Date: 7 Jan 2000 19:27:00
Message: <3876844C.ACFCA5BC@spiritone.com>
Ooops... the code was adapted from John VanSickle, not Peter Popov. Sorry for the
mistaked credit.

J


Post a reply to this message

From: Peter Popov
Subject: Re: Background Images?
Date: 7 Jan 2000 21:00:20
Message: <ypl2OAS=xKuzBqE4XZ5sLmm+vpCG@4ax.com>
On Fri, 7 Jan 2000 09:52:38 -0700, "Paul Vanukoff"
<van### [at] primenetcom> wrote:

>Well ... maybe it wouldn't be *too* hard to write a little macro to position
>a plane (or a flat box) a specified number of units (few thousand) away,
>perpendicular to the camera's vector, and map an image onto at the right
>size and ratio. If one knows one's mathematics that is .. hmm ...

How will it deal with perspective distortion?

Instead, render you picture with an alpha channel and a background
color close to or the same as the predominating color in the image you
want to use as background. Then use image_map and layered textures and
an orthographic camera to put the backdrop image behind it.


Peter Popov
pet### [at] usanet
ICQ: 15002700


Post a reply to this message

From: Peter Popov
Subject: Re: Background Images?
Date: 7 Jan 2000 21:07:01
Message: <pJt2OMYql0iPx7ZgUm4rpsgaRu5D@4ax.com>
On Fri, 07 Jan 2000 16:26:52 -0800, Josh English
<eng### [at] spiritonecom> wrote:

>Ooops... the code was adapted from John VanSickle, not Peter Popov. Sorry for the
>mistaked credit.
>
>J

I was about to mention it :) I think I asked for help and John stepped
up but I might not remember correctly (my memory is showing glitches
since I stopped drinking coffee).


Peter Popov
pet### [at] usanet
ICQ: 15002700


Post a reply to this message

From: Nieminen Juha
Subject: Re: Background Images?
Date: 8 Jan 2000 06:56:51
Message: <38772603@news.povray.org>
Lance Birch <lan### [at] usanet> wrote:
: Wouldn't it be MUCH simpler to use a format that outputs an alpha channel
: and open it up in your favourite editor and simply overlay it onto the
: background image with the alpha channel as the mask?

  Do you call _that_ simple?

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Nieminen Juha
Subject: Re: Background Images?
Date: 8 Jan 2000 06:58:07
Message: <3877264f@news.povray.org>
Paul Vanukoff <van### [at] primenetcom> wrote:
: Well ... maybe it wouldn't be *too* hard to write a little macro to position
: a plane (or a flat box) a specified number of units (few thousand) away,
: perpendicular to the camera's vector, and map an image onto at the right
: size and ratio. If one knows one's mathematics that is .. hmm ...

  How would it work with an ultra_wide_angle or a fisheye camera?

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Lance Birch
Subject: Re: Background Images?
Date: 8 Jan 2000 07:35:13
Message: <38772f01@news.povray.org>
> Lance Birch <lan### [at] usanet> wrote:
> : Wouldn't it be MUCH simpler to use a format that outputs an alpha
channel
> : and open it up in your favourite editor and simply overlay it onto the
> : background image with the alpha channel as the mask?
>
>   Do you call _that_ simple?

It is for me...

Of course if this were MAX I'd just set it up with a background set as
Screen mode with a bitmap mapping type and load the piccy... ;)  hehehe

Seriously though I shouldn't be that difficult to add this kind of
functionality to POV-Ray (not that I could do it, but I'm sure someone with
some good C knowledge could)

--
Lance.
The Zone - http://come.to/the.zone


Post a reply to this message

From: Steve Martin
Subject: Re: Background Images?
Date: 8 Jan 2000 08:33:43
Message: <38773C91.F24B17D3@usit.net>
>   My idea was that if the ray shot from the first pixel doesn't hit
> anything, then the first pixel of the image is taken, and so on. This
> regardless of the position of the camera.

Sounds like an application for a RenderMan imager shader. Groan.
Unfortunately, I don't think POV-Ray has anything like that.
Sounds like you'll have to composite post-render to get that
effect.


Post a reply to this message

From: mr art
Subject: Re: Background Images?
Date: 8 Jan 2000 10:53:44
Message: <38775D7B.33A7D3E9@gci.net>
My memory shows glitches even when drinking coffee.

Peter Popov wrote:
>  (my memory is showing glitches since I stopped drinking coffee)
> 
> Peter Popov
> pet### [at] usanet
> ICQ: 15002700

-- 
Mr. Art

"Often the appearance of reality is more important 
than the reality of the appearance."
Bill DeWitt 2000


Post a reply to this message

From: Robert J Becraft
Subject: Re: Background Images?
Date: 8 Jan 2000 12:23:03
Message: <38777277@news.povray.org>
My apologies... Machine memory constraints as imposed by the way POVRAY uses
the memory in a machine.

It would be nice to have an infinite resource platform to perform POVRAY
tracing on.  Unfortunately, financially speaking, very few of us do.

Chris Huff wrote in message ...
>What memory constraints? The limit on the number of objects is so large
>I highly doubt you would ever reach it by accident. And to reach it on
>purpose would require a huge system, huge being an understatement.


Post a reply to this message

From: Spider
Subject: Re: Background Images?
Date: 8 Jan 2000 22:30:02
Message: <3877F855.48CEAA48@bahnhof.se>
"mr.art" wrote:
> 
> My memory shows glitches even when drinking coffee.
memory? whats that? 
i wonder what this button does *click* >message sent. 
-- 
//Spider    --  [ spider@bahnhof.se ]-[ http://darkmere.wanfear.com/ ]
And the devil in black dress watches over
    My guardian angel walks away
Life is short and love is always over in the morning
    Black wind come carry me far away
            --"Sisters of Mercy" -- "Temple Of Love"


Post a reply to this message

From: Rune
Subject: Re: Background Images?
Date: 9 Jan 2000 08:00:33
Message: <38788671@news.povray.org>
Valerie Robbins wrote:
>Is it possible with POV Ray 3.1 to put in a background image.  I know about
>the sky sphere, but I would like to have my objects in the foreground, and
>then a bitmap (or some other graphic format) in the back, like a picture of
>some snowy mountians.  Is this possible without actually modelling the
>mountains?  I know that many software packages have features like this, but
>I'm at a loss to find anything mentioned in the POV documentation on it.

If you're using default perspective camera you can use the sky_sphere
together with my Illusion Include File.

It will basically map the image on the sky_sphere but while a normal
image_map applied to the spherical sky_sphere would be distorted, the
Illusion Include File prevents this.

It's available at http://rsj.mobilixnet.dk/3d/illusion/illusion.html

Greetings,

Rune

---
Updated December 22: http://rsj.mobilixnet.dk
Containing 3D images, stereograms, tutorials,
The POV Desktop Theme, 350+ raytracing jokes,
miscellaneous other things, and a lot of fun!


Post a reply to this message

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