Home Technical Talk

yes doctor, it's about my normal maps

mod
Offline / Send Message
rooster mod
maya 8.5:
I thought I'd get in a bit of texturing practice before dom war so I threw together a chunky gun design with some simple bits o' geometry, and proceeded to bake them down. I checked them all the way through using the high quality preview mode in maya, but this evening I gave rendering the model a go in mental ray and the mirrored bits of it are a bit fubar. I stuck it in xnormal, and although the mirroring is better (still seams) the overall shading is messed up (I checked swizzle -y)

I'd like to know if there's something wrong with my maps, or what. And if there is, how come high quality preview shows them pretty much perfect? is it lying to me? grah!

normal map and obj in:
http://www.redprodukt.com/post/norm_prob/
pic:
http://www.redprodukt.com/post/norm_prob/screwy.jpg

Replies

  • MoP
    Options
    Offline / Send Message
    MoP polycounter lvl 18
    High quality preview is probably most accurate. I guess Mental Ray isn't very good at handling mirrored UVs on normal maps, and XNormal might not display it well because the maps were baked in Maya - I bet if you baked the maps in XNormal it would probably look fine in Xnormal but broken in Maya.

    Different apps have different ways of calculating the information necessary to reconstruct an accurate preview of the normal maps (tangents and bi-tangents or bi-normals or something like that, I think), so it helps if your baker is also the thing you're going to be using to preview/render, otherwise it will calculate tangents differently.
  • EarthQuake
    Options
    Offline / Send Message
    This is probably simply from trying to do too much with too little geo, if you've got geo that lowres and you're using 1 single smoothing group you'll get problems like that. Split it up in seperate smoothing groups, rebake and see if that helps.
  • rooster
    Options
    Offline / Send Message
    rooster mod
    I'll try your suggestion eq, cheers. and do I also have to split the uvs along the smoothing splits?
  • Vailias
    Options
    Offline / Send Message
    Vailias polycounter lvl 18
    Mop is right on the money. Mental ray is interpreting the normal map in a very straightforward /simple manner and so the mirrored half of your UV's are getting their normal interpreted backwards. same as if you'd scaled your object by -1 on that axis.
  • rooster
    Options
    Offline / Send Message
    rooster mod
    I assumed if I just set the edges to hard that will achieve the same effect eq is talking about

    pretty dissapointed mr can't handle mirrored normals! surely there must be a workaround frown.gif
  • MoP
    Options
    Offline / Send Message
    MoP polycounter lvl 18
    And no, it's not because the geometry is too lowpoly, obviously since the highquality rendering mode looks fine (aside from a faint triangulation line down the flat side, which would probably be hidden if it was textured instead of flat colour).
  • Mark Dygert
    Options
    Offline / Send Message
    I'm not sure how you adjust the W space in Maya but basically it's the forward/back axis of your UV-W pieces. If I understand the problem correctly its rendering both UV pieces in the same space. If you pull one forward it will render it on top overwriting the one behind, giving you a non-messed up normal map, but you'll need to flip your UV piece so it doesn't light the mirrored piece backwards.

    Pulling one piece forward is how I get around this kind of thing, but I use max =/
  • MoP
    Options
    Offline / Send Message
    MoP polycounter lvl 18
    I'm pretty sure that won't fix it either Vig. It's just the way different renderers calculate normals. Moving the UVs in W space (if you can even do that in Maya) won't change how it's calculating tangents for mirrored sections.
  • Fuse
    Options
    Offline / Send Message
    Fuse polycounter lvl 18
    From my experience, mental ray in maya absolutely despises normal maps smile.gif
  • rooster
    Options
    Offline / Send Message
    rooster mod
    hmm no I dont think maya gives you access to w. Your theory sounds right to me MoP, bit of a pain in the arse though. So does that mean your games normal map rendering has to be tied in to whatever particular normal map generating algorithm your software uses?

    so to sum it up, they wrote a viewport preview that displays normals better than rendering in bleedin' mental ray..?
  • MoP
    Options
    Offline / Send Message
    MoP polycounter lvl 18
    Yeah pretty much, I assume because until very recently nobody really wanted to render stuff with normal maps, if you were using mental ray you'd probably be doing nurbs/sub-d work with procedural textures or 32-bit displacement maps etc., not much call for needing to handle RGB normal mapping!
  • IxenonI
    Options
    Offline / Send Message
    IxenonI interpolator
    For Rendering: Just flip the corresponding channels of the normal map, duplicate your base shader and change the normal map to the flipped one. Assign the shader with the flipped normal map to the mirrored geometry and render.
    Problem should be fixed...

    Don´t forget: Set texture filtering to of for a sharper renderings...
  • rooster
    Options
    Offline / Send Message
    rooster mod
    sounds plausable xenon nice one smile.gif
Sign In or Register to comment.