My last post just crashed so I’m writing this again.
I’ve looked at a few threads but I’ve not seen anyone post this issue. I’m using modular pieces for a ceiling from Maya that tile and have blending shaders on them. I have set up the LM UV set on them to 64x64 and laid out the UV shells snapped to the grid with 0.015625 spacing. They have come through to Unreal successfully but when I bake the Lightmap Density seems incorrect to me, the Pixel guides overlap the edge of the geometry and it’s causing seams in my geometry. Is there some UV compression going on?
Thanks for the swift response, I’ve followed the steps suggested and still getting the same results. I’ve added some updated screen shots below. I’m planning a project with this modular workflow. Any other suggestions are much appreciated.
A lightmap size of 8 would mean you have a 8x8 lightmap texture. or 0,125 per pixel in a 0-1 space.
A lightmap of 64 would mean a 16x16 pixel lightmap texture or 0,015625 per pixel in 0-1 space. so far so good.
Thing is, ue4 needs a one pixel buffer on each edge of the 0-1 space.
It took me a while to fully understand the math behind it untill I found this:
(Something Epic should take note of)
Most noteworthy:
The solution and the numbers ! :
You need to substract 1+1 to all your lightmaps grids that you use in your UV editors.
32x32 Lightmap ? Grid has to be 30x30
64x64 >> 62
128x128>>126
256x256>>254
etc… of course…
So how do I set my grid size ?
Well here are the values, internet will tell you 1/32 1/64, don’t listen to them !!
1/30 : 0.033333
1/62 : 0.0161290322
1/126 : 0.00793650
1/254 : 0.003937007874
1/510 : 0.0019607843172
1/1022 : 0.0009765625
Which helped me to get smooth lightmaps all the time.
Your UVs is OK. Try to set parameter Lightmass → Lightmass Setting → Static Light Level Scale to 0.1. And random luminosity on modular meshes should disappear.
So I have tried a number of combinations of grid settings. Our graphics coder has suggested that because the format is compressed to DXT in Unreal, and DXT works in chunks of 4 pixels that the padding may be 2x2 pixels at the edge so if they are butted together in a large map that you get 4x4 between them. So I’ve tried working with 4x4 gaps between shells which equates to working at a grid of 30x30 in Maya for a 128 map (with a 4pixel pad).
So the best result in Production bake is below, but the modular pieces look like they’re coming from different lighting setups now, which suggests it’s more than just an edge issue.