Lightmass with bad shadow

Hello everyone,
I have a simple map with the Lightmass Importance Volume, few spotlights and one point light. Everywhere, my floor has seam caused by shadow/light. I tried to increase light map without success. Increase lightning quality reduces a bit the seam, but it is not effective. Baking light in Production quality still has problem.

I post an image here with my UV Channel 1 (lightmap coordinates) and the result. I added the point light to show you the problem is still there.

Thank you,
Sam

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! :slight_smile:

Tim

Hello, thank you for your reply.
I added a second UV with a padding of 0,0161290322580645 [1/(64-2)]
The only problem is I can’t set Indirect Lightning Smoothness to 0.06. UE4 minimum is 0.25.

My mesh is 4m by 4m and it’s only a plane.

Current quality : Preview

Build in production quality is better than yesterday, but seams still there. I’m thinking about creating bigger mesh. I tried the exact same mesh in UE3 (UDK) and it’s work perfectly.

Sam

I find what is causing the problem, but I can’t solve it.
I’m using light’s boucing to illuminate my room. It’s creating artifacts

The only problem is I can’t set
Indirect Lightning Smoothness to 0.06.
UE4 minimum is 0.25.

Oops! Just realized that was my goof! It’s 0.6. I got carried away with my 0’s! :confused:
Give that a shot and see if that helps.

As for your test in UDK you can’t necessarily compare the two as the rendering pipeline is different. UDK used a Forward rendering where as UE4 using Deferred Rendering.

If the 0.6 value doesn’t work, would you mind posting your mesh for me to test or give me the demensions in Cm that you used and I can throw a mesh together in Max to give you an example from my end.

Another thing that will greatly help out is to change the environment color to something brighter than black. This will also help in decreasing the shadow seams the more towards White the color is.

Let me know and I’ll take a look! :slight_smile:

Tim

Hello Tim,

Lightning smoothness to 0.6 didn’t fix the problem :frowning:
I tried another way but it doesn’t work. I guess it’s coming from my map setting or light parameters. I look into Elemental demo and the floor has smaller (but still) issues with GI too.

Here is my map and my fbx. Can someone shed some light on it? :o

Dropbox of my map and fbx

Okay, So I’ve worked some time in to get this one figured out for you. Apologies for the delay.

There wasn’t anything wrong with your mesh. Everything is on the grid the way it should be.

There are a lot of things to tweak in your Lightmass that can affect how lighting is baked. Adjusting some other settings can also help but it can greatly increase build times as well. You will also have to bake lighting on a level other than Preview to see better results.

Here are the changes made in World Settings to get the following results:

World Settings > Lightmass

Static Lighting Level Scale: 0.1 (Anything below 1.0 will greatly increase build times from the warning)

Indirect Lighting Smoothness: 0.6
Indirect Lighting Quality: 2.0

Static Mesh LM resolution: 64 (128 looks better though)
Here are the results with Preview on:

Here is the results with lights baked with HIGH:

This should be enough to get your clean results. Give this a shot and let me know how it turns out.

Tim

Hi Tim!

It does the trick! Static light looks great now :slight_smile:
Thank you for all your help!

Sam

Great! I’m glad that worked for you. :slight_smile:

Feel free to ask questions anytime if you’re getting stuck and I’ll help where I can.

Tim

I used those settings in my level and they worked well, but after updating engine to 4.5 everything went south. Seams are still visible.

@Mariusss: Please post as a new question in the Rendering section.

Thank you

Hey Tim, I just wanted to clarify what you said in the first post about grid snapping sizes for lightmap UV’s.

If I’m making an asset that will have a size 64 lightmap, I want to set my gridsnap size for lightmap UV’s to 1 / (64-2) correct? I’m curious where that -2 is coming from, and why it isn’t mentioned anywhere in the lightmapping documentation? Is the engine automatically snipping one pixel off of each side of the lightmap texture?

@lucas.annunziata:

Personally I would use either. In most instances I’ve not noticed enough of a difference to justify doing for anything other than flat modular walls to avoid seams. Even then it won’t completely reduce the effect.

This conversation and my own testing with this started with the following post:

Reddit Post that mentions this method.

AH post where I started testing with it.

Simple Test Map for demonstration.

In the test map you’ll see a difference really only in the underside of the ceiling wall. As I said, for most meshes I’ve not worried about altering my method since a lot of my objects are not modular and needing to reduce the seams. You will still need to adjust other things in world settings to get the best results though.

The lightmapping documentation is rather sparse thus why I and many others link to World of Level Design for the in-depth overview. :slight_smile:

Tim