I have compiled the Arnold lens shader for Oculus rift for Autodesk Maya. I just followed the instructions from Solid Angle. Below is the download of the shader files along with instructions on how to use it.

Download Arnold Lens Shader for Maya - Oculus rift

Here is the code that was used to compile the above lens shader  https://support.solidangle.com/display/mayatut/Creating+a+Basic+Spherical+Camera .

I have included the visual studio project file here , since we might be using different versions of arnold SDK, I only have included the oculus files into this project.

Download Visual studio Project files

In order to use the above project file : First download the arnold SDK from https://www.solidangle.com/arnold/download/  ,then open the visual studio project file and change the include and library paths in the property pages. Once this is done , try placing the DLL file in the appropriate folder and check inside Maya.

The MtoA version I am using is , the Arnold SDK that I used to compile the DLL file is

Let me know if you have any questions.


  • Cesar says:

    Hi, i installed your shader but maya is not recognizing it.

    Do you know what could be happening?


    • Vivek says:

      Hi Cesar, it can be because of the Arnold version for maya, I have compiled it for , which is the Arnold version you are using ?

  • Cesar says:

    My version is
    I didnt know this was related to the mtoa version used.
    This way the shader would have to be upgraded for new versions?

  • Navjit Gill says:

    Getting this error, running ver
    Warning: [mtoa] Registering UI for unknown translator “oculusCamera” for Maya node camera. Valid choices are: “cylindrical”, “fisheye”, “orthographic”, “perspective”, “spherical”

    Any idea?


  • George says:

    Hello, for me its not working also, I’m using MtoA aybe you can do a tutorial for newbies to compile it. I have the tools but I don’t find the way.

  • TianD says:

    Hi,I encountered a problem when I coding a simpleShader.cpp follow the tutorial on official website: https://support.solidangle.com/display/mayatut/Creating+a+shader .
    When I compiled it, it reported errors:

    LINK : fatal error LNK1104: cannot open file ‘ai.lib’

    if I remove ‘ai.lib’ from linker-input , it will report errors:

    error LNK2019: unresolved external symbol __imp_AiNodeParamRGB referenced in function “void __cdecl Parameters(struct AtList *,struct AtMetaDataStore *)” (?Parameters@@YAXPEAUAtList@@PEAUAtMetaDataStore@@@Z)

    error LNK2019: unresolved external symbol __imp_AiShaderEvalParamFuncRGB referenced in function “void __cdecl Evaluate(struct AtNode *,struct AtShaderGlobals *)” (?Evaluate@@YAXPEAUAtNode@@PEAUAtShaderGlobals@@@Z)

    If you know, please tell me Thx very

  • Vivek says:

    Hi Tian,
    You need to download the Arnold SDK first https://www.solidangle.com/arnold/download/ and then point the include libraries to the lib folder . You should not remove ‘ai.lib’ . Hope this helps !

  • Vivek says:

    Hi Cesar, you are right it does not depend on the mtoa version, but it does depend on the arnold SDK that your mtoa was compiled on, I am using Arnold SDk , if your mtoa is compiled with a different SDK, then it wont work. I have re-compiled the DLL file and have also added the visual studio project in case you need to compile it by yourself.

  • Vivek says:

    Hey george , I have added the Visual project file now, so that you can compile it on your own . 🙂

    • George says:

      Thanks man, but got it on my own, thanks anyway. Which aspect ratio is the best option to use to don’t have stretched images?

      • Vivek says:

        I always prefer 1:1 aspect ratio for over-under,side by side renders, as it works better inside video players without pinching at the poles while projecting for different eyes .

  • George says:

    Hello Vivek, sorry for the late reply. Yes 1:1 works just perfect! Is there any way to compile the shader in Windows to use it on Mac downloading the right SDK for Mac version? Or should the Mac version be compiled using a Mac? I have both systems, but I don’t know how to do it on a Mac, I also didn’t found any documentation that help me. If anyone knows, will be appreciated. Thanks!

  • George says:

    I have installed the shader and it work just perfect except for one thing. I want to render “Under and Over” instead of “Over and Under”!

    Do you have any idea how I can do it ?

  • George says:

    hey Vivek,

    Amazing shader/ camera man. I have one issue thou. I want to render instead “Over and Under” in “Under and Over” but it seems it isn’t possible.

    Can you help me with that?

    • Vivek says:

      Hi George,
      In order to do that you will have to change the visual studio code, which is quite easy to do. If you dont use Visual studio, then let me the know Arnold version and the Maya version you are using , will be able to compile a version quickly.

  • Rory says:

    Hey Vivek,
    I saw you linked to this on a C4D forum for using C4DtoA inside C4D. I’ve put the shaders in the shader directories, trying to run the script form the C4D python script editor as I can’t see the path you mention for that. Not showing up though. I’m on a mac, running the latest versions of C4DtoA – 1.0.16. in C4D R17.
    Can I get this working on my system? Seems like the perfect solution for Oculus rendering with Arnold – for me with C4D!

Leave a Reply