jkunz07 Posted November 20, 2014 Share Posted November 20, 2014 (edited) I've found myself wondering recently how Mantra is computing depth of field. I've created two test scenarios: - A plane in front of the camera - A hemisphere in front of the camera With the plane, the center is 15m from the camera and the corners are about 20m away. Every point on the hemisphere is 15m from the camera. I would expect the depth of field to blur the edged of the grid and render the hemisphere in focus (focus dist. = 15m, f-stop = 0.01) When rendering I received the opposite result: The plane: The hemisphere: I tried the same test in Arnold and got results that I was expecting (opposite of Mantra): The plane: The sphere: I believe in Arnold, depth of field is simulated by shooting primary or camera rays from different positions on the aperature/sensor. My question is, how is Mantra simulating depth of field? The only thing I can think of is that it's using the surface position's z-coordinate in camera space? This would be constant across the plane, but varying across the hemisphere. Or maybe different positions on a sensor are being sample but the rays sent from the sensor are all parallel to the eye direction? Edited November 20, 2014 by jkunz07 Quote Link to comment Share on other sites More sharing options...
TheDude Posted November 20, 2014 Share Posted November 20, 2014 Definitely an issue with the renderer. I tested this with ASAD lens shader, and it also received the same incorrect rendering depth. Hopefully SideFX will pick up on this to correct the renderer. I presume then that only maxwell and arnold are the only 2 correct DoF renderers? A shame for volumetric rendering if you need DoF. I tested Vray and mentalray, both gave incorrect DoF also. Quote Link to comment Share on other sites More sharing options...
Guest tar Posted November 20, 2014 Share Posted November 20, 2014 Hopefully SideFX will pick up on this to correct the renderer. Best not to simply rely on hope! Please submit this to SideFx, their website under the Support menu. Quote Link to comment Share on other sites More sharing options...
eetu Posted November 20, 2014 Share Posted November 20, 2014 I wonder, is the z-buffer from Arnold spherical or orthogonal? Quote Link to comment Share on other sites More sharing options...
jkunz07 Posted November 20, 2014 Author Share Posted November 20, 2014 I wonder, is the z-buffer from Arnold spherical or orthogonal? The z-buffer is orthogonal in Arnold and matches the result of Mantra's Pz Quote Link to comment Share on other sites More sharing options...
jkunz07 Posted November 20, 2014 Author Share Posted November 20, 2014 All of the DOF in my tests is in render though, nothing in post or using Z. Quote Link to comment Share on other sites More sharing options...
Guest tar Posted November 20, 2014 Share Posted November 20, 2014 Without testing Mantra does seems correct to a real camera though. Quote Link to comment Share on other sites More sharing options...
jkunz07 Posted November 20, 2014 Author Share Posted November 20, 2014 (edited) There are optical aberrations in real cameras that make it impossible to get a plane facing the camera to be entirely in focus. It is referred to as "field curvature" or "Petzval field curvature" Here is a real world example of the effect: And an illustration: Edited November 20, 2014 by jkunz07 Quote Link to comment Share on other sites More sharing options...
Guest tar Posted November 20, 2014 Share Posted November 20, 2014 thanks! luckily lens are equipped with many more elements and the small aperture to take care of it to the diffraction limit.. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.