diff --git a/engine/src/test-data/Textures/BumpMapTest/Dot3.jpg b/engine/src/test-data/Textures/BumpMapTest/Dot3.jpg deleted file mode 100644 index 9240dd1df..000000000 Binary files a/engine/src/test-data/Textures/BumpMapTest/Dot3.jpg and /dev/null differ diff --git a/engine/src/test-data/Textures/BumpMapTest/Dot3_dxt1.dds b/engine/src/test-data/Textures/BumpMapTest/Dot3_dxt1.dds deleted file mode 100644 index 8199cedd3..000000000 Binary files a/engine/src/test-data/Textures/BumpMapTest/Dot3_dxt1.dds and /dev/null differ diff --git a/engine/src/test-data/Textures/BumpMapTest/Dot3_latc.dds b/engine/src/test-data/Textures/BumpMapTest/Dot3_latc.dds deleted file mode 100644 index 26302f5cf..000000000 Binary files a/engine/src/test-data/Textures/BumpMapTest/Dot3_latc.dds and /dev/null differ diff --git a/engine/src/test-data/Textures/BumpMapTest/SimpleBump.j3m b/engine/src/test-data/Textures/BumpMapTest/SimpleBump.j3m index b23e10a64..9ed9187da 100644 --- a/engine/src/test-data/Textures/BumpMapTest/SimpleBump.j3m +++ b/engine/src/test-data/Textures/BumpMapTest/SimpleBump.j3m @@ -2,6 +2,7 @@ Material Pong Rock : Common/MatDefs/Light/Lighting.j3md { MaterialParameters { Shininess: 8.0 NormalMap: Textures/BumpMapTest/Simple_normal.png + ParallaxMap : Textures/BumpMapTest/Simple_height.png UseMaterialColors : true Ambient : 0 0 0 1 Diffuse : 1 1 1 1 diff --git a/engine/src/test/jme3test/material/TestBumpModel.java b/engine/src/test/jme3test/material/TestBumpModel.java index 1003531fe..250e94d8c 100644 --- a/engine/src/test/jme3test/material/TestBumpModel.java +++ b/engine/src/test/jme3test/material/TestBumpModel.java @@ -60,12 +60,12 @@ public class TestBumpModel extends SimpleApplication { @Override public void simpleInitApp() { Spatial signpost = (Spatial) assetManager.loadAsset(new OgreMeshKey("Models/Sign Post/Sign Post.mesh.xml", null)); - signpost.setMaterial( (Material) assetManager.loadAsset(new AssetKey("Models/Sign Post/Sign Post.j3m"))); + signpost.setMaterial( (Material) assetManager.loadMaterial("Models/Sign Post/Sign Post.j3m")); TangentBinormalGenerator.generate(signpost); rootNode.attachChild(signpost); lightMdl = new Geometry("Light", new Sphere(10, 10, 0.1f)); - lightMdl.setMaterial( (Material) assetManager.loadAsset(new AssetKey("Common/Materials/RedColor.j3m"))); + lightMdl.setMaterial( (Material) assetManager.loadMaterial("Common/Materials/RedColor.j3m")); rootNode.attachChild(lightMdl); // flourescent main light diff --git a/engine/src/test/jme3test/model/TestMonkeyHead.java b/engine/src/test/jme3test/model/TestMonkeyHead.java index 7611d1ba0..900c67cce 100644 --- a/engine/src/test/jme3test/model/TestMonkeyHead.java +++ b/engine/src/test/jme3test/model/TestMonkeyHead.java @@ -63,7 +63,7 @@ public class TestMonkeyHead extends SimpleApplication { rootNode.attachChild(bumpy); lightMdl = new Geometry("Light", new Sphere(10, 10, 0.1f)); - lightMdl.setMaterial( (Material) assetManager.loadAsset(new AssetKey("Common/Materials/RedColor.j3m"))); + lightMdl.setMaterial(assetManager.loadMaterial("Common/Materials/RedColor.j3m")); rootNode.attachChild(lightMdl); // flourescent main light diff --git a/engine/src/test/jme3test/model/TestOgreLoading.java b/engine/src/test/jme3test/model/TestOgreLoading.java index 52d60da18..f8bca599f 100644 --- a/engine/src/test/jme3test/model/TestOgreLoading.java +++ b/engine/src/test/jme3test/model/TestOgreLoading.java @@ -29,13 +29,11 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - package jme3test.model; import com.jme3.app.SimpleApplication; import com.jme3.light.PointLight; import com.jme3.light.DirectionalLight; -import com.jme3.material.Material; import com.jme3.math.Vector3f; import com.jme3.math.ColorRGBA; import com.jme3.math.FastMath; @@ -43,8 +41,7 @@ import com.jme3.scene.Spatial; import com.jme3.scene.Geometry; import com.jme3.scene.shape.Sphere; -public class TestOgreLoading extends SimpleApplication -{ +public class TestOgreLoading extends SimpleApplication { float angle1; float angle2; @@ -53,15 +50,12 @@ public class TestOgreLoading extends SimpleApplication Spatial lightMdl; Spatial lightMd2; - - public static void main(String[] args) - { + public static void main(String[] args) { TestOgreLoading app = new TestOgreLoading(); app.start(); } - public void simpleInitApp() - { + public void simpleInitApp() { // PointLight pl = new PointLight(); // pl.setPosition(new Vector3f(10, 10, -10)); // rootNode.addLight(pl); @@ -75,11 +69,11 @@ public class TestOgreLoading extends SimpleApplication lightMdl = new Geometry("Light", new Sphere(10, 10, 0.1f)); - lightMdl.setMaterial( (Material) assetManager.loadAsset("Common/Materials/RedColor.j3m")); + lightMdl.setMaterial(assetManager.loadMaterial("Common/Materials/RedColor.j3m")); rootNode.attachChild(lightMdl); lightMd2 = new Geometry("Light", new Sphere(10, 10, 0.1f)); - lightMd2.setMaterial( (Material) assetManager.loadAsset("Common/Materials/WhiteColor.j3m")); + lightMd2.setMaterial(assetManager.loadMaterial("Common/Materials/WhiteColor.j3m")); rootNode.attachChild(lightMd2); @@ -97,14 +91,12 @@ public class TestOgreLoading extends SimpleApplication // create the geometry and attach it Spatial elephant = (Spatial) assetManager.loadModel("Models/Elephant/Elephant.mesh.xml"); float scale = 0.05f; - elephant.scale(scale,scale,scale); + elephant.scale(scale, scale, scale); rootNode.attachChild(elephant); } - @Override - public void simpleUpdate(float tpf) - { + public void simpleUpdate(float tpf) { angle1 += tpf * 0.25f; angle1 %= FastMath.TWO_PI; diff --git a/engine/src/test/jme3test/model/shape/TestSphere.java b/engine/src/test/jme3test/model/shape/TestSphere.java index 7a89c4229..77e91392c 100644 --- a/engine/src/test/jme3test/model/shape/TestSphere.java +++ b/engine/src/test/jme3test/model/shape/TestSphere.java @@ -48,7 +48,7 @@ public class TestSphere extends SimpleApplication { @Override public void simpleInitApp() { Sphere sphMesh = new Sphere(14, 14, 1); - Material solidColor = (Material) assetManager.loadAsset("Common/Materials/RedColor.j3m"); + Material solidColor = assetManager.loadMaterial("Common/Materials/RedColor.j3m"); for (int y = -5; y < 5; y++){ for (int x = -5; x < 5; x++){ diff --git a/engine/src/test/jme3test/stress/TestLeakingGL.java b/engine/src/test/jme3test/stress/TestLeakingGL.java index 343b6e045..809918c45 100644 --- a/engine/src/test/jme3test/stress/TestLeakingGL.java +++ b/engine/src/test/jme3test/stress/TestLeakingGL.java @@ -66,7 +66,7 @@ public class TestLeakingGL extends SimpleApplication { // this will make sure all spheres are rendered always rootNode.setCullHint(CullHint.Never); - solidColor = (Material) assetManager.loadAsset("Common/Materials/RedColor.j3m"); + solidColor = assetManager.loadMaterial("Common/Materials/RedColor.j3m"); cam.setLocation(new Vector3f(0, 5, 0)); cam.lookAt(Vector3f.ZERO, Vector3f.UNIT_Y); diff --git a/engine/src/test/jme3test/stress/TestLodStress.java b/engine/src/test/jme3test/stress/TestLodStress.java index de8a53ccd..a06ed5c77 100644 --- a/engine/src/test/jme3test/stress/TestLodStress.java +++ b/engine/src/test/jme3test/stress/TestLodStress.java @@ -56,15 +56,15 @@ public class TestLodStress extends SimpleApplication { dl.setDirection(new Vector3f(-1,-1,-1).normalizeLocal()); rootNode.addLight(dl); -// Node teapotNode = (Node) assetManager.loadModel("Models/Teapot/Teapot.mesh.xml"); -// Geometry teapot = (Geometry) teapotNode.getChild(0); + Node teapotNode = (Node) assetManager.loadModel("Models/Teapot/Teapot.mesh.xml"); + Geometry teapot = (Geometry) teapotNode.getChild(0); - Sphere sph = new Sphere(16, 16, 4); - Geometry teapot = new Geometry("teapot", sph); +// Sphere sph = new Sphere(16, 16, 4); +// Geometry teapot = new Geometry("teapot", sph); Material mat = new Material(assetManager, "Common/MatDefs/Light/Lighting.j3md"); mat.setFloat("Shininess", 16f); -// mat.setBoolean("VertexLighting", true); + mat.setBoolean("VertexLighting", true); teapot.setMaterial(mat); // show normals as material @@ -78,9 +78,9 @@ public class TestLodStress extends SimpleApplication { clonePot.setLocalTranslation(x * .5f, 0, y * .5f); clonePot.setLocalScale(.15f); -// LodControl control = new LodControl(); -// clonePot.addControl(control); -// rootNode.attachChild(clonePot); + LodControl control = new LodControl(); + clonePot.addControl(control); + rootNode.attachChild(clonePot); } }