-
I was looking into implementation of perspective camera, and noticed "importance" function doesn't scale with film plane distance squared at all. Only thing that comes to mind, is that the film distance in Mitsuba 3 is always normalized to one ? But I can't really understand why, and how ? The "film" dimensions in that case cannot be physically correct ? Ie. when I look at bounds of generated samples in camera space, they fall into around (-1,1) at Should I just consider the Point3f pmin(m_sample_to_camera * Point3f(0.f, 0.f, 0.f)), pmax(m_sample_to_camera * Point3f(1.f, 1.f, 0.f));
m_image_rect.reset();
m_image_rect.expand(Point2f(pmin.x(), pmin.y()) / pmin.z());
m_image_rect.expand(Point2f(pmax.x(), pmax.y()) / pmax.z());
m_normalization = 1.f / m_image_rect.volume(); Any help is much appreciated. And sorry for bothering again, I really cannot find any sources, which might explain this topic a little bit better... |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi @xacond00 I'm unfamiliar with those works, so take the following with a pinch of salt - there might be some explanations that are specific to whatever setup they are doing/using in their work. Fundamentally, where the film physically lies on the camera's z axis is irrelevant (assuming you're scaling it to keep the correct fov). As you've pointed out, we chose |
Beta Was this translation helpful? Give feedback.
Hi @xacond00
I'm unfamiliar with those works, so take the following with a pinch of salt - there might be some explanations that are specific to whatever setup they are doing/using in their work.
Fundamentally, where the film physically lies on the camera's z axis is irrelevant (assuming you're scaling it to keep the correct fov). As you've pointed out, we chose
d=1
inPerspectiveCamera::importance()
, so the measure should now be1 / (A * cos(theta)^3)
. The1/A
term of that measure is indeed computed inm_normalization
. Semantically, it should be equivalent to inverse area occupied by the film in camera space. So to compute it, we must figure out where the top-left corner and bottom right…