[Pbrt-discuss] re: Access to camera within Film

sohn at cs.wisc.edu sohn at cs.wisc.edu
Wed Jun 1 13:30:45 EDT 2005


I don't think there is a way to gain access to the Camera from there and
even if you could, you would also need to know the point where each ray
intersects with a primitive to calculate the depth.

I just implemented something that solves a similar problem a couple of
weeks ago.

In my Scene class, I capture ray intersection information, calculate the
depth for the world coordinates of the intersecting point, and pass it
onto the Film class via Rays.

I have been meaning to clean up and release my code (which also captures
other information (basically Saito-Takahashi '90 G-Buffers) such as world
coordinates, surface normals, surface coordinates, and primitive IDs) for
awhile, and will probably do so soon.  Let me know if you would like to
get a copy of what I have now.

Jared




More information about the pbrt-discuss mailing list