Home Technical Talk

Desaturate bounce transfer maya mentalgay?

polycount sponsor
Offline / Send Message
malcolm polycount sponsor
Is it possible to desaturate the colour of a photon that bounces of a surface. I'd like a global control we have a lot of saturated textures in our scene and these are bouncing quite saturated light around the world. Right now I'm using global illumination scale set to 0.8 to fix some of it.

Replies

  • arrangemonk
    Options
    Offline / Send Message
    arrangemonk polycounter lvl 15
    how aout distributed rendering?
  • MoP
    Options
    Offline / Send Message
    MoP polycounter lvl 18
    arrangemonk: Distributed rendering is just network rendering, it's meant to speed up rendering lots of frames or heavy scenes, it doesn't have anything to do with desaturating bounced light in mental ray.

    malcolm: I thought there was a colour swatch setting for that, but I just checked and I guess I must have been thinking of Max's Light Tracer which has separate controls for colour bleed and bounced light multiplier - Mental Ray only seems to have the multiplier and the colour filter :/
  • Xoliul
    Options
    Offline / Send Message
    Xoliul polycounter lvl 14
    Vray also has a nice control for that in Max, would be a missing feature if Mental Ray doesn't have it...

    (btw, offtopic, but wow, I love your NBA home courts, Malcolm! Looks fantastic for realtime.)
  • arrangemonk
    Options
    Offline / Send Message
    arrangemonk polycounter lvl 15
    i meant multipass rendering
    the thing where you render your color layer and some grayscale layers and put them together in ps or fusion
  • glib
    Options
    Offline / Send Message
    i meant multipass rendering
    the thing where you render your color layer and some grayscale layers and put them together in ps or fusion

    This is probably the easiest way. Multi-pass isn't always one color and everything else greyscale though. In this case his secondary bounce only pass will be color, which can then be desaturated in post.
  • Slum
    Options
    Offline / Send Message
    Slum polycounter lvl 18
    Can MR even do separate render passes for bounced light, or is it all in the light pass?
  • nezach
    Options
    Offline / Send Message
    Yeah, it's like glib said, you can do an indirect pass, but it does not produce anything like an alpha map or selection to desaturate. It actually holds the color that the indirect lighting is transferring so it would have to be composted with that in mind.

    Other GI tricks are lowering the sample radius to control bleed. You usually have to up the sample amount if you do that though, which increases render time.

    Or you can use an exposure control node as a lens shader and use it to desaturate the scene colors globally.
  • nezach
    Options
    Offline / Send Message
    I just remembered a better way. Set your GI, or FG, or whatever, to render to file, and turn on material override using a shader with a neutral color, then render.

    After it's done turn off the material override and make sure your GI/FG is set to use file, (DO NOT REBUILD!) and then render again. The second render should show the materials and light bounces, but not have the color bleeding as the GI is being read from the file that used neutral colors.
  • Toast
    Options
    Offline / Send Message
    Toast polycounter lvl 11
    mip_rayswitch node is what you're after.
  • malcolm
    Options
    Offline / Send Message
    malcolm polycount sponsor
    Sorry I should have mentioned this is for baking lightmaps not rendering a frame. I've worked with a baker that used passes before but I think it's overkill in this case I'd just like to desaturate the result of the global illumination contribution. Looking into the mip_rayswitch node in the help file now.
  • malcolm
    Options
    Offline / Send Message
    malcolm polycount sponsor
    Can't find that node in the help file, is it maya 2009 specific, I'm still on 2008.
  • nezach
    Options
    Offline / Send Message
    Heh, yeah. He didn't happen to mention it's a hidden node, so it's not going to be in the documentation. To get it you can enter the MEL command
    createNode mip_rayswitch;
    
  • malcolm
    Options
    Offline / Send Message
    malcolm polycount sponsor
    And what do I do with this secret node to desat the global illumination.
  • MoP
    Options
    Offline / Send Message
    MoP polycounter lvl 18
    Yeah, I was wondering that too. It's all very well saying "mip_raySwitch" ... but that doesn't actually reveal much beyond that there's a node with various properties... no idea how it actually works.
    I did a quick google on it and it seems like there's some info out there, but it seemed far from complete - you guys seem to know how to use it, do you have time for a quick step-by-step?
  • nezach
    Options
    Offline / Send Message
    To my knowledge it's not usable as a global control and I would love to hear how it could be used as such. I've only used it, and seen it used, on a per shader basis.

    What it does is pretty much what it says on the tin. It gives you individual control channels for of each of the different ray types - eye, photon, shadows, etc. - so you can set them to return values independently of eachother. For it to fix your bleeding problem you could connect them up to the problem materials diffuse, copy your desired surface textures over to the eye ray input, and then set photon or Finalgather to something neutral to stop the bleed.

    The options I gave would work as passable global level fixes. Rendering FG/GI to file with a neutral material override would be a global equivilent to going through your shaders and connecting up mip_rayswitch nodes with neutral photon/FG ray returns to each one (minus the per shader level of control naturally).
Sign In or Register to comment.