Home Technical Talk

[Lightmaps] What causes these lighting errors on my meshes?

Theres been a pretty serious lighting problem with some of my meshes, which I've been stupidly ignoring for a while now. Now I just want to know what I'm doing to my lightmaps that I shouldn't be. My UV's are definitely more than 3 pixels apart and theres no overlapping going on.

The problem mainly affects my modular building sets and the problem sticks out a MILE when you join a modular piece to an identical one (to make a wall twice as long for example). What happens is theres like a "dogs ear fold" shadow, that will usallly appear on an upper corner of the mesh, and seems impossible to get rid of outside of editing the lightmap in some unknown way. Whatever I'm doing to cause this, it looks terrible and is ruining my meshes, so I REALLY, desperately want to sort this out for good and for all.

I'll post some screens of the problem meshes, followed by their lightmaps so you can hopefully see the mistakes I've made and tell me about 'em!

Problem mesh 1:-
LMprob2.jpg

Lightmap:-
LMprob2b.jpg

As you can see, plenty of space between UV's to preven leaking, and no overlapping. What could be causing the weirdness on the top of the "stone skirting board", the plaster, and worst of all the "roof tiles"?

Problem mesh 2:-
LMprob3.jpg

Lightmap:-
LMprob3b.jpg

This mesh is just a plane with a fold at the end to create the curb, so the lightmap is extremely basic, with only 1 UV, but it still causes problems? Any ideas why?

I'm going through my modular meshes now and uploading more as I find them. Any help on this matter would be REALLY appreciated, thanks!

Replies

  • sprunghunt
    Options
    Offline / Send Message
    sprunghunt polycounter
    it could be the screen space ambient occlusion - and not the lightmaps at all

    try turning off post process preview in the editor to check this
  • haiddasalami
    Options
    Offline / Send Message
    haiddasalami polycounter lvl 14
    Whats the size of your lightmaps?
  • Shuriken UK
    Options
    Offline / Send Message
    Thanks for the replies. The lightmap size is the default at 32. I tried turning off the "Post process previs" button, but it made no difference, so I tried disabling AO in the world properties, but that didn't do anything either. I saw you could disable AO in the lightmass section of world properties too, but it didn't make any difference.
  • Stromberg90
    Options
    Offline / Send Message
    Stromberg90 polycounter lvl 11
    He meant disabling it in the post process.
    Also try and do a search on lightmaps here in polycount and google, you will find a lot of information on it, it's quite a common "problem" :)
  • Froyok
    Options
    Offline / Send Message
    Froyok greentooth
    You can maybe try to disable a specific setting about the lightmaps pixel bleeding. It looks like since a few betas there is some textures problem with the lightmap generation.
    http://forums.epicgames.com/threads/916768-Lightmass-Issue-%28black-seams-edge-pixel-padding-default-settings%29
  • Stromberg90
    Options
    Offline / Send Message
    Stromberg90 polycounter lvl 11
    Froyok: Thanks, that's pretty awesome, I did not know this :)
  • Shuriken UK
    Options
    Offline / Send Message
    Thanks for the info! I just read the forum post you linked me, and turned off "edge-padding", but it just added to the glitchery, the problems are still there (exactly as in the screenshots, just in a different map with different lighting conditions), except now they look like this:-

    New edge seam problems (different to the "phantom shadow" problems):-
    bdhs5tu.jpg

    Stomberg90, could you tell me how to get to this "post process" menu? I found a few ways of toggling AO, but I cant see any menu or button called post process? Is it somewhere in the world properties? Are you talking about "allow ambient occlusion" under the rendering tab of world properties? If so, I already tried that, along with the "post process previs" button and the lightmass tab of world properties. None of them make any difference visually, (strangely enough!).

    Edit: I just pulled up the mesh in 3DS Max and applied all the maps using 3Point Shader, to see if the problem was being caused by one of the maps rather than the lightmap, or some UDK problem, but the error's dont show in 3 Point, so the problem must be with UDK.

    Thanks all
  • Shuriken UK
    Options
    Offline / Send Message
    Im still getting the same problem with meshes in UDK. Its hard to replicate the error because it seems completely random, I cant tell why some have the problem, and others dont, and thats after comparing "good" UV maps with problem ones.

    Hopefully Im not the only one who's faced this issue, Im at a loss here...
  • Lennyagony
    Options
    Offline / Send Message
    Lennyagony polycounter lvl 14
    In the problem areas are all of your verts welded? or your meshes normals could possibly be skewed oddly on the problem verts/edges?
  • Mark Dygert
    Options
    Offline / Send Message
    Do you're UV's extend right up to the edge of the 0-1 renderable area (UV bounding box)? Have you tried shrinking them down a bit? Ignore if this has already been suggested and tried, don't have time to read every post...
  • toolpaddz
    Options
    Offline / Send Message
    toolpaddz polycounter lvl 10
    you might wanna take a look at this video. I think he explains the solution to your problem quite nicely:
    [ame="http://www.youtube.com/watch?v=gEKjk049bUU"]UDK: How to Fix Lightmap Light/Shadow Bleeding and Seams Part 3/4 - YouTube[/ame]
  • Shuriken UK
    Options
    Offline / Send Message
    Wow, the UV editor in Maya looks about 10x better than the one in Max. Look at all the features, the rulers, and what Im guessing is UV grid snapping... What gives!? I take it UV editing is one of the things Maya does better than Max, even though they're by the same company, and both "current" lol. Seems a bit strange, almost like a sly marketing strategy. Maybe Im just looking at things the wrong way?

    Anyway, enough of that lol! So from what I can see, what I need to do is just increase the amount of padding / empty space between my UV islands, and make sure the verts conform to the grid lines. I need to find out how to use snapping in the UV editor.

    I'll post back when I've tried all this out. Hopefully I'll have a smile on my face!

    Edit: Okay, I've just been trying to optimise my lightmaps for the Japanese Wall. Now I have the grid setup so that 1 cell = 1 pixel, and Im making sure that as many edges as possible are lined up against the lines of the grid, and that theres atleast 3 pixels between each UV. After doing all of this, and refining it a few times, I've managed to reduce (but DEFINITELY not fix) the problem. It seems like its not possible to completely fix the problem... There MUST be a way! Surely?

    Is there anything else that could be causing this problem?
    Do you're UV's extend right up to the edge of the 0-1 renderable area (UV bounding box)? Have you tried shrinking them down a bit? Ignore if this has already been suggested and tried, don't have time to read every post...

    I dont think any of the verts are welded. All I did was create the UV islands by making the seams, then using unfolding and flatten mapping, then just arranged them in the UV editor. Do you think welding the UV's will help? If so, can you tell me more? Also, I tried shrinking the UV's but it doesn't seem to make much difference. This is a mystery and a half...

    - I tried making a version with welded UV's. The only UV islands I could weld were the two main faces (the big square UV's) since they were the only UV's with identical verts, but that just made the problem worse.

    - I just tried making a version where the UV's extend right to the boundaries of the UV box (with welded main faces), but when I imported this, the lightmap seems to get "lost in translation", and it completely changes the layout of the UV's when viewed in UDK (it makes my lightmap UV's overlap), making the lighting look completely messed up. Things just get weirder and weirder...

    Every time I make a change, I try building light with "Pad Mappings" enabled AND disabled, just to be sure, and the build quality is set to "Medium", with Lightmass always enabled.


    Here is the new optimised lightmap for my Jap Wall. As you can see, most of the edges now line up to the "32x32 pixel" grid, and there is atleast 3 pixels worth of padding between UV's, but the same errors still persist. Can anybody point out for me where Im going wrong?:-

    Badlightmap1_zps3e6288a3.jpg
  • Shuriken UK
    Options
    Offline / Send Message
    Anyone have any ideas what might be causing these "impossible to ignore" problems inside UDK's handling of lightmaps?

    I really need to get to the bottom of this, but it seems like either Im the only person on the planet who this is happening to, or nobody has truly explained what it is, and how to fix it, anywhere except the most top secret CIA websites, or the darkest corners of the deepest, most uncharted reaches of the internets seedy underworld.

    The video was helpful, but it only half fixed things. The only time you would be able to align every edge to a line on the UVW grid, is if (like in the video) you're ONLY working with simple cubes or extremely basic primitives. Now, my wall is really simple, but its not simple enough to apply this solution to.

    I really need to find out what is causing this. I dont know any other engines that I consider to be as intuitive and, even fun to use, as UDK (not keen on Unity OR CryEngine), so I dont want to have to completely throw the proverbial book at UDK...
Sign In or Register to comment.