Home Unreal Engine

Lightmass problems: artifacts/stains

interpolator
Offline / Send Message
OccultMonk interpolator
I am having trouble getting Lightmass to create Lightmaps without blotches and stains. Even on 512 or 1024 for each window and on production quality. Is Lightmass supposed to produce so many artifacts? If I look at the generated SimpleLightmap texture and the DirectionalMaxComponent texture? Anyone have some tips?

8166561805_1ece61a755_o.png
8166561631_e58dbe88f7_o.png
8166591302_19d132fd7b_o.png
8166562135_0e72cfa1d6_o.png

8166580447_09f67a6479_o.png
8166609098_8c687d2387_o.png
8166580373_6be5130188_o.png

Replies

  • Jacky
    Options
    Offline / Send Message
    Jacky polycounter lvl 6
    Disabling ambient occlusion in World Properties>Lightmass helps a bit with getting rid of those blotches in tiny corners. You'll have to rebuild after that of course.
  • osman
    Options
    Offline / Send Message
    osman polycounter lvl 18
    Yes, that's normal behavior. Lightmass needs to cast a lot of photons and calculate all the bounces. In order to speed this up a little bit, they have tweaked the amount of photons, distance of photons, number of bounces and many many other features in order to speed it up a bit.

    The blotches you see is usually either because of inaccurate calculations( not enough photons) or lightmap texture compression.

    Once you apply a texture on those assets, you won't notice it at all, but if you still want to have it completely clean you can disable compression ( lightmaps will take much more space) and/or increase the amount of photons cast( longer bake-times)

    How?
    You can change both in a file called BaseLightmass.ini located in UDK/Engine/Config/

    Compression = 'bAllowLightmapCompression=True'. Set this to FALSE if you don't want compression
    Photon count = A LOT of different values in that same file. I'm sorry, but I can't go through them all at the moment. But I think most of them should make sense and they have a little bit of commenting int he file.

    My advice would be to just leave it alone, both compression and the other values. Lightmass has been tweaked to work in production with the default settings, you just have to texture your assets. But if you really want to, you should know how :) I hope this helps.

    Oh, PS
    The scale of your world matters. The default lightmass values are setup for Gears of War scale. So make sure you keep to those scales. If you have different scales for some reason, you can tell lightmass by changing the value of World-Properties->Lighmass->Level Scale

    Oh PS2: One trick to reduce the compression/noise is to use vertex-baked lightmaps( set resolution of your assets to 0). This only works if your assets have the correct tesselation. I'd say, try it out, I end up using it A LOT.

    Ok enough for today, good luck!
  • OccultMonk
    Options
    Offline / Send Message
    OccultMonk interpolator
    @Jacky: I already disabled AO for these shots, but thanks!

    @Osman: Thanks for the detailed reply. I know about the Level scale and the Settings in BaseLightMass.ini, but this exponentially increases the render time of the lightmaps. (I could probably use it in the final verion).

    When using vertex-baked lighting I would have to add a lot of polygons to my models to evenly divide them. I don't think that't an option. You say you have used it extensively, how did you manage to keep the vertex count down?

    And why are the stains and blotches concentrated in a few areas? It should be possible to just blur the maps a bit. Maybe it's better to use lower resolution Lightmaps but bake them with higher settings in BaseLightMass.ini?
  • osman
    Options
    Offline / Send Message
    osman polycounter lvl 18
    Indeed, I personally would go with much lower res lightmaps and higher settings. In your scene I would do this:
    - Set everything to vertex baked.
    - Do a bake and see how the assets look.
    - Good looking models I leave to vertex, bad ones I use lightmaps for( i never really go back to add more vertices, too tedious, but I do
    think about it while making the model. Don't be scared to add a few more, I assume you're targetting 'next-gen'?
    - I start as low as 32x32 and I up the resolution whenever needed. It usually ends up between 32-128 per asset.
    - I add a quick concrete texture to it, to see which areas the blotches are still visible and I try to focus on that area if its an important area.

    For my latest completed scene ( on my website ) the lightmaps bake in 1-2 minutes in Production on a decent machine.
    I hope this helps, I would really need worry too much if you need to get this done fast, just add textures and it will be gone. But if it's for learning purposes, then I'd say: tweak tweak tweak!
  • Angry Beaver
    Options
    Offline / Send Message
    Angry Beaver polycounter lvl 7
    poly's are cheap these days your biggest concerns are your texture memory and shader complexity. Adding a few loops here and there so they shade better meaning the shader has to do less work is a way better trade off.
Sign In or Register to comment.