Home Technical Talk

maya mentalray final gather 3+ bounces possible?

polycount sponsor
Offline / Send Message
malcolm polycount sponsor
So I'm really trying to avoid using photons on our current project due baking time constraints has anyone figured out how to get more than 2 bounces of indirect light out of maya final gather? There is that option to turn on secondary diffuse bounces but that's it no option to do 3 or 4 bounces.

Replies

  • malcolm
    Options
    Offline / Send Message
    malcolm polycount sponsor
    Sorry forgot to mention I am on maya 2008 service pack 1 at work, looks like there is all types of new shit in maya 2009.
  • glib
    Options
    Offline / Send Message
    I really don't think that forcing FG into doing 3 or 4 bounces would be faster than using GI to generate photon hits and FG to smooth them, since that's what each was designed to do. I also don't think there's a way to do that, FG just wasn't designed to be a GI solution, more like a GI interpolater.
  • copain
    Options
    Offline / Send Message
    Hey malcolm, there is an other more hidden option:
    in the outliner, right click,, uncheck SHOW DAG OPTIONS ONLY, then find the midefault node and click on it, now in the attribute editor you should see more final gather options including Sec bounces.
    But as Glib mentions id dont know if this is a solution to your problem.
  • ivars
    Options
    Offline / Send Message
    ivars polycounter lvl 15
    I don't know what your scene setup looks like, but using a portal light might also help. That is if you are having light that comes through a window/door/opening of some kind. It basically makes your first bounce in to direct light, giving you an extra bounce that way... hard to explain... look it up in the help file unless you're already using it.
  • malcolm
    Options
    Offline / Send Message
    malcolm polycount sponsor
    Glib in maya 2009 you can force final gather to bounce as much as you like and it is substantially faster than emitting photons with global illumination + final gather.

    copain I found that tutorial about the secret midefault node but I think in maya 2008 as far as I know you can only add one extra bounce, which is also available in the final gather options window under render globals.

    Any ways I think I've found a solution in 2008, I wanted my skydome to emit bounces and because it's not emitting light there was no bounces coming from it, so I'll try emitting photons from the sky and direction light although this is mega slow compared to just emitting 4 bounces from fg in 2009.
  • ivars
    Options
    Offline / Send Message
    ivars polycounter lvl 15
    malcolm wrote: »
    Any ways I think I've found a solution in 2008, I wanted my skydome to emit bounces and because it's not emitting light there was no bounces coming from it, so I'll try emitting photons from the sky and direction light although this is mega slow compared to just emitting 4 bounces from fg in 2009.

    That's where the portal light comes in handy, it samples the outside environment and converts it to direct light through the portal. Check it out.
  • glib
    Options
    Offline / Send Message
    malcolm wrote: »
    Glib in maya 2009 you can force final gather to bounce as much as you like and it is substantially faster than emitting photons with global illumination + final gather.

    This made me curious and I ran a few quick tests, for me GI + FG with 5 photon bounces was significantly faster than straight FG with 2 bounces (second bounces checked on).

    Can you post your test scene so I could take a crack at that? I was just working with a really hastily made mockup.
  • malcolm
    Options
    Offline / Send Message
    malcolm polycount sponsor
    ivars couldn't find anything about a portal light using the maya search? Is it a mentalgay shader?

    Glib are you using GI + FG and emitting photons from your sky and directional light, if not all that's happening by turning on GI is you are disabling secondary diffuse bounces. Sorry can't post the scene I'm lighting a large outdoor environment for work, but here is a good example. Make a white plane with a red cube in the center make sure your shaders diffuse values are set to one rather than 0.8?. Make the mental ray skydome node under render globals and set type to texture rather than image. Change it's colour to white or what ever. Turn on FG and render. You will get something similar to ambient occlusion and your red cube will not be bouncing red light onto the white plane. Turn on secondary diffuse bounces in maya 2008 if you're in 2009 turn on secondary diffuse bounces to 1. Render, note the red cube now emits colour transfer onto the white plane. Now turn on GI in render globals rerender. Now it's back to standard FG again, unless there is a light source in the scene but since the sky is not actually emitting light in this case there is no colour tranfer. So you you can turn on photon emission from the sky and now the render will take longer as it has to do the photon transmission step. Unless I'm misreading your post in which case I apologize for this super long text I just wrote.
  • malcolm
    Options
    Offline / Send Message
    malcolm polycount sponsor
    Oh wait, I found the slowdown, turning on standard emission under photons of the skydome really slows down the photon emission. I think I need this feature on though for my particular render, seems much slower here at home though than at work. Could be my computer or they have slowed everything down in 2009.
  • glib
    Options
    Offline / Send Message
    malcolm wrote: »
    ivars couldn't find anything about a portal light using the maya search? Is it a mentalgay shader?

    Glib are you using GI + FG and emitting photons from your sky and directional light, if not all that's happening by turning on GI is you are disabling secondary diffuse bounces. Sorry can't post the scene I'm lighting a large outdoor environment for work, but here is a good example. Make a white plane with a red cube in the center make sure your shaders diffuse values are set to one rather than 0.8?. Make the mental ray skydome node under render globals and set type to texture rather than image. Change it's colour to white or what ever. Turn on FG and render. You will get something similar to ambient occlusion and your red cube will not be bouncing red light onto the white plane. Turn on secondary diffuse bounces in maya 2008 if you're in 2009 turn on secondary diffuse bounces to 1. Render, note the red cube now emits colour transfer onto the white plane. Now turn on GI in render globals rerender. Now it's back to standard FG again, unless there is a light source in the scene but since the sky is not actually emitting light in this case there is no colour tranfer. So you you can turn on photon emission from the sky and now the render will take longer as it has to do the photon transmission step. Unless I'm misreading your post in which case I apologize for this super long text I just wrote.
    I'll run a couple tests with the scene setup you mention, and I'm ready admit I'm wrong since I haven't done any serious mental ray work for at least a year and a half, but I'm still going to bet FG + GI is faster. You need to tweak your settings a fair bit though. With pure FG, you'll end up turning up your FG points and accuracy, then once you've reached as long as you're willing to wait for a render, you'll bring up the interpolation until the result is smooth.

    Emitting 10,000,000 photons takes maybe 20 seconds on my computer (which is far from being a powerhouse). When using FG + GI, the idea is that you keep your accuracy low in the GI settings as well as the FG. The GI chooses the colors and locations of the photon strikes, then the FG is just there to blend and smooth the result. Using straight FG with secondary diffuse bounces is a very slow process since it was never really designed for that AFAIK. They give you the option, but GI is still the ideal solution I think.

    I'll put together that scene and run a couple tests later today.
  • malcolm
    Options
    Offline / Send Message
    malcolm polycount sponsor
    In the same theme of this thread does anyone know a way to get ambient occlusion multiplied into this bake without compositing it later. I'm finding the FG + GI is physically accurate but it's not quite giving the look I'm after, I'd like to be dark in the cracks and right angles but still give colour bounce. I've found emitting light fromt he skydome with fg turned on and tuning the shadow quality to 8 and 8 gives the look I want but in my particular case this wouldn't make it into game correctly it would kind of be a hack to make it work.
  • glib
    Options
    Offline / Send Message
    Why is comping the AO afterward not an option? It would give you much more control...

    There are shaders which output a color-bounce as well as occlusion. I used to use a few on the lamrug.org site, but it appears they've gotten rid of them (or at least I can't find them there anymore).

    This looks like it might be a newer incarnation of that: http://www.highend3d.com/maya/downloads/shaders/Ambient-Occlusion---Fake-FG-for-Maya-4460.html
  • malcolm
    Options
    Offline / Send Message
    malcolm polycount sponsor
    Cool thanks for the link I'll check that out I've upped the point density and getting something closer to what I want.
  • ivars
    Options
    Offline / Send Message
    ivars polycounter lvl 15
    Portal light is a mental ray lightshader. You can find some more info if you look up "sun and sky" in the maya help.

    Also for the AO you should definitely look at the new mia_material which has built in AO.
    Or you could add a AO pass using renderlayers and the AO preset.
  • malcolm
    Options
    Offline / Send Message
    malcolm polycount sponsor
    Hey by the way is there any way to emit photons from geo, for example if I modeled a sky dome rather than using the mental sky shader.
  • malcolm
    Options
    Offline / Send Message
    malcolm polycount sponsor
    They physical sun and sky set is quite nice, but I can't seem to figure out how to change the shadow colour?
Sign In or Register to comment.