|
![](/i/fill.gif) |
liuyang wrote:
> Thorsten Froehlich <tho### [at] trf de> 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?
Function trace_pixel in render.cpp is the highest level function in which
this information is still available (it is returned by Trace_Primary_Ray,
and currently not used). I would print it to a file there as quick and easy
solution. Something universally usable will be a lot more work though.
Thorsten
Post a reply to this message
|
![](/i/fill.gif) |