POV-Ray : Newsgroups : povray.advanced-users : Depth output from POVray : Re: Depth output from POVray Server Time
30 Jul 2024 16:25:10 EDT (-0400)
  Re: Depth output from POVray  
From: Bald Eagle
Date: 25 Feb 2019 16:45:01
Message: <web.5c74617750a5b280765e06870@news.povray.org>
"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)


Post a reply to this message

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