Jump to content

Mantra: depth of field quandary


Recommended Posts

I've found myself wondering recently how Mantra is computing depth of field.

 

I've created two test scenarios:

post-6960-0-33578000-1416516278_thumb.pn  post-6960-0-66953400-1416516299_thumb.pn

- 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:

post-6960-0-58983200-1416516735_thumb.pn

 

The hemisphere:

post-6960-0-82132100-1416516770_thumb.pn

 

 

I tried the same test in Arnold and got results that I was expecting (opposite of Mantra):

 

The plane:

post-6960-0-67587100-1416516953_thumb.pn

 

The sphere:

post-6960-0-61552200-1416517002_thumb.pn

 

 

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 by jkunz07
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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:

00.jpg

 

And an illustration:

Field-Curvature_LR.jpg

Edited by jkunz07
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...