Home Unreal Engine

Inconsistent lightmap?

Hello, wise polycount people!
I seem to have a problem with my modular assets and their lightmaps. While making a wall tileset, I happened to notice that two assets that were made using THE SAME TECHNIQUE, UV'd in the same way and exported, you guessed it, in the same way, have drastically different lightmaps.

2uj1h84.png

As you've probably noticed, the lightmap of the corner-wall model is considerably more pronounced. What could be causing this and how can I fix it?


I already tried:
-Closing the meshes
-Realigning the UVs
-Remaking the second mesh


I even tried exporting two instances of the straight wall into a file to imitate the positions of the corner wall. They had the same lightmap problem as the corner wall!

This leads me to believe this is not a UV problem (I ruled that out through the above experiment) and is indeed something to do with the mesh itself.

Please help! I have not the faintest clue what to do with this.

Replies

  • JamesWild
    Options
    Offline / Send Message
    JamesWild polycounter lvl 8
    Looks to me like the lightmap UVs on the left just so happen to line up with the crease nicely.

    You might be better off using vertex lighting (resolution 0)
  • S_ource
    Options
    Offline / Send Message
    S_ource polycounter lvl 9
    What are you exporting the models to? I used to have problem with ase and switchd to fbx and works better for me. Should work with both but i use an old software so that might be it. :)
  • Dandi8
    Options
    Offline / Send Message
    I'm exporting from Blender to .FBX.
    I'm gonna have to check out the UVs of the original model but I don't think that's it, JamesWild. Remember that even if I import the straight wall twice the second one has this problem too, for some reason.

    EDIT:

    OK, I am *dead certain* the UVs of both objects are pixel-aligned and have the right lightmap resolution. Still no dice. What now?


    EDIT2:

    In hopes that it IS in fact my UV mapping that is the problem, I post my UVs, along with an explanation:
    2lo2683.png

    The 'corner wall' UV set is just the original straight wall UVs copied over, scaled down twice and pixel-aligned to a 256x256 texture (whereas the original straight wall UVs are pixel-aligned to a 128x128 texture because they take up the whole space instead of half of it).

    So, in the end, the UVs are pretty much the same. They're exactly the same from a technical standpoint, unless I'm missing something. Help?
  • sprunghunt
    Options
    Offline / Send Message
    sprunghunt polycounter
    The space on the left and right of your 256 px scale uv will cause bleeding. Stretch the light map uv to fill the space like the first one.
  • Dandi8
    Options
    Offline / Send Message
    Thanks for the suggestion but... Not only did stretching the UV map to fill the space not work, in the meantime the problem switched around - now the straight wall lightmap is very pronounced and the corner wall isn't!

    What is this sorcery!?

    I even tried using the REALLY exact same UVs as in the straight wall, which meant using channel 0 in the corner wall as the lightmap UVs. Same thing.


    Haaaaaaaaaalp! XD
    This is driving me crazy o.O
  • McGreed
    Options
    Offline / Send Message
    McGreed polycounter lvl 15
    Any chance that you have two lights in the scene that overlaps their radius? If so, try remove the lights and put in a dominate light and see if the error persist after baking.
  • Dandi8
    Options
    Offline / Send Message
    Unfortunately, the error seems to persist even after making sure there are no lights immediately next to the models :-/


    EDIT:
    I made a completely new scene with only the wall models and a single dominant light. The problem is still there.


    EDIT:
    Upon closer inspection, I've found that even the straight walls tend to not line up properly, albeit in a slightly different manner:
    178f1s.png

    Is this the same problem?
  • Kensey Quarantine
    I'm experiencing the same problem. Im too doing 3ds max .fbx export with stretched normals, and after baking the lightmap summoning Chaos of Warp.
    Sorry for useless answer. ^^
    image.png
  • Santewi
    Options
    Offline / Send Message
    I'm experiencing the same problem. Im too doing 3ds max .fbx export with stretched normals, and after baking the lightmap summoning Chaos of Warp.
    Sorry for useless answer. ^^
    image.png

    Try disabling AO in the lighting build?
  • Dandi8
    Options
    Offline / Send Message
    AO is disabled in my lighting build and I still get the errors mentioned. Anyone have any other suggestions?

    ...Please...?

    ...I beg of you...?!
  • sprunghunt
    Options
    Offline / Send Message
    sprunghunt polycounter
    Dandi8 wrote: »
    AO is disabled in my lighting build and I still get the errors mentioned. Anyone have any other suggestions?

    ...Please...?

    ...I beg of you...?!

    Don't put so many seams in your lightmap UVs. It doesn't look like it's necessary for this model.
  • Mark.N
    Options
    Offline / Send Message
    Try giving your lightmap uv's some padding around their edges; it might be an issue with the mip-mapping that UDK tends to do. 4-8 pixels inset from the border should be enough depending on texture size and see how that works.
  • Dandi8
    Options
    Offline / Send Message
    sprunghunt wrote: »
    Don't put so many seams in your lightmap UVs. It doesn't look like it's necessary for this model.

    The picture above is not my model. I'm talking about my wall models, not the rock thing - that's someone else's. My UVs have almost no seams.
    Mark.N wrote: »
    Try giving your lightmap uv's some padding around their edges; it might be an issue with the mip-mapping that UDK tends to do. 4-8 pixels inset from the border should be enough depending on texture size and see how that works.

    But Mip-mapping is only an issue when the UVs are not edge-to-edge of the texture! Besides, my corner wall UV already had A LOT of padding so it can't be it.




    Maybe it's an issue with how it's all modelled? I thought that maybe it's because the meshes are 'open' but that turned out to not be the issue.


    I really don't know what to do anymore ;( And I really need to complete this project...!
  • sprunghunt
    Options
    Offline / Send Message
    sprunghunt polycounter
    Dandi8 wrote: »
    I really don't know what to do anymore ;( And I really need to complete this project...!


    Then finish the model texture first and then worry about the seams. At least get a baked normalmap and ambient occlusion map on their first.

    EDIT : I realise I have a good example of what I'm talking about:

    here's a scene without any normalmaps on some pieces
    5426995463_e63ca7e7ff.jpg
    RH_working_ss070211 by sprunghunt, on Flickr

    If you look at it you can see on the left there's a seam in the tiling pieces under the window which I hadn't finished.

    and here's the same scene with normalmaps and AO on those pieces.

    5460963082_d6c3cc9e07.jpg
    RH_working_ss200211 by sprunghunt, on Flickr

    No seam on the pieces under the window.
  • Dandi8
    Options
    Offline / Send Message
    Sprunghunt, the problem is: the pieces are already fully normal-mapped. Each and every wall piece has a normal map. Had from the very beginning of this thread.

    And I still get this problem :(

    And the lightmap difference is waaay to noticeable to disappear under a diffuse texture...

    What nao?
  • Killjaqular
    Options
    Offline / Send Message
    im having this problem on my current project too and i cant progress until i fix it. because it does it to ALL modular instanced assets. fml.

    try this tutorial. it hasnt fixed our problem, but maybe you can better interpret it and understand the principal behind this practice.

    http://www.worldofleveldesign.com/categories/udk/udk-lightmaps-03-how-to-fix-light-shadow-lightmap-bleeds-and-seams.php
  • osman
    Options
    Offline / Send Message
    osman polycounter lvl 18
    What quality are you building your lightmaps with? I have noticed that only production is capable of 100% removing any seams between seperate meshes.
  • Dandi8
    Options
    Offline / Send Message
    I tried all qualities, including production. The problem persists. Any other ideas? o.O
  • sprunghunt
    Options
    Offline / Send Message
    sprunghunt polycounter
    Dandi8 wrote: »
    I tried all qualities, including production. The problem persists. Any other ideas? o.O

    what does your normalmap look like?

    and if you really can't get rid of it then hide the seams.
  • Dandi8
    Options
    Offline / Send Message
    317csjd.png

    That's what the normal map looks like.
  • iansmithartist
    Options
    Offline / Send Message
    iansmithartist polycounter lvl 14
    I tried replicating your problem using your normal map, while I didn't get the exact same problem, there are some things that could be contributing. I wasn't sure if your mesh had a single smoothing group, or if it was split up into several, but either way, the normal map is causing some problems.

    Im not sure how you baked the normal map, it looks like it was your current mesh, baked to a plane, and then applied back on to your current mesh. The problems are most visible along the top section that slopes down. It could also be because its not broken up into enough smoothing group, depending on angle of the polygons.
    dandi8_eg1.jpg

    dandi8_eg2.jpg

    What I think you after are smooth corners, in which case you what a high poly with chamfered corners, projected and baked on to your current mesh. Check out the polycount wiki, there is pretty much all the information you could want on normal maps: http://wiki.polycount.com/NormalMap/

    It is also my understanding that uv's for your light map should be broken into separate smoothing groups, rather than one whole uv shell.
    dandi9_eg6b.jpg

    My current suggestion would be break up your mesh into separate smoothing groups (and also your light map uv's) and then try baking the light maps. If you get successful results, come back to figuring out your normal map and see if you can get better results.
  • Dandi8
    Options
    Offline / Send Message
    I've tried giving all imagine combinations of smoothing groups to everything. Besides, if you noticed in my OP, I wrote:
    I even tried exporting two instances of the straight wall into a file to imitate the positions of the corner wall. They had the same lightmap problem as the corner wall!

    Which means it's not a problem with the mesh structure but rather something else. It's also independent of the normal maps as the problem persists even with the normal map turned off.

    Thanks, but that's not the problem.

    I'm going to try, however, playing around with separate lightmap uvs, as you suggested! Will post what came of that soon.

    EDIT:
    Through experimentation I figured out that the most probable reason for the graphical glitch is that UDK kind of freaks out with small geometry like the indent on the wall when calculating lightmaps. Either that, or my workflow must have made my UV maps somewhat off, although I doubt that's that happened.

    Either way, removing the indent from geometry and leaving it baked on the normal map fixed my problem. Thanks for all the help guys :)
Sign In or Register to comment.