- Inverted red channel of the pond normal map so it looks bumpy

- Fixed the HelloMaterial tuto so the rock shines like in the screen shots

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9174 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
rem..om 13 years ago
parent 26ffa11655
commit c4231e3200
  1. 3
      engine/src/test/jme3test/helloworld/HelloMaterial.java
  2. 19
      engine/test-data/Textures/Terrain/Pond/Pond.j3m
  3. BIN
      engine/test-data/Textures/Terrain/Pond/Pond_normal.png

@ -95,6 +95,9 @@ public class HelloMaterial extends SimpleApplication {
Material mat_lit = new Material(assetManager, "Common/MatDefs/Light/Lighting.j3md"); Material mat_lit = new Material(assetManager, "Common/MatDefs/Light/Lighting.j3md");
mat_lit.setTexture("DiffuseMap", assetManager.loadTexture("Textures/Terrain/Pond/Pond.jpg")); mat_lit.setTexture("DiffuseMap", assetManager.loadTexture("Textures/Terrain/Pond/Pond.jpg"));
mat_lit.setTexture("NormalMap", assetManager.loadTexture("Textures/Terrain/Pond/Pond_normal.png")); mat_lit.setTexture("NormalMap", assetManager.loadTexture("Textures/Terrain/Pond/Pond_normal.png"));
mat_lit.setBoolean("UseMaterialColors",true);
mat_lit.setColor("Specular",ColorRGBA.White);
mat_lit.setColor("Diffuse",ColorRGBA.White);
mat_lit.setFloat("Shininess", 5f); // [0,128] mat_lit.setFloat("Shininess", 5f); // [0,128]
shiny_rock.setMaterial(mat_lit); shiny_rock.setMaterial(mat_lit);
shiny_rock.setLocalTranslation(0,2,-2); // Move it a bit shiny_rock.setLocalTranslation(0,2,-2); // Move it a bit

@ -1,7 +1,12 @@
Material Pong Rock : Common/MatDefs/Light/Lighting.j3md { Material Pong Rock : Common/MatDefs/Light/Lighting.j3md {
MaterialParameters { MaterialParameters {
Shininess: 8.0 Shininess: 8.0
DiffuseMap: Repeat Textures/Terrain/Pond/Pond.jpg DiffuseMap: Repeat Textures/Terrain/Pond/Pond.jpg
NormalMap: Repeat Textures/Terrain/Pond/Pond_normal.png NormalMap: Repeat Textures/Terrain/Pond/Pond_normal.png
} Diffuse : 0.8 0.8 0.8 1.0
} UseMaterialColors : true
Specular : 1.0 1.0 1.0 1.0
}
AdditionalRenderState {
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 490 KiB

After

Width:  |  Height:  |  Size: 488 KiB

Loading…
Cancel
Save