Home Unreal Engine

Regarding light seams problem.

polycounter lvl 12
Offline / Send Message
Hayden Zammit polycounter lvl 12
Hi. I'm pretty new to UDK and was hoping someone could clear something up for me. See that light seam where the top of the mesh meets the side?

The other side doesn't have this problem, but the thing is my UVs are overlapped on this side. Is there any workaround, or do you either just have to not overlap or just put up with it? I understand that I won't get this problem only if the UVs are sewn together, but that kind of makes it hard to make good UV maps.

I put the asset in that scene that Jordan Walker made available on his website, so I'm pretty certain the lightings good and its something I'm doing wrong.

capturevcp.png

Replies

  • Ben Apuna
    Options
    Offline / Send Message
    Do you have one set of UVs for the textures? and another non-overlapping set of UVs for the lightmap?

    If the answer to the 2nd question is "no" then:

    Copy/pasted from another thread:
    Ben Apuna wrote: »
    Yeah unless all you have is a flat plane almost every static mesh will need a separate set of UVs just for lightmaps.

    The general rules for lightmaps in UDK are:

    1. Make sure there are no overlapping UVs.

    2. Make sure there is 2 pixels of padding around each UV shell (4 pixels total between two different shells) to prevent light from bleeding over to different parts of the model. Back In UE3 you also needed some padding around the outer edge of 0-1 space. Then with UDK Epic originally said you don't need padding around the edge of 0-1 space. Then they made some sort of change that caused lightmaps to be mip mapped at a distance. So I'm thinking it may be best to put at least 2 pixels of padding around the edge of 0-1 space again. Though I'm not too sure about that.

    3. Weld the UVs where you want smooth continuous lighting.

    4. Split the UVs where you want a break in the lighting. This will probably be where you have hard edges (smooth group splits) on the model itself.

    More advanced techniques:

    5. Scale the UVs of faces you want more shadow detail up.

    6. Scale the UVs of faces that are always in shadow down.

    Check out these tutorials:

    http://www.hourences.com/tutorials-ue3-lightmapping/

    http://udn.epicgames.com/Three/LightMapUnwrapping.html

    http://stephenjameson.com/tutorials/lightmap-uvs-tutorial/

    I hope that helps.
  • Hayden Zammit
    Options
    Offline / Send Message
    Hayden Zammit polycounter lvl 12
    Yep, one set of good UVs for the Diffuse and normals, etc. And then I have a second UV set that is non overlapping.

    Is it something to do with normals overlapping in UDK, maybe?
  • Hayden Zammit
    Options
    Offline / Send Message
    Hayden Zammit polycounter lvl 12
    Seems I can get rid of that seam if I don't overlap on my 1st set of UVs. Only thing is I have to sew my UVs like in the pic below, which takes up a heap of space. Is there a better way to do this?

    capture2u.png
  • Ben Apuna
    Options
    Offline / Send Message
    Cool, you found a way to fix the seam.

    Is this the regular UV set?

    A better way to handle this would be to mirror the left/right side, or use a non-square texture.
  • Hayden Zammit
    Options
    Offline / Send Message
    Hayden Zammit polycounter lvl 12
    Cool, you found a way to fix the seam.

    Is this the regular UV set?

    A better way to handle this would be to mirror the left/right side, or use a non-square texture.

    Yeah, I found a way, but damn, it really limits the UVs as I can't overlap.
  • Sean VanGorder
    Options
    Offline / Send Message
    Those seems may be caused by your light map seams falling in between two different pixels. Since the background of the light map is automatically filled with black, this can cause seams to show up along UV borders.

    Check out this video for a more in-depth explanation.

    [ame="http://www.youtube.com/watch?v=ntx10JMl9f4"]Fixing Lighting Seams in UDK - YouTube[/ame]
  • Sandro
    Options
    Offline / Send Message
    @Sean
    I see that video posted quite often. While it does provide some insight, I don't see how it's a solution. You can't uv moderately complex asset so that uv seams don't "fall in between pixels". Also, lightmaps will compress, mip and stream like crazy and your asset has to hold up.

    @Hayden Zammit

    You are wasting tons of space there. If your uv is part of bigger texture atlas then make second uv channel for lightmap and unwrap your object properly (use all the space available and split uvs where your object has natural seams)

    This image might prove useful
    http://udn.epicgames.com/Three/rsrc/Three/ContentBlog/ContiguousMeshCleanLightmap.jpg
  • Sean VanGorder
    Options
    Offline / Send Message
    Sandro - When I'm creating unwrapping for light maps, I usually just use the pixel snap tool in Textools when I'm done. I set the map size to what I plan on using for the lightmap in UDK, and then the pixel snap tool snaps the borders of shells to the nearest pixel. It's more of a workaround than an actual fix, but it helps a bit in most cases.
  • Sandro
    Options
    Offline / Send Message
    Ahh, I didn't know about pixel snap tool. Might indeed prove helpful in certain cases. I still think that working with natural seams of objects is lot safer though. Lightmap/texture sizes might get halved, some detail maps might get overlaid with shader e.t.c. In most cases you dont want uv seam to be running in the middle of white curvy surface.
  • Hayden Zammit
    Options
    Offline / Send Message
    Hayden Zammit polycounter lvl 12
    Sandro, I know those UVs were bad in that pic. That one was more just a test to see if sewing the seams fixed it and if overlapping normals was a problem. I guess it just needs to be that way in UDK. I read in Epic's docs that they recommend a contiguous mesh, or at least, contiguous UVs from what I understood. Ah, I was looking at that exact pic actually.

    It just threw me off a bit as I use that sort of approach all the time for Mental Ray renders without any problems.
Sign In or Register to comment.