POV-Ray : Newsgroups : povray.advanced-users : Depth output from POVray : Re: Depth output from POVray Server Time
30 Jul 2024 16:14:37 EDT (-0400)
  Re: Depth output from POVray  
From: muyu
Date: 26 Feb 2019 10:10:01
Message: <web.5c75558f50a5b2807d6f44740@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> "muyu" <lsy### [at] gmailcom> wrote:
>
> > I would like to get depth image and found your solution here. Thanks.
> > Beyond depth image, I would like to get the coordinates of each pixel.
> > Do you have any idea to do that? Thanks again.
> >
> > Best
> > Shouyang
>
> Hi Shouyang,
>
> Perhaps you could take a look at something a few of us worked on a while back:
>
>
http://news.povray.org/povray.tools.general/thread/%3Cweb.5ba183edb47e1707a47873e10%40news.povray.org%3E/?mtop=424641

>
> You could put your whole scene inside a union{} and then use the macro to output
> where the ray intersects the scene for each pixel.
>
> Alternatively, you might be able to use the color of the depth map to return a
> numerical z-position, and use the x,y position on the screen to give the rest of
> the vector info.   Using an orthographic camera would probably make life easiest
> here.
>
> So, create a deep gradient texture, apply it to an untextured scene, Then you
> can do an x, y nested loop with eval_pigment to determine the x, y, and z
> coordinates (within certain limits of accuracy)

Thanks for your answer. Your work on the trace macro is very interesting!
However, I did not know how to do that for all the pixels and output the
coordinates information. Could you please provide a small code example?
(Sorry for this greedy request.) Thanks again.


Post a reply to this message

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