Results 1 to 2 of 2

Thread: Mentalray fisheye shader

  1. #1
    Join Date
    Nov 2011
    Posts
    8

    Thumbs up Mentalray fisheye shader

    Hello, everyone.

    I have some problem about mentalray shader.
    I am using the fisheye source code from below mentalray document.

    http://docs.autodesk.com/MENTALRAY/2....html#INDEX488

    In the upper page, there is no explanation about code,
    so I couldn't understand about below area.

    dir.x = camdir.x * r;
    dir.y = camdir.y * r;

    Because of upper code, the fisheye shader receive side effect when I change focal length.
    Is there anybody who can explain to me about this two line of code?
    Any advise or feedback about this problem will be very helpful for me.

    Thanks.

  2. #2
    Join Date
    Jan 2009
    Location
    Berlin/Germany
    Posts
    571

    Default

    Hi,

    these lines should perturb the original ray direction by the additional offset angle, which was computed earlier from the camera properties. As far as I can see, if you change focal length then the image will show different distortion in the center but less towards the edges of the circle/ellipse.

    I hope you are aware, that with a lens shader doing extreme manipulations you may fool some view-dependent algorithms in mental ray, including FG caching or "fine" displacement.

    Best, Steve.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •