Results 1 to 5 of 5

Thread: Generate mattes for materials seen in a secondary effect

  1. #1
    Join Date
    Dec 2005
    Location
    Chicago
    Posts
    2,578

    Question Generate mattes for materials seen in a secondary effect

    We have a situation where we would like to have mattes generated for materials seen in a reflection or refraction.

    I know mental ray can do this but I am forced to use the Autodesk framebuffer system. And for the life of me I can't wrap my brain around how to get it to work (if it's even possible in Maya)

    For example: I have a light bulb being rendered behind another lens. The lens generates its own passes and mattes correctly (it is seen directly by the camera) But I would like the light bulb seen through the lens refraction as a matte written to its own matte pass buffer (the one it writes to when seen directly)

    Ideally, RGB mattes. Red = directly visible matte, Green = matte from reflection, Blue = matte from refraction, but I will accept at least some sort of matte initially.

    A rayswitch does not do this for me. Instead it just gives me the red matte when it is directly seen by the shader. Now, I know the shader is being run because it's seen through the lens. But it doesn't write to its buffers unless it's seen directly. Technically that makes sense, it's the lens cover being rendered even though the lens sees the bulb. But I still need bulb information.

    Any ideas on how to achieve this with built in tools? Is my question clear? I can include a pic of what I am getting versus what I want too.

    Maya 2012, mr 3.9.1.47, Windows 7 64-bit

    Thanks!
    "Don't let anyone drive you crazy when you know it's in walking distance."

    "Don't argue with an idiot, they will drag you down to their level and beat you over the head with experience."

    http://elementalray.wordpress.com/

  2. #2
    Join Date
    Nov 2011
    Location
    Paris
    Posts
    99

    Default

    When you're talking about autodesk framebuffer and mental ray frame buffer, you're referring to using the default pass available in the render pass tab in the render settings (for autodesk framebuffer), and the use of customColor pass with writeToColorBuffer (for mental ray frame buffer), right ?

    Because I have tried many things to get matte in reflection/refraction, and even with writeToColorBuffer I never made it.
    And why can't you use mental ray framebuffer ?

  3. #3
    Join Date
    Dec 2005
    Location
    Chicago
    Posts
    2,578

    Default

    We're using write nodes to custom color like you mention.

    We're not using the mental ray framebuffer (proper) system because no one here writes shaders. So we have to rely on the Autodesk built in system.
    "Don't let anyone drive you crazy when you know it's in walking distance."

    "Don't argue with an idiot, they will drag you down to their level and beat you over the head with experience."

    http://elementalray.wordpress.com/

  4. #4
    Join Date
    Nov 2011
    Location
    Paris
    Posts
    99

    Default

    So what do you call mentalRay framebuffer ?
    I don't get what you are refering to

  5. #5
    Join Date
    Dec 2005
    Location
    Chicago
    Posts
    2,578

    Default

    Autodesk has their own framebuffer system built into Maya. It works how they wanted to write it.

    The framebuffer system in mental ray itself is more flexible than this.

    For example, I can write a shader that writes to an existing framebuffer if I want. Just name the framebuffer correctly. In Autodesk's system, it wipes my result clean if I try to write to one of their framebuffers, which is dumb. What if I wrote something I wanted to write to "reflection"?
    "Don't let anyone drive you crazy when you know it's in walking distance."

    "Don't argue with an idiot, they will drag you down to their level and beat you over the head with experience."

    http://elementalray.wordpress.com/

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
  •