Download

Help Involving Lightmap Unwrapping and Overlapping UV's for Modular Asset Creation!

Hey everyone.

I am working on a modular building set, for an underground sewers scene! I am creating the models in Blender, just an FYI

There are a few problems I need to address first.

First off, following a few tutorials, I created two UV sets. One for the repeating texture, and one for the lightmap unwrap:

cd0fb364a8fcf8048ac4a20746e0256d3316c0f2.png

Of course, to use the repeating texture/material, well, repeatedly, I need to make the UV’s leave the square previewer and have it, well, repeat. That is the correct way to do it, right?

The lightmap uv’s, however, have no overlapping, and all the islands are inside the square previewer.

When I import it into UE4, I get a bunch of problems!

![unrwap2].jpg|1600x1720](upload://dRJzFqa7UP8uAg7Q39GfwiCfrkT.jpeg)

First off, it gives me 3 unwrap channels??? The mystery third channel is the one that you see in the previewer. Where did it come from?? I didn’t unwrap that!

And secondly, the errors list I get after the light build say that

  1. I have overlapping UV’s

  2. The Lightmap has Overlapping UV’s (by 8.2 percent??).

Well, for one, overlapping UV’s for the base texture is fine, how is that a problem?

And secondly, my lightmap doesn’t have any overlapping UV’s! Is it using the mysterious 3’d unwrap as the light bake? How do I get rid of that? It just like, generated that unwrap by itself! I can’t delete it from UE4, and it doesn’t exist in the Blender version! What do I do?

Hi!

If your static mesh have properly secondary UV for lightmap. You need uncheck Generate Lightmap UVs in UE.

6b679a7f85fb090de0117e1715e659a91d7e230d.png

Also, your geometry has some unneeded loops, you can get rid of some edges and reduce the polygon count.

That is for vertex painting. I can’t paint as much detail if there are only verts on the corners! I need some verts!

But thank you for the tip, ssv3d! That is one down!

Another problem I am having with my light maps is that when I put two objects together, side by side, it puts a very ugly black ‘shadow’ where the seam is:
(sorry, insert image isn’t working for some reason!)

http://s26.postimg.org/wuoxtzd6x/unwrap3.png

Once again, here is my light map to show that there isn’t any sort of overlapping:

http://s26.postimg.org/sa2rf1thl/unwrap4.png

Light maps for modular system has a some issues. Read this thread

Yes, thabk you very much, ssv! But it seems like the people in that thread have it more figured out than I do…

I do have the problem where all the ‘panels’ are lit slightly differently, but a problem I have on top of that is the ‘seams’ have an almost pitch black shadow on it, if you could refer to the above image.

Once I get that fixed, though, i’m heading straight over there, so thanks!

I’m almost positive that I read somewhere in the UE4 docs that you can’t have overlapping UVs at all.

You can edit the layout of your UV maps though in blender, like cutting sections and moving them around, resizing cut sections, rotation etc., before exporting to make sure no sections overlap. It won’t change the way it maps to your model. The UV map knows what goes where regardless of where you stick it within the map. It’s mapped vertex-to-point, if that make’s sense.

Not a problem. Overlap the normal UV’s as much as you want. Only the lightmap UV overlap matters. Not sure why UE4 complains about it.

Untitled.png
Here’s where your 8.2% is at. It was created by UE4 when you imported your mesh. See the answer below.

It’s not a problem.

UE4 will create lightmapping itself, unless you uncheck the box when importing your mesh. svv3dUDN replied with a screenshot of it. When you create your own lightmaps, make sure this is unchecked.

Yes, I figured it was generated somehow, thank you!

Now, I still have the problem with the ‘black shadow’ going along the seam of each object. I posted some pictures above but I’ll show it with insert image, as it wasn’t working on mobile when I posted it.

unwrap4outlines.png

See the lines? I am not entirely sure on how to fix it.

Looks like you have shadow bleeding. I looked at your UVMap.001 in your first post, and you will need to put more padding between the faces.
The way i do it for light mapping in Blender, and I want to preface that it may be the wrong way, or there may be a better way, but it’s how I do lightmapping.

(If you already have one UVMap created, but not the second, duplicate the first and make sure it’s selected. You can then overwrite it with the following steps)

  • Select the model
  • Hit “Tab” to go to Edit Mode
  • Hit “A” a couple of time to make sure everything is selected
  • Press “U” to bring up the unwrap dialog box
  • Choose “Smart UV Project”
  • Leave the angle limit alone, and modify Island Margin and Area Weight.
  • I normally use .3 for each, but have gone up to 1.0
  • In the UV window, press “A” to select all the faces, and if they still seem to close, press “Ctrl+P” to repack the faces
  • Choose a margin on the right that you think will give your shadows enough room to avoid bleeding into another face.

Hopefully that helps.

Thanks Tkfore!

I did what you recommended, I even snapped it all to a 32 x 32 grid:

http://s26.postimg.org/ht9bqv79k/unwrap5.jpg

It looks much better now! But I’m still getting some ‘shadow bleeding’

Should I space it out even more??

Hey everyone,

after much trial and error (keeping UV islands vertical helps a lot, for example.) I got my lightmass baking looking pretty okay:

e6c92f29823610e6b17c75864149728a44258741.jpeg
(ignore the corner pieces, those aren’t properly unwrapped yet)

…until I get a light that casts shadows!

58bb7957db62161441271b868c5b10aacd47bea8.jpeg

I get weird squiggly shadows! Now what is going on!!??!?

Increase lightmap resolution for the model. It’s defaulted to 64, but this looks like a large object, so you will want to make it larger. Start with 128, and move up if needed using “power of 2”. I.E.- 128, 512, 1024, 2048.