Home Technical Talk

Help - Another lightmap UV bleed thread

I have read MANY tutorials and threads on lightmap UVs, but it seems I am still missing something here. I made a very simple tile to try some lightmap UV unwrapping. Even though I though I followed all the "rules", I still got a little bleed on a couple of edges.
(the offending edges are not the ones on the edge of the UV)

Lightmap resolution is at 32 in UDK.
I am using blender 2.63, if that matters.

Bleed.png

Lightmap.png


Is there a better way to pack this?

Replies

  • JonathanLambert
    Options
    Offline / Send Message
    JonathanLambert polycounter lvl 6
    Weld the UVs into one chunk and scale it up to fill as much of the 0-1 space as possible. If all else fails, up the resolution of your light map.
  • WarrenM
    Options
    Offline / Send Message
    Create a 32x32 checkerboard texture and throw it in your mesh in Blender or UDK. Now you're looking at the lightmap as the engine sees it. The causes for bleeding will probably become clear...
  • bleep
    Options
    Offline / Send Message
    Thanks for the suggestions.
    I did figure out a better way to pack it, which was to make the sides of the tile longer and stack them up on Y. This solved the issue, but I am still trying to understand the original cause.

    I used the grid in blender, which was divided in 32 to line things up and scale nicely, but still had the issue.

    I also tried to weld the four sides together, and maximize the space last night after reading up some more. But it seemed to make things a lot worse.
    I had read before that there should be padding in between, where there are hard edges that will be lit differently...then I read some suggestions, like yours, that say to weld as much together as possible. Even one UV island for simple objects!
    These ideas seem to contradict one another, no?
  • Noors
    Options
    Offline / Send Message
    Noors greentooth
    I don't know UDK, but from what i see, your lightmap is tiling. You probably have an option to clamp it in UDK, or you should move your shells away from the borders by a few pixels.

    Splitting the hard edges will give you better results, especially at a far distance, where the lightmap will start to mip.
    At some distance, the engine lower the texture resolution to prevent flicking. If everything is welded, the texture on the angles will start to be blurry and messy.

    You should leave a padding of some pixels for the same reason, mipmapping, so at lower resolutions, you don't have bleeding between shells.
    Textures are memory consuming, so you'd better use most space on it. Also don't distort the uv this way. Keep everything at the same ratio.

    more infos on the wiki
    http://wiki.polycount.com/CategoryTextureTechnique
  • bleep
    Options
    Offline / Send Message
    UDK adds padding around the edges, so I think that part is fine. But I will look into lightmap tiling and clamping.

    That's some good info. Thank you.

    What I have gained from this is weld as many similar lit faces and use as much of the resolution as possible...but leave padding where there are hard edges. This makes a lot more sense than "weld it all into one island".
Sign In or Register to comment.