[SOLVED] Lastest in Questions -- Normals

I think I’m doing something wrong. I have a diffuseMap texture and then created a normal map texture. but inside the game, I see no difference. It is displayed on a Quad, if that helps.

citydoor
citydoor_normal

Inside game with normals assigned to the material.

Same Quad at an angle that should show something related to normal being on the object.

Any ideas. Inside the SDK, if I create a scene and place a quad in the scene and assign the material to it, it will reflect normals at those angles. So I’m thinking I did something to prevent it or turned it off.

Using the Common shading shader that come with JME 3.4

1 Like

I think you need to generate the tangents on your model for normal mapping.

Try with:

TangentBinormalGenerator.generate(spatial);

or

MikkTSpaceTangentGenerator.generate(spatial);

Is there any chance you also have an AmbientLight in your scene?

Having too bright of an ambient light can diminish the effects of a normal map when using Lighting.j3md, since the ambient light applies its light to every pixel evenly, regardless of the pixel’s final normal value.

2 Likes

That is it. I removed the Ambient light and it appeared.

Thanks.

2 Likes

It came through adjusting ambient light and directional light. Looks good.

Thanks.

1 Like

But it’s also true that if you don’t have tangents then normal maps will either not work at all or randomly work in strange ways depending on the direction of the quad and the graphics card.

I did add the tangents.

Thanks everyone for the help.

Note also that your normal maps will show up better if you remove the shading from your diffuse map. Right now there are already shadows built into your diffuse map so the normal mapping will always fight with that.

Yes. That is a good point. The original game had shading added in because of no lighting. It would help. I’ll do that.

Thanks.