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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Baked lighting problem

First, I have searched long and hard for an answer, and haven't found any working answer, which is why I'm asking the question :)
I've been working on a simple room in UE4. I started out making the actual structure out of UE4 cubes (Scaled), but found that at the seams at the corners (Floor-wall, wall-ceiling, etc.) there were always dark shadows. So I decided to model the room in Blender. I've made sure the normals are all correct and created a 2nd UV channel for the lightmap, and smart UV unwrapped it with pleanty of margin (See image).
But now, in UE4 there are still shadows in the corners and half the model has gone black... I've made sure all the faces are on the lightmap, unticked generate lightmap UVs and put the lightmap resolution up to 256... Any ideas?

alt text

alt text

alt text

Product Version: UE 4.22
lightmap.png (412.0 kB)
black2.png (312.7 kB)
black1.png (516.4 kB)
more ▼

asked May 24 '19 at 05:15 PM in Rendering

avatar image

8 2 5

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

1 answer: sort voted first


I think you haven't tried hard enough to find a solution! It's one of the basic problems... Read more about the subject! Static lighting, lightmap resolution, lightmass settings... Watch tutorials...

Your main problem is lightmap + its resolution! 256 res lightmap for a whole room? Where did you find this?! ...also not a good idea to keep a whole interior as one mesh, but again: READ MORE ABOUT THE SUBJECT!!!

more ▼

answered May 24 '19 at 05:30 PM

avatar image

1.2k 3 4 8

avatar image Spencer45 May 24 '19 at 05:39 PM

Ok, sorry! I asked on another forum and was told I should have my lightmap resolutions no higher than 256, I assume that person was wrong... I'm branching out from 3d modelling in Blender, so still starting out in UE4! But you're right, I do need to look into it more. If you don't mind, could you clarify please: Why isn't it a good idea to have a whole room as one mesh? Thank you so much for helping me!

avatar image Makigirl May 24 '19 at 05:51 PM

No worries!! So the problem is with one mesh is that there is a limit for lightmap resolution which is 4096!! ...if you'd assign a checker map this size (or your 256!!) you'll see your lightmap resolution "unit" (kind of) ... it's going to be way too big for your desired result and blurry... Also if you have many but smaller lightmaps it's going to be calculated faster than one huge one!! /lot faster!!/ Also like this you can set important ares that you'd like to calculate the lighting more/less detailed by assigning lightmap resolution per object...

avatar image Spencer45 May 24 '19 at 06:10 PM

Ok, thanks for helping! After bumping up the resolution to 2048 it looks fine!
The reason I modelled it as one mesh was because I read that the black shadows (Image below) were because of the fact that I had various meshes intersecting at the corners, although now that it's building correctly it seems they're still there, so it can't have been that! I'm currently reading loads of forum posts about it :)
Also there are now shadow continuity problems, although I assume that's because I don't have the walls on the lightmap all joined together...
Thanks again for your help!

alt text

alt text

capture.png (308.0 kB)
2capture.png (373.2 kB)
avatar image Makigirl May 24 '19 at 06:42 PM

Wherever there is a cut in your lightmap uvs there might be a problem... also the lightmap doesn't have to include every polygon!! The ones you will never see (inner parts, top parts, bottom parts) you can exclude!! You'll have a higher resolution... Also you can scale lightmaps non uniformly so try to cover most of the space on your lightmap!

Those dark corners... if you check your lightmap density view you'll see those are between 2 units of the lightmap! If you don't have enough lightmap resolution you'll get both side the "average" result which won't be right! So those darker lines are coming from the other side of the lightmap... higher lightmap resolution = they'll get smaller! If you exclude those (invisible/unused) parts from your lightmap they will disappear...

avatar image Spencer45 May 24 '19 at 08:00 PM

Wow, thank you, I thought all faces had to be on the lightmap! Of course now that I think about it it does make sense...
Is there any way of moving the lightmap so it lines up? Except increasing the resolution? Thanks again for the help, you've provided clearer answers to my questions than anyone else :)

avatar image Makigirl May 25 '19 at 02:29 PM

You can set a checker background in your uv channel in your 3d app and then you can corner/edge snap every uv island...

(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