Home Technical Talk

Shading problems (Maya and UDK)

Hey there Polycount!

I've been working on this enviroment for awhile with the hopes of learning how to use UDK. This is my first proper project in UDK so I've ran into a few problems along the way. Right now I'm scratching my head wondering how to fix this shading problem on some of my modular building pieces.

Basic setup in UDK:
shading_01.png

As you can see the bottom part of the wooden wall pieces gets a weird shadow across the entire board. I'm not really sure how to fix it and I've been trying a bunch of different ways of useing smooth and hard edges in Maya.

Another weird thing is that if I freeze all transformations in Maya it shades correctly, but when I save and exit and then reopen the file it's back to the way it is now.

Here are some pictures of my lowpoly mesh:
shading_02.png
shading_03.png`
The entire mesh has hard edges, appart from the outermost edges on the boards at the bottom aswell as around the door.

I've been trying to keep the polycount to a minimum, but maybe I overdid it? I'm not really sure about how highpoly you can make modular pieces like this for a modern game, which is why I did it as lowpoly as possible.

Would adding more geometry help me with preventing shading problems like this or could it be my edgeflow or my use of smoothing groups that is faulty?

If something is unclear please ask and I'll try to explain it further, english isn't my mothers tongue :).

Thanks in advance.

Replies

  • Erafic
    Offline / Send Message
    Erafic polycounter lvl 10
    I think you've already stated the two solutions you could use, either add some bevels or harden the edges. When the edge is softened it will interpolate between the adjacent parallel edges to it. Another solution that one can use is normal maps, but that would be best used on single objects with a unified texture I think, you seem to be using different ones on the borders and the wall section?

    So yeah, those are the three ones I know of at least =)
    And out of the three I'd go with the hardened edge for this one.
  • Odahl
    The wall and door is one single mesh and it is already normal mapped, but maybe there's problems with the map itself?

    Here's the normal map I'm useing:
    build_bottom_normal.png

    I was hoping I could fix it without adding too much supporting geometry, but I guess it has to be done. I'll also try to rebake the normal map with hardened edges and see if it helps.

    Thanks for the quick respond! :)

    EDIT: I might also add that I'm fairly new to baking normal maps so I might have made mistakes while baking them. Maybe that's part of the reason?
  • Erafic
    Offline / Send Message
    Erafic polycounter lvl 10
    The thing is that when you have soft edges the normal map have to add extra strength in order to counter the mentioned interpolation. By the look of it that countering haven't been added into the normal map.

    Have you used Mayas own tools or a third party tool like Xnormal?
  • Odahl
    I baked it inside of Maya. Would useing a program like Xnormal give me a different result then useing Mayas own tools?
  • Pola
    Offline / Send Message
    Pola polycounter lvl 6
    Your shading issue I believe is due to vertex normals, it's common with modular pieces like yours that you will have to tweak the edges to have them connect smoothly shaded with each other.

    So select your modular piece, and turn vertex normals on and you should see a bunch of lines poke out from where your vertexes are, you will likely see on the edge that these lines don't point straight/forward but rather on an angle, you want to correct that so that when you connect the edge to another modular piece edge those vertex normals line up. You will also need to rebake your normal maps after you have fixed the vertex normals.
  • Pola
    Offline / Send Message
    Pola polycounter lvl 6
    Oh I forgot to mention this is a pretty useful tool for maya in regards to vertex normal editing. http://migugi.net/mel/normalTools/
Sign In or Register to comment.