Material detroys lighting


i have a problems with shadows on my meshes.
While in many cases, the culprits are either improper set up UV maps or insufficient lightmap resolutions, in this case it seems to be the material setup that detroys the lighting.

Somehow pointlights look sort of like spotlights. They only cast light onto the mesh on one hemisphere:


If I put another material (just a simple color) onto the mesh, the lighting behaves as expected:


So it must be the material, but what is wrong with it :confused:

Here is how its set up:

There is a function that blends textured, based on a RGBA mask. The individual channels can also be “disabled” and replaced by a defaul color.


This function is used in the material to create the diffuse and normal maps:


And finally, on instance level, I assign some decent textures:

… and that instance is what finally goes onto the mesh.

Has anyone an idea what is going wrong with the lighting here?
(Note: Lighting was built as “production”)


remove the normal map input and tell us if it’s still an issue. Just to narrow it down.
ps: never experienced this.


Thanks for the reply. :slight_smile: I tested a bit with the normals and indeed it looks like the normal maps are responsible for the bad lighting.
But this is really confusing:

If I disconnect the normal input, the material looks flat, but is lighted correctly:

To see, if maybe the blend function screws up the normals, I just hooked up a single plain normal map to the pin:

This has the same effect on the lighting :eek:

I tried now to see if the mesh is somehow involved in this. So I created a simple brush and put the material on it.
On a brush, the material behaves normal:

The lightmap for the mesh should be ok:

Also, with the simple material, the shading is correct. So I cant see what is going on here :confused:

When I checked the material instance settings, I noticed that I get a warning on the normals. What does that mean?

Is there maybe something wrong with the normal texture?
Its settings are:

Thanks for looking into this :slight_smile:


In material editor check the texture sample for normal map and see if it is set to Color or Normal.



Thanks for the suggestion :slight_smile:
The sample type is “normal”. I checked and also all parameters that deal with normals. They were set to color. I changed them to “normal”.
Now, the error is gone, but I still get that lighting effect.

I tried with a simpler material setup:
The diffuse parameter sampler type is set to “color”, and the one for the normal parameter is set to “normal”.

With an instance that does not use a normal map:

I get a correct lighting:

Now I use a normal map (that was imported as normal map and is compressed as TCNormalMap, like the one above):

Then I get a broken lighting again :frowning:

In the past, I never noticed such problems with normal maps. I feel like someone who forgot how to tie shoes … :confused:


Maybe something is wrong with your normal maps themselves. Have you tried plugging a normal map from the starter content?


Thanks :slight_smile:
Yupp… Its the normal map dat that causes this.

I migrated some normal textures from the starter content and it looks like this:

So I reviewed the normal map generation process.
I use the NVIDIA photoshop filter to create my nomral maps.
I recreated one of the rock texture normal maps from the diffuse with these settings:

When imported into UE4, I can see already a difference in the thumb image:

When I use that normal in a material, it works :slight_smile:
The normal textures on the lower plane are from the starter content. The wood texture shows the newly rendered normalmap based on the rock diffuse:

So it is established that my (initial) normal maps are crude. I played abit around with the NVIDIA filter parameters.
I have to admit that Im not always sure what Im doing there. I experiment a lot because I cant find a decent description for that filter and what each parameter does.
Its possible that I generated the original normal maps with some absurd value so that the result is overdriving something now. I dont know.
Does anyone have any information about the filters settings :confused:


I’ve never used nvidia’s normal map generator so i cant help you there. But i’m glad you found the troublemaker. :slight_smile:

Try to make sure that when you import a normal map that it knows to import it as a normal map, rather than changing settings for the texture after it’s imported. You can make sure it does this by adding the word normal to the file name. I think it was a similar issue in UDK that changing the settings after importing didn’t adjust the texture correctly while having it set correctly will work.

The nvidia normal map tool has a depth setting, usually 3 to 5 are good, also make sure it’s RGB biased / height cant remember the name atm.
Artists usually build their own texture etc by creating the low poly and building a high poly then bake the info.

This isn’t my field a 3d artist should give you some more details about the whole process.