Home Unreal Engine

::UDK Lightmap UV Tip::

polycounter lvl 13
Offline / Send Message
CT007 polycounter lvl 13
So, maybe everyone already knows this, maybe not...

Straightening you UVs = clean (baked) lightmaps

UDK > Baked lightmap > 128x128: (see attachment)

Replies

  • Oniram
    Options
    Offline / Send Message
    Oniram polycounter lvl 17
    neat. :D i didnt know that. glad i do now though. typically if i had an issue with lightmaps id just create a new one within the mesh editor, but this is still something good to know. thx
  • karera
    Options
    Offline / Send Message
    karera polygon
    Woah! I think my lightmaps are straightened... But thats sick. There is too much of a difference in quality for such a small change. Need to make sure tonight ;)
  • Ben Apuna
    Options
    Offline / Send Message
    If you haven't already seen it, you guys might like this tutorial.

    It's a little dated though as it was made for Unreal3 so some things are a little different. For example you don't need padding around the outer edge of 0-1 UV space for lightmap UVs anymore, you only need padding between the individual shells to avoid bleeding.
  • JordanW
    Options
    Offline / Send Message
    JordanW polycounter lvl 19
    The edges certainly are cleaner, I would say you have too much padding. You should see how this affects a shadow casting across the flat surface because I feel like by straightening the UVs you just moved the problem from the edges to the center and you don't notice it because there isn't a shadow casting across the surface.
  • Gilgamesh
    Options
    Offline / Send Message
    Gilgamesh polycounter lvl 12
    Well because it's like a RTT the resolution might slightly be affected by the stretching but the accuracy wont be, it seems a pretty decent way to cure the problem he has/had.
  • CT007
    Options
    Offline / Send Message
    CT007 polycounter lvl 13
    JordanW wrote: »
    I feel like by straightening the UVs you just moved the problem from the edges to the center and you don't notice it because there isn't a shadow casting across the surface.

    Is there (currently)no perfect UV solution then, for less simplistic meshes like this? Does it all come down to how the mesh is lit in the final level, rather than general lighting?

    Straight UVs seem to fix the most noticeable LM problem areas, so it seems they would be best in general lighting cases.
  • kdm3d
    Options
    Offline / Send Message
    The reason this works is that pixels are square, the same thing happens with normal maps. if your UV edge falls diagonally across a number of pixels, it has to take every pixel it falls across and interpolate it to find the closest match. If your UV edge is straight, the software has a clean edge to fall across and there is no interpolation.

    So, anywhere uv edges are not perfectly horizontal or vertical you're going to get this effect, with ANY map, just the nature of the beast. You just dont notice it int he center of islands because it has more to interpolate rather than the edges.

    You WILL notice it with normal maps int he center of islands though, with any normal edge that cuts across pixels.

    Ah... the challenges of game art:)
Sign In or Register to comment.