The Infamous Grey Blurry Line of Fisheye Lens Shaders

When using Domemaster3D fisheye lens shader, if 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. Here is a proof of concept Maya scene (requires Domemaster3D).



After Much Toil and Trouble… SOLUTIONS!
1. Best Option: Switching to a Mental Ray texture network completely fixes the issue. (thanks to Troy Whitmer of Sky-Skan for the tip!) Its a bit cumbersome to setup a mental ray texture network but luckily Andrew Hazelden has created a python script to automate this process. It can be found within Domemaster3D and the installation will automatically create a maya shelf with a DomeMaterial button. It also includes a mental ray texture network with bump map option.
2. Switch to using a hemicube camera rig. In rare cases this isn’t always an option, especially if you’re doing subsurface scatter and the render is screen space dependent.

The Focal Length Hack
Another option is to instead adjust focal length to try and hide the grey blurry line. First try 500 or 3500. This doesn’t always work, but its the best choice if its too much work to change all your shaders into Mental Ray texture networks. This was previously my top solution and I still occasionally use it.

Displacement Map – Low Poly Springline Glitch
If you’re rendering a model with a displacement map and the surface suddenly appears low-poly just along the springline (dome edge), then try unchecking ‘View Dependent’ within the displacement map settings.

…Just for Posterity (FYI research)
— Turn off the ‘Filter Type’ for the texture node. First try mipmap and if that doesn’t fix it then change it to OFF. But this can sometimes makes the texture appear noisy in renders. Doesn’t often change much.
— Spoke with an Autodesk Maya programmer, he suggested using eliptical filtering, which decreases the grey line width but its definitely still visible.
— In your camera put the “lens squeeze ratio” to 0. But this can sometimes makes the texture appear noisy in renders. Bump map shadows seem a little muted, but perhaps this could be fixed with bump map value adjustment. This rarely works for me.

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.

3 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

Leave a Reply

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

You are commenting using your 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