When using custom fisheye lens shader, when the camera reaches a certain distance of a textured model then a grey blurry line will appear on the surface. As the camera moves closer to the model, then the grey blurry line moves along the surface until it suddenly sweeps across the entire model and disappears.
Issue Fixed in Mental Ray 3.14
Update: December 6, 2016
A new version of Mental Ray has been released and it contains a ray differential mode which fixes the grey blurry line issue for lens shaders. Maya 2016, 2016.5, 2017 supported.
Automatically apply the fix to all maya files nodes
— Must have Domemaster3D installed
— ‘Enable Elliptical Filtering on Maya File Nodes’ from Domemaster3D menu.
Many thanks to Andrew Hazelden and the Mental Ray Dev Team for fixing this bug.
Using Mental Ray 3.13? Here are some fixes:
- Switch to a Mental Ray texture network. This will completely fix the issue. This can be achieved by installing Domemaster3D and it create a maya shelf with a DomeMaterial button.
- Switch to using a hemicube camera rig. In some cases this isn’t an option, such as with subsurface scatter or screen space dependent features.
- Adjust the camera focal length to hide the grey blurry line. First try inputting 500 or 3500. This doesn’t always work, but it’s the best choice if you have way too many shaders to update into Mental Ray texture networks. This was previously my top solution for an easy fix and I still occasionally use it.
- If you’re rendering a displacement map and the surface suddenly appears low-poly just along the fisheye edges, then try unchecking ‘View Dependent’ within the displacement map settings.
Explanation of the Root Issue
The rendering artifact is definitely caused in the way Maya applies its mip-map texture filtering. I think there is a conflict in how the fisheye lens shader is working alongside the texture filtering, deep in the guts of Maya. This is only a slightly educated guess… but I’m no coder!
Update: June 3, 2016 – From a Mental Ray developer: Fisheye and equirectangular lens shaders may not work correctly with the Maya file node because the texture filtering distances are based on a projected flat image assuming a pinhole camera type. So the Maya file node uses values calculated in the Maya shading engine with that assumption. This is why switching to a Mental Ray file texture network fixes the issue, as Mental Ray has a mode which uses ray differentials instead of using the Maya shading engine calculations.