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.
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).
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.
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.
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
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.
Replies
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?
Is this documented anywhere? Any lightmap resource related to udk/unreal 4 has failed to mention this.
https://answers.unrealengine.com/questions/95423/lightmass-with-bad-shadow.html
It's really annoying it's not documented anywhere.