The Infamous Grey Blurry Line of Fisheye Lens Shaders

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.

To demonstrate the issue, here is a proof of concept Maya scene.
(requires Domemaster3D)


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.

MANUALLY APPLY THE FIX FOR A SINGLE MAYA FILE NODE
— Filter Type: MipMap
— Enable: Advanced Elliptical Filtering
greyblurrylinefix_mentalray-v314

AUTOMATICALLY APPLY THE FIX TO ALL MAYA FILES NODES
— Must have Domemaster3D installed
— ‘Enable Elliptical Filtering on Maya File Nodes’ from Domemaster3D menu.
domemaseter3d-apply-elliptical-filtering-to-all-maya-nodes

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.

4 thoughts on “The Infamous Grey Blurry Line of Fisheye Lens Shaders

  1. Pingback: Andrew Hazelden's Blog » LatLong lens shader compiled for mental ray for Maya 2011 on Mac OS X

  2. Pingback: Andrew Hazelden's Blog » latlong_lens and cubemap_lens mental ray shaders compiled for Windows x64

  3. Pingback: Andrew Hazelden's Blog » Controlling Texture Placement on mentalrayTexture Nodes

  4. Pingback: Domemaster3D adds mental ray 3.14 for Maya 2017 Support | Andrew Hazelden's Blog

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s