I'm doing some global illumination stuff. For my final gather, I place a camera at various points in my scene and do a render.
Here's the problem: The placement of my camera can be arbitrarily close to a corner (define for now as anywhere two planes meet at a right angle). Say I put the camera at the top of a wall. If it is close enough to the roof, the roof will be clipped by the near frustum plane and almost half my render will be black (incorrect, as the wall should pick up lighting from the roof and not see the black void beyond the roof).
Question: Given a point on a planar surface and it's normal, is there a mathematical formula for _exactly_ where I would have to place the camera and _exactly_ what the near clip plane value should be to avoid having any of the ceiling clipped out? Is there some other trick to get around a problem like this? Can I put the near clip plane slightly behind the camera?