POV-Ray : Newsgroups : povray.advanced-users : depth values / hit times : Re: depth values / hit times Server Time
28 Jul 2024 18:20:40 EDT (-0400)
  Re: depth values / hit times  
From: nico
Date: 22 Apr 2004 09:15:00
Message: <web.4087c429218f8f5ce80ac7de0@news.povray.org>
"Chris Johnson" <chris(at)chris-j(dot)co(dot)uk> wrote:
> An alternative to these solutions is to modify the pov-ray source to do
> this. The distance a ray has travelled is returned already by the
> ray-tracing function, so its a very simple modification to set the pixel
> output to this. This might be a easier solution if you need a very accurate
> depthmap or need to customise the map further. Unless you've looked at the
> Pov-ray source before, though, Tim's method is less hassle.
>
> -Chris

Thanks for all the replies! Tim's method looks like a good suggestion,
although, now that I come to think of it, I think I forgot to mention
something which might not make it work.

In reality, I need to shoot rays to fixed positions (on a uniform 2d grid)
on the reference plane (the reference plane lies 'on top' of the height
field). I then want to have the distance travelled by that ray. This is
because, the input (eg 128x128 heightmap) has to exactly map to another
128x128 patch. The way to do this would thus be to iterate over the 128x128
positions on the reference plane, shoot rays, and deposit the depth on the
output 128x128 patch.

Chris, I haven't looked at the povray source before, but I have written my
own raytracers before. Any pointer where in the source I should look first?

Thanks,

--nico


Post a reply to this message

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