Home Technical Talk

Rendering normal maps in mental ray for maya 6.0?

Daz
Daz
polycounter lvl 18
Offline / Send Message
Daz polycounter lvl 18
I've decided that the Maya>Zbrush>displacement map>mental ray pipeline is too slow on the rendering side for my immediate needs, and that rendering a normal map would work just fine. Only trouble is I can't seem to find the right shader setup. I've searched cgtalk and other places. The only thing I've found up to now is this shader http://www.headus.com/au/samples/norm-MR/index.html
but it's a lambert and It won't let me convert to anything else. Not quite sure how to rewire it to not be a lambert since the pull down is greyed out.

Someone out there must be rendering normal maps in maya? So annoying that it has to be a different shader than the one necessary to display normal in the viewport.

thanks

Replies

  • Eric Chadwick
    I'm not a Maya user, but I wonder if Olivier Renouard has something.
    http://www.drone.org/tutorials/normal_maps.html
  • malcolm
    Offline / Send Message
    malcolm polycount sponsor
    Hi Daz, you have two options.
    1. You can upgrade to Maya7 which supports normal maps out of the box now, just drop them in the bump channel and change the toggle from bump to tangent space normal map.

    2. The reason you can't turn that shader into a blin is because it is the initial shading group, just break the last connection in the list and hook it up to a brand new blin. You need to connect the output node to the normal camera of your new blin material.
  • Daz
    Offline / Send Message
    Daz polycounter lvl 18
    Thanks guys. Awesome malcom thanks! Totally missed the fact that it was the initial shading group. So, option 1 isn't available to me. Option 2 now works thanks. However, I'm finding that when rendered in mray the 'Z strength' of the normal map appears very subtle compared to how the Zbrush geometry looks. Should the shader compute them to be about right? Or is there some parameter within the shader that I should be playing with here to match how my geo looks in zbrush?
  • arshlevon
    Offline / Send Message
    arshlevon polycounter lvl 18
    hey daz have you checked out the new zbrush to maya pipeline PDF over at zbrush central?? i dont know about maya .. but i have been getting super fast renders with displacement maps and mental ray with max.. did some tests on my hell hound and the average render time was around 30 seconds.. maybe its some kind of settings problem? you should check the pdf if you havent.. its located here

    http://206.145.80.237/zbrush/media/ZBMAYA-pipeline.zip
  • Daz
    Offline / Send Message
    Daz polycounter lvl 18
    Ah cool thanks man I'll take a look. Perhaps I had something set up wrong with my displacement rendering, it seemed to take forever.
  • malcolm
    Offline / Send Message
    malcolm polycount sponsor
    Nope, mentalray Maya is just shit. Maya seems to have the slowest mentalray ever. I would imagine the max implementation is better if you can get that kind of speed from a displacement map. I basically find using any form of displacement map in Maya mentalray is so slow it is unusable because of the wait time for the render. Daz why don't you just render out a heightmap from zbrush and then use that, why even use normal maps at all they are just overhead unless you are working on a game which needs them.
  • Daz
    Offline / Send Message
    Daz polycounter lvl 18
    [ QUOTE ]
    I basically find using any form of displacement map in Maya mentalray is so slow it is unusable because of the wait time for the render.

    [/ QUOTE ]

    Well, this is my problem. It was seeming to take absolutely forever.

    All I really want here is a way to render my Zbrush models in mental ray as turntables, but I don't have a ton of time. Spitting out the geo isn't working for me since they're too dense, displacement mapping seems unbelievably slow to render, so I resorted to rendering normal maps. That seems problematic in terms of replicating what I have in Zbrush though, so I'm re-looking at displacement. Right now Im going over the doc Arsh posted with a fine toothcomb, to see if I have something set up wrong with my displacements. Use a heightmap how? Just as a bump you mean?
  • Keg
    Offline / Send Message
    Keg polycounter lvl 18
    best bet if just turntables is to get a somewhat high poly version which has all the silhouette details and use that as the base mesh with a normal map applied to it.
  • MoP
    Offline / Send Message
    MoP polycounter lvl 18
    Daz: Tried turning on the "Cage" option and exporting a mid-level control mesh from Zbrush, apply sub-d smoothing to that in Maya, and render out a greyscale bumpmap from Zbrush to apply to the smoothed mesh in Maya?

    Basically if your highest SDiv Level in ZBrush is 6, do this:
    - SDiv 3/4 with Cage enabled, export as OBJ.
    - Import into Maya, use SubD smoothing one or two levels.
    - Delete lower than 3/4 in ZBrush, turn off Cage, export greyscale displacement map (should only pick up fine details since lower levels are deleted).
    - Apply displacement as greyscale bump in Maya, render with MR.

    Should work, I think?
  • malcolm
    Offline / Send Message
    malcolm polycount sponsor
    Yep what Mop said, just use the greyscale heightmap as your bump, should be the same as your normal map but without the ghettoness you are experiencing.
  • arshlevon
    Offline / Send Message
    arshlevon polycounter lvl 18
    also daz.. another important tip when rendering out displacement/ bump maps..

    for a displacement map make sure the "mode" button is pressed under displacement settings.. for a bump map, unpress it..
Sign In or Register to comment.