Unexplained Lightmap and Material Errors

I’ve decided to use UE4 for rendering shots recently, so I’m very new at this, and am likely to be making some dumb mistakes here.

My first problem stems from an error with my lightmaps. I get this blotch of shadow that I can’t explain, and whether I use UE4’s generated lightmap UVs, or try my own, it’ll still show up. I tried to use Blender’s lightmap unwrap that automatically breaks down the model to its individual faces, but that only seemed to make things worse. To give you an idea of what I’m talking about, here’s a couple of pictures, before light baking, and after. In general, baking makes all my models look a bit blotchy and bruised, but the vending machine is the worst of the bunch.



It’s there at the bottom right of the white door.

My second problem that the metals in my materials are way overblown. They look fine in Substance Painter and Blender Eevee, but come out WAY too chrome in UE4. I’m using the generic metallic-roughness setup, with individual textures for each input.

What exactly is going on here? What can I do to fix it?

Could be a myriad of things, from flipped normals to bad UVs.

To unwrap for light you should really keep the whole face together. So you would have 4 panels and 2 tops. Like if it were a regular box.

All the separate pieces and parts should be exploded with that in mind when you cut the UV.
The more uniform and flat the UV is, the better the light bakes on…

Another issue could be your normal map. Or the vertex normals of the object if they have been manipulated in any way.

It takes time, patience, and 20 or so unwraps to get it right.

Also, the fact that any 3d program shows it fine means nothing. They work at a much higher precision than the engine so you can never expect identical results (but it is nice when you get them).

I checked for flipped faces, weirdly aligned normals, or any other goofy thing, and it’s all looking about how I’d expect. The UV is clean there too, it’s flat, and not mirrored at all. I also removed the normalmap from the material to see if that was causing the issue, and, nope, that blotch still shows up. The only thing I see that could possibly maybe cause an issue is that that little door is floated, and the faces do intersect with the surrounding geometry slightly to close any gaps.

Really, the only thing I can figure is that it’s a bad lightmap unwrap. I’ve never done them before, so I don’t know the ins and outs and best practices for them yet. I’ll goof around with them some more, but in the meantime, here are some shots of the UVs both in Blender, and the lightmap generated by UE4 to see if maybe I’m doing something dumb I’m not cottoning on to.

UV Pic that I uploaded to Imgur cuz the forum is really picky about file sizes.

Generated Lightmap.

Likely decrease static lighting scale to 0.5 or 0.25. Also do NOT EVER use blender lightmap unwrap, its literally the worst unwrap method there is.

Did that, and all it did was make that one big blotch into two smaller ones.

So I just made my own lightmap UV. I read up on it, and it seems that you need to keep your islands as contiguous as possible without risking stretching, with a good sized margin between them. I did that, and the results were a helluva lot better, but it still has some weird bands and bruises here and there.

If I knew why it was doing that, I’d be in a much better position here. Thing is, it seems random. Where the splotches appear aren’t unwrapped any different than anything else.

Maybe it has something to do with the resolution. Should I bump the min lightmap res up higher than the default 64?

Alright. Won’t do it.

Oh, there’s your problem, 64 is very low, For a mesh that size id recommend 256, give or take a power of 2, 64 is only for small meshes. The only reason you would go lower than 64 is for pebbles/grass/other foliage or on mobile. For extremely large meshes i would stop at 2048 or 1024, but nothing is stopping you from going to the 4096 hard cap.

That helped, but I’ve still got some issues.

Is there a way you can look at the baked lightmap?

you can use the detailed lighting view mode to check it out.

But what I said originally was on how to unwrap the lightmap uv. the whole face should be contiguous, when you bake you want as many islands as possible to actually be connected.

Second. what you are looking at in blender is Face normals.
The ones you want should be displayed in purple I believe. Those are the ones that get exported out with mikkt option.
However since You don’t seem to know about them I doubt you messed with them. still worth a quick look.

Other than that, just need to work the UV unwrap manually until no artifacts are present…

You mean split normals? I rarely ever mess with those, but I did check to see if I had maybe possibly accidentally changed something at some point. I didn’t.

Though I have noticed that all my lighting errors are centered primarily around my floated geometry. See, there aren’t a lot of contiguous parts on that mesh, since I wanted to keep all its individual parts separate so I could twist and bang them out for a worn look without stacking on any extra geometry. When I did my lightmap UV, I kept as much together as I could, but, well, this is the end result…

And it seems that anything that’s standing alone gets smooed or ignores faces altogether, like this…

The other two meshes don’t have this problem, and the only reason as to why is that they don’t have so much floated geometry.

…but hey, I did fix the blotch on the door, so progress is being made. Didn’t realize the move to UE was gonna be quite this difficult though. O_0

It looks better in the end - performance wise I’m still unhappy, but that’s another story :stuck_out_tongue: