|
|
> I was wondering if there is a way to access the hit time (aka depth value)
> for the output pixels of a render. The idea is to render a heightfield with
> povray, and reading back each pixel ray's hit time.
Employ no light sources and make all your objects
hollow
texture {
pigment {rgb 1/eps + transmit 1-eps}
finish {ambient 1/255}
}
for small values of eps, eg 1/1000000. Now all your surfaces are (almost)
completely tranparent but add 1/255 to the brightness of the pixel. Hence
the byte value of the pixel (say its red channel) contains the number of
surfaces hit.
Note that I did not test this. To be sure you should set up a scene in
which every value for hit time occurs and check its output.
> [...] Also, I would need to be able to set up an orthographic
> camera (ie. the rays should be shot parallel to each other through the
> viewplane pixels, not originating from an eye point)
Orthographic cameras are directly supported. Look at the docs,
Section 6.4.2.2.
--
merge{#local i=-11;#while(i<11)#local
i=i+.1;sphere{<i*(i*i*(.05-i*i*(4e-7*i*i+3e-4))-3)10*sin(i)30>.5}#end
pigment{rgbt 1}interior{media{emission x}}hollow}// Mark Weyer
Post a reply to this message
|
|