POV-Ray : Newsgroups : povray.general : How to embed a rendered scene inside the scene itself? Server Time
30 Jul 2024 18:15:04 EDT (-0400)
  How to embed a rendered scene inside the scene itself? (Message 1 to 8 of 8)  
From: quickfur
Subject: How to embed a rendered scene inside the scene itself?
Date: 3 Nov 2008 16:25:01
Message: <web.490f6bc279a6bfd23f5033310@news.povray.org>
I have a scene with some objects, and a thin box representing a screen.
How do I texture the box with a rendered image of the scene as seen from
the box? I looked at the trace() function, but it only returns the point
of intersection, not the color of the intersection.

Thanks!


Post a reply to this message

From: Warp
Subject: Re: How to embed a rendered scene inside the scene itself?
Date: 3 Nov 2008 16:32:08
Message: <490f6dd8@news.povray.org>
quickfur <qui### [at] quickfurathcx> wrote:
> I have a scene with some objects, and a thin box representing a screen.
> How do I texture the box with a rendered image of the scene as seen from
> the box? I looked at the trace() function, but it only returns the point
> of intersection, not the color of the intersection.

  scenes/advanced/desk.pov is an example POV-Ray scene which does exactly
that.

-- 
                                                          - Warp


Post a reply to this message

From: Dan Connelly
Subject: Re: How to embed a rendered scene inside the scene itself?
Date: 3 Nov 2008 16:34:59
Message: <490f6e83$1@news.povray.org>
quickfur wrote:
> I have a scene with some objects, and a thin box representing a screen.
> How do I texture the box with a rendered image of the scene as seen from
> the box? I looked at the trace() function, but it only returns the point
> of intersection, not the color of the intersection.
> 
> Thanks!

I'd render the scene separately from the box, then use an image map.  You may want to
iterate, depending on if there is interaction between the image on the screen and
other scene elements, for example due to reflections or radiosity.

The iteration loop:
1. render scene from box (I'm not sure what you mean by this, actually... do you mean
from a camera associated with the box?)
2. use this as an image map for the box.
3. jump back to step 1 if needed
4. render the scene from the preferred camera


Post a reply to this message

From: quickfur
Subject: Re: How to embed a rendered scene inside the scene itself?
Date: 3 Nov 2008 17:00:00
Message: <web.490f74006123294a3f5033310@news.povray.org>
Warp <war### [at] tagpovrayorg> wrote:
> quickfur <qui### [at] quickfurathcx> wrote:
> > I have a scene with some objects, and a thin box representing a screen.
> > How do I texture the box with a rendered image of the scene as seen from
> > the box? I looked at the trace() function, but it only returns the point
> > of intersection, not the color of the intersection.
>
>   scenes/advanced/desk.pov is an example POV-Ray scene which does exactly
> that.
[...]

Ooh, lovely! Using "animation" to recursively embed a scene into itself.
Awesome idea, thanks for the pointer!


Post a reply to this message

From: Mark Birch
Subject: Re: How to embed a rendered scene inside the scene itself?
Date: 3 Nov 2008 18:40:01
Message: <web.490f8b426123294a4daddc090@news.povray.org>
"quickfur" <qui### [at] quickfurathcx> wrote:
> Warp <war### [at] tagpovrayorg> wrote:
> > quickfur <qui### [at] quickfurathcx> wrote:
> > > I have a scene with some objects, and a thin box representing a screen.
> > > How do I texture the box with a rendered image of the scene as seen from
> > > the box? I looked at the trace() function, but it only returns the point
> > > of intersection, not the color of the intersection.
> >
> >   scenes/advanced/desk.pov is an example POV-Ray scene which does exactly
> > that.
> [...]
>
> Ooh, lovely! Using "animation" to recursively embed a scene into itself.
> Awesome idea, thanks for the pointer!

Megapov has a 'camera_view' pigment which should do exactly this, without the
need for animation.


Post a reply to this message

From: Dan Connelly
Subject: Re: How to embed a rendered scene inside the scene itself?
Date: 3 Nov 2008 20:24:06
Message: <490fa436@news.povray.org>
Mark Birch wrote:

> Megapov has a 'camera_view' pigment which should do exactly this, without the
> need for animation.
> 

The reason why I am reluctant to jump over to these derivatives is that they fail to
keep up with the main POV development cycle.  Sure, if there's something you
absolutely need, they might be worth it.  But generally, there's plenty in vanilla POV
to keep me more than busy.

Dan


Post a reply to this message

From: John VanSickle
Subject: Re: How to embed a rendered scene inside the scene itself?
Date: 4 Nov 2008 17:41:08
Message: <4910cf84@news.povray.org>
quickfur wrote:
> I have a scene with some objects, and a thin box representing a screen.
> How do I texture the box with a rendered image of the scene as seen from
> the box? I looked at the trace() function, but it only returns the point
> of intersection, not the color of the intersection.

Render the scene from one viewpoint.  Use the resulting image as an 
image_map in the pigment of the screen.

If the screen is in the camera's view from the box's viewpoint, then 
you'll have to start with any old pigment for the screen, and then use 
the resulting image for the same render, and repeat until the original 
view can no longer be seen in the repeated versions.

Regards,
John


Post a reply to this message

From: Alain
Subject: Re: How to embed a rendered scene inside the scene itself?
Date: 4 Nov 2008 22:05:46
Message: <49110d8a@news.povray.org>
quickfur nous illumina en ce 2008-11-03 16:23 -->
> I have a scene with some objects, and a thin box representing a screen.
> How do I texture the box with a rendered image of the scene as seen from
> the box? I looked at the trace() function, but it only returns the point
> of intersection, not the color of the intersection.
> 
> Thanks!
> 
> 
> 
Do it in two passes.
First pass: rebove the screen and place the camera in it's location.
Second pass: Replace the box and apply the image from the first pass to it. Move 
the camera back to where it belong.

-- 
Alain
-------------------------------------------------
Any society that would give up a little liberty to gain a little security will 
deserve neither and lose both.
Benjamin Franklin


Post a reply to this message

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