Home Technical Talk

I fail at normal maps

Hi everyone, first post here on Polycount. I'm a currently a student working on becoming an environment artist someday, but unfortunately I seem to have hit a speedbump. When rendering normal maps in Maya I've been having this issue which seems to be a caused by my UVs, to be honest, I'm really not sure. I've tried re-baking the normals with a variety of settings with little success, I've also tried baking them in Xnormal with the same results. Things show up fine in Xnormals viewer as well as the high quality viewport render in Maya, but if I render them out in Mental Ray or if I import into Unreal I get crazy seams.

In Unreal

goddammit.jpg

In Maya
Urinal_1.jpg

and here is a different object in Mental Ray
bakingcookies2.jpg

No on the second object it appears that 3 out of the 4 sides have one of the channels flipped, but I don't know why that would be. Anyways, hopefully someone here can shed some light on the situation.

Thanks,

Rob

Replies

  • Ryan Smith
    Options
    Offline / Send Message
    Ryan Smith polycounter lvl 11
    how about posting your normal maps?
  • tom.drin
    Options
    Offline / Send Message
    tom.drin polycounter lvl 17
    Some programs use different settings in channel direction of NM - maybe its your problem.
    Try flipping channels in normal map. I think it could be green channel. Just open it in photoshop and invert this channel.
  • rooster
    Options
    Offline / Send Message
    rooster mod
    I feel your pain. apparently mental ray doesn't handle mirrored uvs very well (at all) when dealing with normal maps.. is the dodgy side of the brick wall using mirrired uvs? what happens if you flip them and rebake?
  • Vailias
    Options
    Offline / Send Message
    Vailias polycounter lvl 18
    The second object looks like either:
    A: the vetex normals have gotten flipped on some of the faces, or
    B: the object has been scaled by -1 on one of its axis.

    You will get bad artifacts across UV seams in unreal, and a number of game engines, as a UV seam automatically breaks the vertices on import. This creates an independent and usually non aligned vertex normals, and so normal maps don't line up either. This is why you put seams out of sight. wink.gif

    A fix I can think of is to manually break the verts along the seams in maya, then go into normals->vertex normal edit tool, or edit polygons->normals-> vertex normal edit tool depending on which version of maya you have.You can then align the normals manually, and they should be preserved on import to UT3
  • FAT_CAP
    Options
    Offline / Send Message
    FAT_CAP polycounter lvl 18
    When importing your normalmap into UE3 make sure you have the CompressionSettings set to TC_Normalmap - this should stop the seams problem.
  • rooster
    Options
    Offline / Send Message
    rooster mod
    as for mental ray though can anyone explain this?

    I took a plane, split it, and moved the uvs back over to mirror half. Ok, so that creates a seam in high quality preview along the uv split. Where is the seam in mental ray? It slices *diagonally across the plane*
    wtf?
    oddnormals.jpg

    that happens from any angle I render at so its not some kind of mip mapping type fuckup afaik
  • katzeimsack
    Options
    Offline / Send Message
    katzeimsack polycounter lvl 17
    which version?


    paul tosca: (http://www.paultosca.com/makingofvarga.html)
    "and want to render with mental ray renderer within maya than make sure to check that in the Render Settings dialog -> mental ray tab->Translation->Performance you have checked Maya Derivatives (like in the image below - note that this option is off by default) this way you will use Maya’s derivatives calculation for bump mapping providing compatibility with Maya for mental ray, also note that this option is only available when Export Polygon Derivatives is also on."
    011.jpg
  • vahl
    Options
    Offline / Send Message
    vahl polycounter lvl 18
    for the unreal thing, flip your green channel, that's the problem I think
    also don't check your models/normals in the viewer but put the asset in a boxroom level, Ror (now Kevin Johnstone on these forums) once said you'll get better results if you do so.
  • rooster
    Options
    Offline / Send Message
    rooster mod
    doh totally forgot about that option katz.. maybe thatll fix mine too
    edit: hm nope I tried it again, but the seam appeared 3/4 across the texture in a straight line, again not on the actual mirrored bit. really weird
  • RobAI
    Options
    Offline / Send Message
    Hey guys, thanks for the help. I'll have to post my normal map later, but right now I'm headed to class.

    [ QUOTE ]
    When importing your normalmap into UE3 make sure you have the CompressionSettings set to TC_Normalmap - this should stop the seams problem.

    [/ QUOTE ]

    I set the compression to normal map, so that shouldn't be it.

    [ QUOTE ]
    for the unreal thing, flip your green channel, that's the problem I think
    also don't check your models/normals in the viewer but put the asset in a boxroom level, Ror (now Kevin Johnstone on these forums) once said you'll get better results if you do so.

    [/ QUOTE ]

    That is part of the problem, but I can't figure out why it's doing that. The channels are correct on some of the faces, but then on others the green channel will be flipped. On the urinal, everything else is fine except that one UV chunk where the seams are. On the chimney you see that one side is correct, but the other 3 had there green channel flipped. On the UV layout 2 of the faces were oriented one way, the other two were turned the other way, so if anything I would expect 2 of the sides to have flipped green channels...

    I suppose I should mention that I have been able to bake normal maps without this problem just fine, it's just sometimes that I have this problem, so I must be doing something wrong.

    Thanks,

    Rob
  • RobAI
    Options
    Offline / Send Message
    So apparently I'm just a retard and flipped the UVs at some point without realizing the consequences. Thanks everyone for the help.
Sign In or Register to comment.