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!

I didn't get this part:

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.

I'll try to explain how the whole thing works though. You have a light source, it emits light rays. Those light rays bounce around the scene and eventually end up at your camera film. So at the end of the day you have multiple rays hitting the film surface and the radiance of those gets multiplied with the sensitivity function. For efficiency reasons you usually start backwards - from the camera. But if you work with symmetric BRDFs this should not matter. So what arrives at your film is radiance, you multiply that radiance with the sensitivity function and integrate within a "film pixel" to get the result in terms of your screen pixel.

Edit: To clarify what I meant by integrated out:

If you have radiance which is a measure of W/(sr * m^2), you can integrate out sr or m^2 like so:

$$E(x) = \int_{\Omega}{L(x,\omega)\cos\theta\,d\omega}$$

From where you get irradiance at a point $$x$$, which gives you the energy arriving from all directions at point $$x$$ (W/m^2). Now you can go further and find out the energy that arrives at some surface with area A, by integrating over all points on the surface:

$$\Phi = \int_{A}{E(x)\,d\mu(x)} = \int_{A}\int_{\Omega}{L(x,\omega)\cos\theta\,d\omega\,d\mu(x)}$$

• What I meant by the comment you copied is that the sensitivity function I have to work with is a function of Watts. Radiance has units of Wm^-2*sr^-1. So if I multiply the radiance value by the solid angle represented by the ray, then I would get an irradiance value, with units Wm^2. I then multiply that by the surface area of the pixel that the ray originated from the get the Watts received, which I can then use in the sensitivity calculation. Jul 18 '19 at 17:42
• But the part that is confusing me is that the solid angles of the BRDF and of the ray appear (at least to me) to be opposite one another. The BRDF deals with solid angles whose vertex is at the point of intersection on the surface. The rays on the other hand have a solid angle with its vertex at the camera (more specifically, somewhere on the pixel that it was sent from. If no super sampling is done, then it originates just from the pixel center). So at the intersection point, the ray forms a cone in one direction, while the BRDF forms a cone in the exact opposite direction Jul 18 '19 at 17:45
• You're not multiplying radiance by a solid angle, to get a different measure you're integrating out the steridian part. Granted you're integrating over the solid angle, but multiply the radiance with the solid angle doesn't make much sense. The BRDF is not something related to the camera, its simply a function that describes the scattering properties of a surface at some point. It just tells you how ray coming from direction A scatters (and vice-versa). Jul 18 '19 at 17:49
• With graphics: [Here is a simple diagram of a ray] (upload.wikimedia.org/wikipedia/commons/b/b2/…). It is diverging away from the camera, so the solid angle of incoming light to the sensor represented by the ray has its vertex at the camera origin. This diagram of a BRDF shows that the solid angle diverging off the surface. Which is opposite how the ray looks at that point Jul 18 '19 at 17:50
• I understand it has nothing to do with the camera, but the rays reflected off the object are diverging away from the point they reflected off of. The camera rays however, are diverging from the camera, not the point they intersect. Jul 18 '19 at 17:52