Home Unreal Engine

Modular Building - Lightmap Problems

Hi folks!

I've been trying for a while now to get the lightmaps working on my modular building set.
It's really not that fancy, but for some strange reason I really can't get it to look good.

I've attached some screenshots. Maybe you can figure it out why it might not look that good.

The Lightmap-Resulution is @ 128.

In case you need more infos, feel free to tell me.



Thanks & Cheers,
Shad0w

JjJINkk.jpg

xqsgmF0.jpg

Gxhmj0C.jpg

7cVw3WU.jpg
SBK2F1
[IMG]https://mega.co.nz/#!OR1VlZSA!aXTNYEowppErfhuNSrzMJrG0bg7EB7qFQbZ524HgbxQ https://mega.co.nz/#!LJVn1DhI!eRszrjIOjY55IVnvXZD9pXYLZ5QtoD4blVVYhLSthiY[/IMG]

Replies

  • Steppenwolf
    Offline / Send Message
    Steppenwolf polycounter lvl 15
    You can try the following: make a 128x128 checker texture. Load it in your uv editor. Pixel snap your elements (alternative option on the grid snapp button in the bottom right corner).
  • ZacD
    Offline / Send Message
    ZacD ngon master
    You actually want to snap to a 126x126 grid, UE4 takes away 1 pixel around each edge automatically, so 64x64 is 62x62, 32x32 is 30x30, etc. Also this causes an issue if you use test bakes at lower resolutions unless you use a resolution that is x4 larger. so 32x32 to 128x128 or 64x64 to 256x256.
  • Shad0w_Walker
    @Steppenwolf:
    Thanks man. The result I got was way better. But I still have these wierd shadings on the non lit side.
    Any Advice?

    @ZacD:
    So should I use a 126x126 checker pattern in Max?


    yRDMKkr.png
  • ZacD
    Offline / Send Message
    ZacD ngon master
    126x126 or 30x30.
  • Lucas Annunziata
    Offline / Send Message
    Lucas Annunziata polycounter lvl 13
    ZacD wrote: »
    You actually want to snap to a 126x126 grid, UE4 takes away 1 pixel around each edge automatically, so 64x64 is 62x62, 32x32 is 30x30, etc. Also this causes an issue if you use test bakes at lower resolutions unless you use a resolution that is x4 larger. so 32x32 to 128x128 or 64x64 to 256x256.

    Is this documented anywhere? Any lightmap resource related to udk/unreal 4 has failed to mention this.
  • ZacD
    Offline / Send Message
    ZacD ngon master
    This post is from Epic Staff is where I first heard about it.

    https://answers.unrealengine.com/questions/95423/lightmass-with-bad-shadow.html

    It's really annoying it's not documented anywhere.
    Hi Bychop,

    This is common with objects that are the modular and tiled like this. What you're seeing is the way lightmass bakes shadows. The reason you're seeing the inconsistency is because lighting is baked on different threads in turn causing this effect.

    There are a couple of things you can do to reduce this though:

    First and foremost you'll want to create a second UV for your lightmap. This is very important especially with shadow/light bleed.

    You can find more information on World of Level Design to understand Lightmapping better.

    In your modeling program you'll want to setup a grid for your lightmap in the UV so that the verts can be snapped to. You'll also want to set the grid spacing to the following: 1 / (lightmap resolution - 2) = grid spacing

    ie. 1 / (128 - 2) = 0.0079365079

    Once you've got a good lightmap you can go into World Settings > Lightmass > and change the following values

    Indirect Lighting Smoothness: .06 Indirect Lighting Quality: 2

    This should help smooth the edge seams out.

    Let me know how this goes and if you have any questions I can help you out along the way! :)

    Tim
  • Lucas Annunziata
    Offline / Send Message
    Lucas Annunziata polycounter lvl 13
    Weird. I've always snapped to 32, 64, etc. and not had any issues in ue4. I posted in that thread for a bit more clarification on this. I just did a couple of tests with 62/64 snap'd lightmap uv's to compare, doesn't seem to be any noticeable difference. Then again, I'm also not getting any seems at the edges with either of em.
  • GhostBlades
    Offline / Send Message
    GhostBlades polycounter lvl 3
    @Shadowwalker - did you ever figure this out? Did snapping the UVs to the resolution help?
Sign In or Register to comment.