Normal Maps for Terrain won't work

Hi there,

I wanted to add normal textures for my terrain to make it look more realistic. However i think they simply won’t work. I’ve added a directional light, trying different directions and stuff, but still no change. I also changed the diffuse texture to white to test if there is at least a slight difference (still nothing). I guess I must have missed something but I don’t know what :slight_smile: . Thanks in advance.

Hi! Can you post the code you’re using to load your terrain?

Hey,
I’m the programmer, he’s the designer.

Here we load the Scene:

Node scene = (Node) assetManager.loadModel("Scenes/map1v2.j3o");
Spatial terrain = scene.getChild("terrain-map1v2");
terrain.getControl(TerrainLodControl.class).setCamera(cc.getCamera());
if (terrain.getControl(PhysicsControl.class) == null) {
    terrain.addControl(new RigidBodyControl(0));
}

Pretty standard procedure, I guess :wink:

Cool, what about your code where you’re attempting to assign the texture, etc? I’d like to see what you’re attempting to do and see what might be wrong. :slight_smile:

@monkeylover said: Cool, what about your code where you're attempting to assign the texture, etc? I'd like to see what you're attempting to do and see what might be wrong. :)

Then I’d advise taking a look at the SDK code, since I simply created the terrain in the jME SceneComposer aaaaand… thats pretty much it. :smiley:

The only thing we do outside the SceneComposer that got something to do with the terrain is raycasting.

Your normals just might not be that noticeable. Often games will exaggerate them so it looks bumpier. Also the angle of the light definitely matters. If the light is head-on then the bumps obviously won’t be noticeable.

@Sploreg said: Your normals just might not be that noticeable.
@RobotK said: I also changed the diffuse texture to white to test if there is at least a slight difference (still nothing).

@Sploreg said: Also the angle of the light definitely matters.
@RobotK said: I've added a directional light, trying different directions and stuff, but still no change.

If you are trying to ask if normals work on terrain and if they have been tested: yes they do, yes they have.
As I stated above, those are the most common problems when people don’t see the effects of normals. The less common issue: the normal texture wasn’t actually set, set on the wrong layer, or the layer was not actually painted on the terrain.

1 Like

@Sploreg

After your answer I tried it out myself and… it worked.
After I talked to @RobotK, it worked for him too; he doesn’t know what was wrong the last few times.

So… yeah.
Next time I’ll investigate further myself.
Thank you.

It happens sometimes. Maybe the normal maps got moved and thus never loaded. Glad it is working now.