Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Lighting is weird on the edges of my modular building blocks

I have had this problem a while now, when I place 2 or more exact same meshes next to each other(they are tiling) and I built lighting it looks like this: alt text

That is a stationary light with shadows.

Why does it does that? The only fix I found so far is merging the meshes into one, but that is suboptimal and I rather not do it.

The things that I have tried are the following:

  1. Exported to Blender and created a second UV map - This zoomed the textures in and rotated them.

  2. https://answers.unrealengine.com/questions/34702/bug-lightmap-color-continuity-issue.html

  3. https://forums.unrealengine.com/showthread.php?46269-Modular-Asset-Lighting-Problem

Product Version: UE 4.12
more ▼

asked Oct 04 '16 at 06:51 PM in Everything Else

avatar image

604 35 27 45

avatar image AndrewHurley Oct 04 '16 at 07:14 PM

Hey Mr.Goatsy,

So in the second link you provided Tim H. provided a final image with some settings to try to help resolve modular lighting issues like the one you are reporting.

You said you have already tried the following, but those settings should be giving you a different result. Be sure your Lightmap UVs are snapped to the grid and padded correctly first.

Then try the settings below:

LM Resolution: 64 Light Build Quality: Production

World Settings: Static Lighting Level Scale: 0.1 Indirect Lighting Quality: 2 Indirect Lighting Smoothness: 0.6

Try these settings and let me know if you need additional information.


Andrew Hurley

avatar image MrGoatsy Oct 04 '16 at 07:21 PM

But that will really increase build time wouldn't it?

avatar image MrGoatsy Oct 04 '16 at 09:10 PM

I tried it out and it does seem to fix it but the build time went up by about 1000% even at medium quality, so this fix is also suboptimal.

Is there anything else I can try?

avatar image AndrewHurley Oct 04 '16 at 09:48 PM

So now what you can do is begin scaling the Static Light Level back up in iterations until you get the right results with minimal build length time. Your first solution of combining the modular meshes is actually your best solution.

Once you have the modular assets in place and how you would like, you can combine them to reduce mesh draw calls which will also resolve your lighting issue. This is a typical workflow and using this process is a good way to optimize your project and clean up the lighting.


Andrew H

avatar image MrGoatsy Oct 05 '16 at 07:32 PM

If I put the min lightmap resolution at 64 and the light map resolution also at 64 weird black lines are visible at the border, so that needs to be at at least 128 or 256, is there also a fix for that?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Not sure how applicable this guide is to UE4, but following the principle of not putting UV borders between pixels coupled with adjusting indirect lighting smoothing, I was able to minimize the issue, referenced in the question, to the point where it is was almost unnoticeable.

Do note, that you should mind size of your lightmap in a such way, that lightmap UV seams never fall in between pixels. Roughly estimate intended lightmap size for particular object, 64x64, for example and unwrap it using pixel snapping. Grid step for this would be 1/64=0.015625. Then, if you want to adjust lightmap resolution in the engine, you can do so via power of two value, and your snapping will preserve for higher or lower lightmap resolution. And always leave some sort of padding for your lightmap unwrap, not only between UV shells, but also UV islands and 0-1 borders.

If you don't want to bother with this precision during unwrap, or if you are still getting noticable seam, consider hiding it under some sort of trim geometry, or plan your modular kit so that border faces join always at some sort of angle.

more ▼

answered Oct 06 '16 at 01:14 PM

avatar image

7.9k 130 31 295

avatar image MrGoatsy Oct 07 '16 at 12:37 PM

I always use the UV map generated by UE4 unless it is a complicated custom mesh which in this case it isn't.

My lightmaps are always a multiplication of 64 so that isn't the problem.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question