Home Unreal Engine

Lightmap shadows are repeated on separate meshes... wtf.

greentooth
Offline / Send Message
fearian greentooth
So I'm having the same problem that this guy had: Shadow Map Issues, AFAIK, exactly the same.

U84R6.png

Basically this wall is made up of repeating meshes. When I run lighting, the lightmap from one mesh (eg the 4x2 panels in the bottom right) is applies to another instance of that mesh (in this case just above it). Weirdly, it doesn't affect all the instances. Just a few. Even If I delete these few 'problem' meshes and add them into the scene again, it's as if the same one's suffer the same problem.

All the meshes have two UV channels with unique UV unwraps. All the meshes have the Lightmap set to slot 1 and diffuse to slot 0. All the meshes have either a 512 or a 256 lightmap. I have tried different lighting quality levels.

I'm at a loss here, Even when I delete the meshes and put put new copies in the world the problem persists. Any Ideas? :(

Replies

  • Uly
    Offline / Send Message
    Uly polycounter lvl 15
    try checking the "Use Instanced" box in the static mesh properties? Not sure if that'll fix it, but worth a try. :|
  • Froyok
    Offline / Send Message
    Froyok greentooth
    I guess that all of your lightmaps have no overlapping faces ?
  • haiddasalami
    Offline / Send Message
    haiddasalami polycounter lvl 14
    try deleting your dominant directional light. Sometimes I have weird shit happen and this fixes it lol
  • Cluly
    How does the lightmap UV layout look? there could be faces over lapping each other causing the repeat effect.
  • fearian
    Offline / Send Message
    fearian greentooth
    My lightmaps do not have overlapping faces, instancing does not affect the issue and neither does using different lighting actors :(

    Thanks for the replies guys but nothing has worked yet. I'll push on in other areas and hope a solution presents itself soon :(
  • fearian
    Offline / Send Message
    fearian greentooth
    Godamn this will not go away. The affected meshes seem to change between compiles. :poly117:

    sBJEg.png
  • Ben Apuna
    Just an idea as I've never encountered this problem.

    Have you tried lowering the resolution of your lightmaps, 512 - 256 is rather large for such small pieces.

    Maybe UDK is running out of memory or storage space for them (if that's possible...) and is trying to reuse what it thinks is a "best fit" for what it can't store.
  • fearian
    Offline / Send Message
    fearian greentooth
    SOLUTION: (Kind of...)

    I've reached a work around. While testing my lightmap UV's for the umpteenth time, I gave the lightmap uv channel an automatic unwrap. This actually fixxed the shadow problem, but removed my explicit normals from the mesh.

    So, I exported the automatic uv's and applied them to my mesh within Max (uv channel 2) and exported the model again. On importing into UDK, I had the correct Uv channels and my explicit normals. However the shadow bug returned.

    I gave it another automatic unwrap, essentially overwriting the the lightmap uv with the same unwrap, but generated in UDK and this time it did not destroy the normals. Ran lightmass and bam, everything works fine.

    I tested this series of events in different ways on other meshes from this building and my 'fix' has turned out to be this:
    Reimport the mesh with explicit normals.
    Generate a new UV channel for the lightmaps within UDK.

    This is annoying because I know my original lightmaps met UDK requirements, and as far as I can tell, I can no longer import custom lightmap UV's.

    But lighting is working, I'll just try to avoid needing custom lightmaps! :)
  • Ben Apuna
    That's bad news if true, custom lightmap UVs are important :(

    Glad to hear you got the problem fixed though :)
  • fearian
    Offline / Send Message
    fearian greentooth
    Ha, I didn't see your reply when I wrote (and tried all) that, I'm gonna give your idea a go, just to cover bases. And because I really would like to know the root of all this :P

    edit: Oh god, or I would if UDK would let me into the edit mesh window. 3am is not the time for this. I'll try later when I am more sane.
  • diabi85
    i'm having your same problem, but i have few questions about your work around (sorry if some of them may look obvious, but i'm really noob!):

    1- how do you export the mesh with explicit normals?
    1.2- what explicit normals are??

    2- what settings are you using to unwrap in udk? (spacing, stretching,etc.)

    3- does the geometry of the mesh influence how lightmaps work?

    thanks!

    EDIT
    sorry about the double post!
    you can ignore this and look at the one below!
  • diabi85
    Hi!
    I'm having the same problem + few more still lightmap related.


    -RED: repeating shadows like your problem
    -BLUE: dark side...may be the same problem but i'm not sure.
    -GREEN: the sign doesn't cast any shadows on the ledge or the wall on the left

    Lighting only
    postm.png

    Lit
    post2j.png

    Concernig your work around:

    How do you import your mesh with explicit normals inside udk? (I'm quite noob about this aspect....I'm not even sure to know what explicit normals are...:))

    What settings are you using inside udk to generate the lightmap UV channel?

    Thanks!
  • keres
    Offline / Send Message
    keres polycounter lvl 12
    I think the green is because of some silly ambient occlusion thing Lightmass is doing. I had similar behavior until I killed the setting in world properties.
  • diabi85
    I wrote on the Epic forum and apparently the problem is a bug and can be fixed by changing "bCombineSimilarMappings" to False in your BaseEngine.ini

    http://forums.epicgames.com/showthread.php?p=28031989#post28031989

    It works perfectly but I don't know what kind of imact it has on performances.
    In the BaseEngine.ini there is also a value you can tweak, but I don't know how it works.
  • fearian
    Offline / Send Message
    fearian greentooth
    Sorry I didn't see you post, Diabi!

    Explicit normals allows you to export a mesh with custom face normals, which affects normal maps and shading among other things. You can read a little more about it on the PC wiki here. It shouldn't affect this issue though!

    I just used the default udk unwrap settings, and I don't think the geometry of the mesh's affected the issue. I found it on multiple meshes, but only ones sharing the same material, which might have had something to do with it.

    Cheer's for posting the solution you found! I'll be sure to give it a go if this problem crops up again (which is likely!) ...It seems to have mysteriously vanished for now... :shifty:

    Thanks! :)
    diabi85 wrote: »
    I wrote on the Epic forum and apparently the problem is a bug and can be fixed by changing "bCombineSimilarMappings" to False in your BaseEngine.ini

    http://forums.epicgames.com/showthread.php?p=28031989#post28031989

    It works perfectly but I don't know what kind of imact it has on performances.
    In the BaseEngine.ini there is also a value you can tweak, but I don't know how it works.
  • ApolloX88
    Offline / Send Message
    ApolloX88 polycounter lvl 6
    Has anyone found any other work around for this. I am encountering a similar issue.
Sign In or Register to comment.