Browse Source

- 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

rem..om 13 years ago
parent
commit
c4231e3200

+ 3 - 0
engine/src/test/jme3test/helloworld/HelloMaterial.java

@@ -95,6 +95,9 @@ public class HelloMaterial extends SimpleApplication {
     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("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]
     shiny_rock.setMaterial(mat_lit);
     shiny_rock.setLocalTranslation(0,2,-2); // Move it a bit

+ 12 - 7
engine/test-data/Textures/Terrain/Pond/Pond.j3m

@@ -1,7 +1,12 @@
-Material Pong Rock : Common/MatDefs/Light/Lighting.j3md {
-     MaterialParameters {
-         Shininess: 8.0
-         DiffuseMap: Repeat Textures/Terrain/Pond/Pond.jpg
-         NormalMap:  Repeat Textures/Terrain/Pond/Pond_normal.png
-     }
-}
+Material Pong Rock : Common/MatDefs/Light/Lighting.j3md {
+     MaterialParameters {
+         Shininess: 8.0
+         DiffuseMap: Repeat Textures/Terrain/Pond/Pond.jpg
+         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 {
+    }
+}

BIN
engine/test-data/Textures/Terrain/Pond/Pond_normal.png