Lightmap issue Clarification

Having an issue with a simple modular floor plane. See image below.

Could someone just clarify if this is a lightmap issue. I’ve created a second UV channel, with the same resolution as in-engine, all snapped to grid and I have a two pixel buffer around the face. Not sure what i’m doing wrong.

Thanks

Hey Zippyo3,

One reason for seams showing up on your floor would be that your Lightmap UV’s are not properly aligned to the UV grid. Be sure that your UV’s are aligned properly and let me know if this fixes your issue. Here is some great information about Lightmaps that could really help give you more insight on how to properly set up and render objects and meshes within your levels. Although this is dealing with UDK the same basic principles apply.

Lightmap UV Documentation: UDK: Lightmapping Basics and 18 Important Principles for Creating and Using Lightmaps for UDK

I hope this helps!

Andrew Hurley

Hi Andrew, Thanks for your reply.

I went back into maya, and set the UV grid to 0.015625 for 64x64px
I then scaled the face of the mesh to and snapped UV’s to the grid.
I made sure to leave a 2px Bufferer area around the mesh edges.
I then exported to UE4 and set the light map resolution to 64 in the mesh editor.
Set Lighting to production, and re rendered, still no change in the mesh

I had a good look through the documentation and have followed the advice however I’m still receiving these seams.

I generated a new box mesh as a floor, UV’s it, light mapped it as seen in the image below, making sure to snap UV’s to the UV Grid and set the correct resolutions.

I deleted the directional light acting as sunlight in the scene and replaced it with a simple point light inside my building. I’m still receiving those seams.

Try giving the faces a 4px buffer instead and increasing your resolution to 128 to see if that fixes anything as well. Let me know if this changes anything or if you are still experiencing the problem. I have a feeling that the 2 px buffer might not be quite what is needed.

Andrew Hurley

Hi Andrew,

Increased the buffer zone to 4 pixels and increased the resolution to 128. No changes from my latest update, Still those seams on the floors.

Are these modular pieces you are connecting together or is it one complete mesh?

Modular pieces Andrew

Here is another good bit of information on lightmap texel density which has to do with matching the density of your lightmap resolutions with your UV’s. It has a video and can explain it better there than I can through text.

Lightmaps resolutions and desnsites:

If after looking at this documentation and are still unable to fix the issue. I might request the bare assets needed that you are using (modular pieces and their UV’s) so I can take a look at it on my end.

Andrew Hurley

Had a flick through that tutorial Andrew, was very helpful, fixed an issue I was having previously, however still didn’t fix the seams in the level.

I tried something new, I created a new empty scene, added in the floor meshes, added and light and rendered. No seams.

Not sure why seams are being produced in the previous scene, but in the empty scene the lighting and shadowing is flawless.

Yeah that documentation is awesome, but I am glad the issue was fixed in your new scene. Sometimes settings in projects you have been working in for a while can be ignored and overwritten, and eventually become really hard to pinpoint the issue you are having. Either way I will mark this as resolved and let us know if you are experiencing any other issues as well!

Cheers!

Andrew Hurley

Update on the issue Andrew;

The scene was working well, lighting works perfectly, however when i removed the pint light and replaced with a directional light, all the seams have returned. What is it about the directional light that could be causing this?

See if you can’t get the settings in your directional light to match exactly the settings of your point light aside from the brightness and radius. For example the Affect Global Indirect Lighting, Cast Dynamic Shadows…etc. When you have done this and you are still experiencing the issue let me know.

Andrew

Matched the settings as best i could, however rendering had no effect. Decided I would adapt the scene a little to give it another test and reproduced the horrible seams using a point light.

It’s seems to be blocky changes in shadowing. The wall closest the light seems to have much better quality, however the wall closes the camera running to the left of the screenshot matches the floor with the blocky changes in shadowing.

Hey Zippyo3,

After messing around with some lighting in my own scene and getting some advice from another person on the team, I was able to find what I believe is your solution. Go into you World Settings tab in your level, and under the section “Lightmass” there are a few settings you can change to smooth out your lighting to get rid of the hard shadow artifacts. Hover your mouse over these names to get a better understand of what each slider/option does and how it affects your scene. Here is an image to show you an example of how my scene is set-up as far as those values are concerned.

Hope this helps, but let me know if you are still experiencing the issue.

Thanks!

Andrew Hurley

Hi Andrew, thanks for your reply.

Took some time and really played with the options in the world settings, however even this has not fixed the issue.

I do however have a check box in my lightmass options to force no precomputed lighting. My understanding is that this disables the generation of lightmaps.

After forcing no precomputed lighting, the lighting issues are resolved and there are no seams.

This is great, but i really want to understand why the generation of light maps seem to be causing issues.

I went back to the mesh settings on the floor segment, and noticed the option for “lightmap coordinate index” This by default is set to 0, but if my understanding is correct, does this not specify which UV channel contains the light maps?

I went ahead and changed it to channel 1, the lightmap channel, which worked in visually updating the lightmaps within the editor view, however was still no solution to the seams issue.

Got a little peeved at this point and tried something different, I went to the reflections demo and exported the floor mesh from that scene. Imported into my current scene and tried the lighting build again. Now those mesh’s are having the same issue as my old floor mesh, drawing seams and having harsh blocky shadowing.

"After forcing no precomputed lighting,
the lighting issues are resolved and
there are no seams.

This is great, but i really want to
understand why the generation of light
maps seem to be causing issues."

Forcing no precomputed is not utilizing lightmaps which means if you are not using static lights, there will be no shadows or information to be baked into your scene.

The lightmap, even on the grid, will help reduce the amount of shadowing seams, but will not fully get rid of the seams. This is where “World Settings” lightmass settings can be tweaked to fit your needs.

Here are the specific settings that need to be adjusted:

Indirect lighting quality: 2.0 (Higher values will increase build time, but will reduce seams)

Indirect Lighting Smoothness: 0.6 (Smooths the transitions between your shadows)

Static Lighting Scale:(Not recommended) Lowering this value will smooth out your seems because it adjust the scale of your lighting, BUT it will GREATLY increase your build times.

To go over things a little more, the seams you are seeing are created because of the way light is rendered on different threads. So the recommended workflow is to have your seams at corners, at natural seams, or use other meshes and geometry to hide or mask the seams.

Here are some links that reiterate the information provided: