Lightmap Question: Keep Scale or Snap To Grid?

Hi everyone,

I’m unsure if this is the most appropriate section to post this question, maybe the “rendering” section would be more appropriate. Regardless, I have a question regarding lightmap creation. Put simply, which should take precedence — keeping scale (left side image) or snapping to the pixel grid (right side image)? In other words, which will achieve better results (and less bleeding) — snapping ALL edges to the pixel grid or only the appropriate edges?

Any help will be greatly appreciated. Thanks!

Hi!

Pixel snapping is a right way. Especially if you create modular system. With the right UVs for Lightmap, you avoid artifacts on the edges.

Read this thread: Modular Asset Lighting Problem - Rendering - Epic Developer Community Forums

Hey Ben85,

As suggested Pixel snapping is definitely a good choice! When you have a hard edge it’s best to have it snapped to the grid. Even if the proportions are off a little it’s not going to distort your lightmap bake. With organic shapes it’s not as much as concern with snapping since you want to have the softer shadow that is created when the edges are not snapped. Typically when I set up any lightmap resolutions for snapping to the grid I use 64 as my snap spacing that way if I need to up it to the next size of 128 it’s going still be snapped to that grid since it’s a power of 2.

If you’re unsure with any of the methods shown in the link above or in general it may be best to create several simple meshes like you’ve got with different resolutions and snapped vs unsnapped and see the results you get from testing. Sometimes doing practical tests can give you more insight than a bunch of text telling you this it he preferred way. It’s gives a better basis for understanding and tracking down what may be wrong.

If you have any questions feel free to post and I’ll gladly help. :slight_smile:

Tim

Thank you both for replying. Your responses have clarified the process for me. Now I can go forth and create lightmaps with confidence. :slight_smile: