POV-Ray : Newsgroups : povray.newusers : z-buffer or depth buffer : Re: z-buffer or depth buffer Server Time
29 Jul 2024 02:20:14 EDT (-0400)
  Re: z-buffer or depth buffer  
From: Trevor G Quayle
Date: 15 Feb 2007 08:25:00
Message: <web.45d45f1d87ff3c95c150d4c10@news.povray.org>
"liuyang" <liu### [at] gmailcom> wrote:
> Thorsten Froehlich <tho### [at] trfde> wrote:
> > liuyang wrote:
> > > I need the distance of each pixel to the camera in the rendered scene. Is
> > > there a way to get it in Pov ray? I am doing an experiment to study the
> > > relationship between luminance and distance in natural or simulated world,
> > > so it is really important to know the exact distance and pixel
> > > relationship. Does the z buffer or depth buffer give me this information?
> >
> > Yes it does give you this information, but POV-Ray does not use either
> > because it is a ray-tracer. The same information is still computed, of
> > course, but you would need to modify POV-Ray to extract this information for
> > each pixel.
> >
> >  Thorsten
>
> Thanks, but how to modify Pov-Ray to get it?
>
> Yang

I believe megaPOV has some sort of ability.  One simple way to do it in POV
without a rewrite is rerender your scene with a simple gradient pattern
applied globally to all your objects oriented along the viewing vector.
You can then cross-reference this with the regular render.

-tgq


Post a reply to this message

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