|
![](/i/fill.gif) |
"Bald Eagle" <cre### [at] netscape net> wrote:
> "muyu" <lsy### [at] gmail com> 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
|
![](/i/fill.gif) |