Lighting Errors on Static Mesh


I’m on UE4 4.26.

I’ve created a mesh and painted it with 3DCoat.
The model works perfectly in Blender with both Cycles and Eevee but after I’ve imported the mesh into the UE4, weird problems started to appear.

Firstly, neighbour faces being lit differently, for some reason (marked with red). I’ve tried putting the mirrored UVs at the same place but it didn’t change anything.

Secondly, weird bold lines appeared at random edges (marked with green), as you can see on the top side of the wheel cover thingy.

I thought it could be about lightmap UVs, but this happens in non-static lighting. It doesn’t contain any lightmap information.

Thanks in advance for your help lads.

It looks to me like your texture map does not have enough border pixels, where it duplicates pixels on the edges for a few layers. If your background is black in the texture and there isn’t enough pixels on the border it can have some dark edges around your UV’s. It would also get worse if you drop the resolution of your texture so it could be that the engine is using a lower mipmap for the texture which is making the edges show up.

Neighboring faces with different light has to be due to normals (or inverted uvs on double sided mats possibly but much more rarely).

The wheel cover looks more like extruding geometry from below at a glance.
You would have to check the model to be sure. Maybe in wireframe view.

Can you tell me how to fix them if normals are the problem?

Btw I’ve checked with multiple materials and textures, including flat color (not unlit, but a vector3 as the base color) but got the same effect. So I don’t think its because of the textures, too.

Here is the model file if you want to check.

ye it related to how u made your UVs, better fix these first:

the 2 last warning usually mean there some polygon which haven’t been unwrap.
If everything look good, reimport and see if the warning appear again, and if there dark texture on a specific part, try to flip the polygons from blender ( select the affected face or all, Mesh>Flip Normal )

the first warning if you using blender, during export do:  Smoothing: Face

I’ve fixed the first warning but flipping normals changes face orientation and this makes them invisible from the perspective. Making material two-sided makes them appear again but lighting is still different.

I want to re-unwrap the model but I don’t want to lose all the texture work that I’ve done until now. Is there an easier way?

If you see invisible parts that mean it showing the backside of the polygon, well then it mostly likely a UVs problem.

The easier way would be to guess where the affected part exactly from ue4 and unwrap that specific part but you might spend more time figuring out where the exact spot is than to remake everything.

If you do plan to remake the front part, you can export it uv layout as image and try to use it as a reference/guide.

No. it’s not an “easy” objective.

make a copy of the model, adjust the UVs, and you can try to paste/mirror copy from the different model - blender is pretty decent at doing that when you paint (but it’s no substance - or mixer.

Looking over your model rn.

It’s not bad, per-se, but it is not UV mapped.

First things first. you should not let the engine triangulate for you. Triangulate the model before exporting (use a modifier, it’s still way better at it then unreal).

Second. There’s a lot of areas where there’s useless edges.
This can have been a result of a bad export. (or inexperience. vertex normal auto smooth can lead to this too).

Third, and likely the reason for the problem:

As you can see the UV map is no good - at all.

The model imported in with a scale of 1022.38 - not exacly sure how you managed to export it that way from ue4 to be honest.
I would suggest making sure the scale is correct before exporting - and that the import doesn’t change or mess with it.
Apply all transforms BEFORE exporting.
If you loose the scale, get back to it from a known measurement - wheel diameter is probably your best bet.

Within specifics, the reasons the normals on the hood look bad is that they are bad.

the blue lines basically mean that EACH face has it’s own normals.
so the normals are connected and shared between vertex in some parts of the line that goes into the model, and separate and different on others.

The best solution here would be to simiplify the geometry quite a bit. vertex/edges are very close to each other - there’s really no need to have things with distances less than .5cm on a car model - with a few exceptions to make stuff smooth.

The cheap fix is to separate the item, and leave the hood “whole” without the hole into it. just the piece extruding from it.
Since it is “separate” the normals under it will always be perfect. and the thing on top will have it’s own set of stuff. (not to be imported as a separate object, just separate the geometry).

1 Like