I am trying to simulate the actual response of a camera given some object that is reflecting light. I've written a ray tracer, and have a BRDF that I need to use, and I have a camera sensitivity in terms of signal/Watts. But I am confused by one (rather important) detail:
Each ray coming out of the camera has some solid angle associated with it (this part I've already figured out). So each ray should then have a "Radiance" value associated with it (as radiance has units of W/(sr*m^2)). That way each ray would just multiply its solid angle by its radiance value, and you'd get an "Irradiance" value of W/m^2. However, I am unsure how to actually calculate this initial radiance value for each ray. The reason I am confused is because this seems to be backwards from what the BRDF is giving me.
A BRDF gives me the radiance leaving the surface in the direction of the camera, meaning the vertex of the solid angle is at the point of intersection. The solid angle for the ray however is defined flipped, with the vertex of the solid angle at the camera itself.
How do I bridge this gap? My idea is that is that if I can actually calculate the radiance for each ray, then I can simply multiple the radiance of each ray by its corresponding solid angle to get an irradiance value, then apply the inverse square law, and finally add up the irradiance for each ray per pixel and divide by the area of the pixel to get the wattage it receives.
But I am very lost as to how to calculate the radiance for each ray given that the only calculations I'm familiar with (the BRDF) returns a radiance value for a solid angle in the "wrong direction".
Am I misunderstanding what is going on? Am I approaching this incorrectly? Any help would be really appreciated!