From 590991edbba495c0e1b415a6f196a330b575bec9 Mon Sep 17 00:00:00 2001 From: Richard Tingle <6330028+richardTingle@users.noreply.github.com> Date: Sat, 9 May 2026 19:34:11 +0100 Subject: [PATCH 1/2] Just 1 test --- .../animation/TestIssue2076.java | 143 ------- .../animation/TestMotionPath.java | 188 --------- .../effects/TestIssue1773.java | 266 ------------- .../export/TestOgreConvert.java | 118 ------ .../screenshottests/gui/TestBitmapText3D.java | 98 ----- .../light/pbr/TestPBRLighting.java | 192 --------- .../light/pbr/TestPBRSimple.java | 138 ------- .../material/TestSimpleBumps.java | 125 ------ .../model/shape/TestBillboard.java | 151 ------- .../screenshottests/post/TestCartoonEdge.java | 150 ------- .../screenshottests/post/TestFog.java | 271 ------------- .../post/TestLightScattering.java | 126 ------ .../instancing/TestInstanceNodeWithPbr.java | 132 ------- .../terrain/TestPBRTerrain.java | 291 -------------- .../terrain/TestPBRTerrainAdvanced.java | 368 ------------------ .../texture/TestSingleChannelTexture.java | 90 ----- .../screenshottests/water/TestPostWater.java | 212 ---------- 17 files changed, 3059 deletions(-) delete mode 100644 jme3-screenshot-tests/src/test/java/org/jmonkeyengine/screenshottests/animation/TestIssue2076.java delete mode 100644 jme3-screenshot-tests/src/test/java/org/jmonkeyengine/screenshottests/animation/TestMotionPath.java delete mode 100644 jme3-screenshot-tests/src/test/java/org/jmonkeyengine/screenshottests/effects/TestIssue1773.java delete mode 100644 jme3-screenshot-tests/src/test/java/org/jmonkeyengine/screenshottests/export/TestOgreConvert.java delete mode 100644 jme3-screenshot-tests/src/test/java/org/jmonkeyengine/screenshottests/gui/TestBitmapText3D.java delete mode 100644 jme3-screenshot-tests/src/test/java/org/jmonkeyengine/screenshottests/light/pbr/TestPBRLighting.java delete mode 100644 jme3-screenshot-tests/src/test/java/org/jmonkeyengine/screenshottests/light/pbr/TestPBRSimple.java delete mode 100644 jme3-screenshot-tests/src/test/java/org/jmonkeyengine/screenshottests/material/TestSimpleBumps.java delete mode 100644 jme3-screenshot-tests/src/test/java/org/jmonkeyengine/screenshottests/model/shape/TestBillboard.java delete mode 100644 jme3-screenshot-tests/src/test/java/org/jmonkeyengine/screenshottests/post/TestCartoonEdge.java delete mode 100644 jme3-screenshot-tests/src/test/java/org/jmonkeyengine/screenshottests/post/TestFog.java delete mode 100644 jme3-screenshot-tests/src/test/java/org/jmonkeyengine/screenshottests/post/TestLightScattering.java delete mode 100644 jme3-screenshot-tests/src/test/java/org/jmonkeyengine/screenshottests/scene/instancing/TestInstanceNodeWithPbr.java delete mode 100644 jme3-screenshot-tests/src/test/java/org/jmonkeyengine/screenshottests/terrain/TestPBRTerrain.java delete mode 100644 jme3-screenshot-tests/src/test/java/org/jmonkeyengine/screenshottests/terrain/TestPBRTerrainAdvanced.java delete mode 100644 jme3-screenshot-tests/src/test/java/org/jmonkeyengine/screenshottests/texture/TestSingleChannelTexture.java delete mode 100644 jme3-screenshot-tests/src/test/java/org/jmonkeyengine/screenshottests/water/TestPostWater.java diff --git a/jme3-screenshot-tests/src/test/java/org/jmonkeyengine/screenshottests/animation/TestIssue2076.java b/jme3-screenshot-tests/src/test/java/org/jmonkeyengine/screenshottests/animation/TestIssue2076.java deleted file mode 100644 index 50435b1218..0000000000 --- a/jme3-screenshot-tests/src/test/java/org/jmonkeyengine/screenshottests/animation/TestIssue2076.java +++ /dev/null @@ -1,143 +0,0 @@ -/* - * Copyright (c) 2024 jMonkeyEngine - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * * Neither the name of 'jMonkeyEngine' nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package org.jmonkeyengine.screenshottests.animation; - -import com.jme3.anim.SkinningControl; -import com.jme3.anim.util.AnimMigrationUtils; -import com.jme3.animation.SkeletonControl; -import com.jme3.app.Application; -import com.jme3.app.SimpleApplication; -import com.jme3.app.state.BaseAppState; -import com.jme3.asset.AssetManager; -import com.jme3.light.AmbientLight; -import com.jme3.math.ColorRGBA; -import com.jme3.math.Vector3f; -import com.jme3.scene.Geometry; -import com.jme3.scene.Mesh; -import com.jme3.scene.Node; -import com.jme3.scene.VertexBuffer; -import org.jmonkeyengine.screenshottests.testframework.ScreenshotTestBase; -import org.junit.jupiter.api.Test; - -/** - * Screenshot test for JMonkeyEngine issue #2076: software skinning requires vertex - * normals. - * - *
If the issue is resolved, 2 copies of the Jaime model will be rendered in the screenshot. - * - *
If the issue is present, then the application will immediately crash, - * typically with a {@code NullPointerException}. - * - * @author Stephen Gold (original test) - * @author Richard Tingle (screenshot test adaptation) - */ -public class TestIssue2076 extends ScreenshotTestBase { - - /** - * This test creates a scene with two Jaime models, one using the old animation system - * and one using the new animation system, both with software skinning and no vertex normals. - */ - @Test - public void testIssue2076() { - screenshotTest(new BaseAppState() { - @Override - protected void initialize(Application app) { - SimpleApplication simpleApplication = (SimpleApplication) app; - Node rootNode = simpleApplication.getRootNode(); - AssetManager assetManager = simpleApplication.getAssetManager(); - - // Add ambient light - AmbientLight ambientLight = new AmbientLight(); - ambientLight.setColor(new ColorRGBA(1f, 1f, 1f, 1f)); - rootNode.addLight(ambientLight); - - /* - * The original Jaime model was chosen for testing because it includes - * tangent buffers (needed to trigger issue #2076) and uses the old - * animation system (so it can be easily used to test both systems). - */ - String assetPath = "Models/Jaime/Jaime.j3o"; - - // Test old animation system - Node oldJaime = (Node) assetManager.loadModel(assetPath); - rootNode.attachChild(oldJaime); - oldJaime.setLocalTranslation(-1f, 0f, 0f); - - // Enable software skinning - SkeletonControl skeletonControl = oldJaime.getControl(SkeletonControl.class); - skeletonControl.setHardwareSkinningPreferred(false); - - // Remove its vertex normals - Geometry oldGeometry = (Geometry) oldJaime.getChild(0); - Mesh oldMesh = oldGeometry.getMesh(); - oldMesh.clearBuffer(VertexBuffer.Type.Normal); - oldMesh.clearBuffer(VertexBuffer.Type.BindPoseNormal); - - // Test new animation system - Node newJaime = (Node) assetManager.loadModel(assetPath); - AnimMigrationUtils.migrate(newJaime); - rootNode.attachChild(newJaime); - newJaime.setLocalTranslation(1f, 0f, 0f); - - // Enable software skinning - SkinningControl skinningControl = newJaime.getControl(SkinningControl.class); - skinningControl.setHardwareSkinningPreferred(false); - - // Remove its vertex normals - Geometry newGeometry = (Geometry) newJaime.getChild(0); - Mesh newMesh = newGeometry.getMesh(); - newMesh.clearBuffer(VertexBuffer.Type.Normal); - newMesh.clearBuffer(VertexBuffer.Type.BindPoseNormal); - - // Position the camera to see both models - simpleApplication.getCamera().setLocation(new Vector3f(0f, 0f, 5f)); - } - - @Override - protected void cleanup(Application app) { - } - - @Override - protected void onEnable() { - } - - @Override - protected void onDisable() { - } - - @Override - public void update(float tpf) { - super.update(tpf); - } - }).run(); - } -} \ No newline at end of file diff --git a/jme3-screenshot-tests/src/test/java/org/jmonkeyengine/screenshottests/animation/TestMotionPath.java b/jme3-screenshot-tests/src/test/java/org/jmonkeyengine/screenshottests/animation/TestMotionPath.java deleted file mode 100644 index 28a5e042d2..0000000000 --- a/jme3-screenshot-tests/src/test/java/org/jmonkeyengine/screenshottests/animation/TestMotionPath.java +++ /dev/null @@ -1,188 +0,0 @@ -/* - * Copyright (c) 2024 jMonkeyEngine - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * * Neither the name of 'jMonkeyEngine' nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package org.jmonkeyengine.screenshottests.animation; - -import com.jme3.app.Application; -import com.jme3.app.SimpleApplication; -import com.jme3.app.state.BaseAppState; -import com.jme3.asset.AssetManager; -import com.jme3.cinematic.MotionPath; -import com.jme3.cinematic.MotionPathListener; -import com.jme3.cinematic.events.MotionEvent; -import com.jme3.font.BitmapText; -import com.jme3.input.ChaseCamera; -import com.jme3.light.DirectionalLight; -import com.jme3.material.Material; -import com.jme3.math.ColorRGBA; -import com.jme3.math.FastMath; -import com.jme3.math.Quaternion; -import com.jme3.math.Vector3f; -import com.jme3.scene.Geometry; -import com.jme3.scene.Node; -import com.jme3.scene.Spatial; -import com.jme3.scene.shape.Box; -import org.jmonkeyengine.screenshottests.testframework.ScreenshotTestBase; -import org.junit.jupiter.api.Test; - -/** - * Screenshot test for the MotionPath functionality. - * - *
This test creates a teapot model that follows a predefined path with several waypoints. - * The animation is automatically started and screenshots are taken at frames 10 and 60 - * to capture the teapot at different positions along the path. - * - * @author Richard Tingle (screenshot test adaptation) - */ -public class TestMotionPath extends ScreenshotTestBase { - - /** - * This test creates a scene with a teapot following a motion path. - */ - @Test - public void testMotionPath() { - screenshotTest(new BaseAppState() { - private Spatial teapot; - private MotionPath path; - private MotionEvent motionControl; - private BitmapText wayPointsText; - - @Override - protected void initialize(Application app) { - SimpleApplication simpleApplication = (SimpleApplication) app; - Node rootNode = simpleApplication.getRootNode(); - Node guiNode = simpleApplication.getGuiNode(); - AssetManager assetManager = simpleApplication.getAssetManager(); - - // Set camera position - app.getCamera().setLocation(new Vector3f(8.4399185f, 11.189463f, 14.267577f)); - - // Create the scene - createScene(rootNode, assetManager); - - // Create the motion path - path = new MotionPath(); - path.addWayPoint(new Vector3f(10, 3, 0)); - path.addWayPoint(new Vector3f(10, 3, 10)); - path.addWayPoint(new Vector3f(-40, 3, 10)); - path.addWayPoint(new Vector3f(-40, 3, 0)); - path.addWayPoint(new Vector3f(-40, 8, 0)); - path.addWayPoint(new Vector3f(10, 8, 0)); - path.addWayPoint(new Vector3f(10, 8, 10)); - path.addWayPoint(new Vector3f(15, 8, 10)); - path.enableDebugShape(assetManager, rootNode); - - // Create the motion event - motionControl = new MotionEvent(teapot, path); - motionControl.setDirectionType(MotionEvent.Direction.PathAndRotation); - motionControl.setRotation(new Quaternion().fromAngleNormalAxis(-FastMath.HALF_PI, Vector3f.UNIT_Y)); - motionControl.setInitialDuration(10f); - motionControl.setSpeed(2f); - - // Create text for waypoint notifications - wayPointsText = new BitmapText(assetManager.loadFont("Interface/Fonts/Default.fnt")); - wayPointsText.setSize(wayPointsText.getFont().getCharSet().getRenderedSize()); - guiNode.attachChild(wayPointsText); - - // Add listener for waypoint events - path.addListener(new MotionPathListener() { - @Override - public void onWayPointReach(MotionEvent control, int wayPointIndex) { - if (path.getNbWayPoints() == wayPointIndex + 1) { - wayPointsText.setText(control.getSpatial().getName() + " Finished!!! "); - } else { - wayPointsText.setText(control.getSpatial().getName() + " Reached way point " + wayPointIndex); - } - wayPointsText.setLocalTranslation( - (app.getCamera().getWidth() - wayPointsText.getLineWidth()) / 2, - app.getCamera().getHeight(), - 0); - } - }); - - // note that the ChaseCamera is self-initialising, so just creating this object attaches it - new ChaseCamera(getApplication().getCamera(), teapot); - - // Start the animation automatically - motionControl.play(); - } - - private void createScene(Node rootNode, AssetManager assetManager) { - // Create materials - Material mat = new Material(assetManager, "Common/MatDefs/Light/Lighting.j3md"); - mat.setFloat("Shininess", 1f); - mat.setBoolean("UseMaterialColors", true); - mat.setColor("Ambient", ColorRGBA.Black); - mat.setColor("Diffuse", ColorRGBA.DarkGray); - mat.setColor("Specular", ColorRGBA.White.mult(0.6f)); - - Material matSoil = new Material(assetManager, "Common/MatDefs/Light/Lighting.j3md"); - matSoil.setBoolean("UseMaterialColors", true); - matSoil.setColor("Ambient", ColorRGBA.Black); - matSoil.setColor("Diffuse", ColorRGBA.Black); - matSoil.setColor("Specular", ColorRGBA.Black); - - // Create teapot - teapot = assetManager.loadModel("Models/Teapot/Teapot.obj"); - teapot.setName("Teapot"); - teapot.setLocalScale(3); - teapot.setMaterial(mat); - rootNode.attachChild(teapot); - - // Create ground - Geometry soil = new Geometry("soil", new Box(50, 1, 50)); - soil.setLocalTranslation(0, -1, 0); - soil.setMaterial(matSoil); - rootNode.attachChild(soil); - - // Add light - DirectionalLight light = new DirectionalLight(); - light.setDirection(new Vector3f(0, -1, 0).normalizeLocal()); - light.setColor(ColorRGBA.White.mult(1.5f)); - rootNode.addLight(light); - } - - @Override - protected void cleanup(Application app) { - } - - @Override - protected void onEnable() { - } - - @Override - protected void onDisable() { - } - }) - .setFramesToTakeScreenshotsOn(10, 60) - .run(); - } -} \ No newline at end of file diff --git a/jme3-screenshot-tests/src/test/java/org/jmonkeyengine/screenshottests/effects/TestIssue1773.java b/jme3-screenshot-tests/src/test/java/org/jmonkeyengine/screenshottests/effects/TestIssue1773.java deleted file mode 100644 index 05eb097ee7..0000000000 --- a/jme3-screenshot-tests/src/test/java/org/jmonkeyengine/screenshottests/effects/TestIssue1773.java +++ /dev/null @@ -1,266 +0,0 @@ -/* - * Copyright (c) 2024 jMonkeyEngine - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * * Neither the name of 'jMonkeyEngine' nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package org.jmonkeyengine.screenshottests.effects; - -import com.jme3.animation.LoopMode; -import com.jme3.app.Application; -import com.jme3.app.SimpleApplication; -import com.jme3.app.state.BaseAppState; -import com.jme3.asset.AssetManager; -import com.jme3.cinematic.MotionPath; -import com.jme3.cinematic.events.MotionEvent; -import com.jme3.effect.ParticleEmitter; -import com.jme3.effect.ParticleMesh; -import com.jme3.effect.shapes.EmitterMeshVertexShape; -import com.jme3.light.AmbientLight; -import com.jme3.light.DirectionalLight; -import com.jme3.material.Material; -import com.jme3.material.Materials; -import com.jme3.math.ColorRGBA; -import com.jme3.math.FastMath; -import com.jme3.math.Vector2f; -import com.jme3.math.Vector3f; -import com.jme3.post.FilterPostProcessor; -import com.jme3.post.filters.BloomFilter; -import com.jme3.post.filters.FXAAFilter; -import com.jme3.renderer.Camera; -import com.jme3.renderer.ViewPort; -import com.jme3.renderer.queue.RenderQueue; -import com.jme3.scene.Geometry; -import com.jme3.scene.Node; -import com.jme3.scene.shape.CenterQuad; -import com.jme3.scene.shape.Torus; -import com.jme3.shadow.DirectionalLightShadowFilter; -import com.jme3.texture.Texture; -import org.jmonkeyengine.screenshottests.testframework.ScreenshotTestBase; -import org.junit.jupiter.api.TestInfo; -import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.ValueSource; - -import java.util.Arrays; - -/** - * @author Richard Tingle (aka richtea) - */ -public class TestIssue1773 extends ScreenshotTestBase{ - - /** - * Test case for Issue 1773 (Wrong particle position when using - * 'EmitterMeshVertexShape' or 'EmitterMeshFaceShape' and worldSpace - * flag equal to true) - * - * If the test succeeds, the particles will be generated from the vertices - * (for EmitterMeshVertexShape) or from the faces (for EmitterMeshFaceShape) - * of the torus mesh. If the test fails, the particles will appear in the - * center of the torus when worldSpace flag is set to true. - * - */ - @ParameterizedTest(name = "Test Issue 1773 (emit in worldSpace = {0})") - @ValueSource(booleans = {true, false}) - public void testIssue1773(boolean worldSpace, TestInfo testInfo){ - - String imageName = testInfo.getTestClass().get().getName() + "." + testInfo.getTestMethod().get().getName() + (worldSpace ? "_worldSpace" : "_localSpace"); - - screenshotTest(new BaseAppState(){ - private ParticleEmitter emit; - private Node myModel; - - AssetManager assetManager; - - Node rootNode; - - Camera cam; - - ViewPort viewPort; - - @Override - public void initialize(Application app) { - assetManager = app.getAssetManager(); - rootNode = ((SimpleApplication)app).getRootNode(); - cam = app.getCamera(); - viewPort = app.getViewPort(); - configCamera(); - setupLights(); - setupGround(); - setupCircle(); - createMotionControl(); - } - - @Override - protected void cleanup(Application app){} - - @Override - protected void onEnable(){} - - @Override - protected void onDisable(){} - - /** - * Crates particle emitter and adds it to root node. - */ - private void setupCircle() { - myModel = new Node("FieryCircle"); - - Geometry torus = createTorus(1f); - myModel.attachChild(torus); - - emit = createParticleEmitter(torus, true); - myModel.attachChild(emit); - - rootNode.attachChild(myModel); - } - - /** - * Creates torus geometry used for the emitter shape. - */ - private Geometry createTorus(float radius) { - float s = radius / 8f; - Geometry geo = new Geometry("CircleXZ", new Torus(64, 4, s, radius)); - Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md"); - mat.setColor("Color", ColorRGBA.Blue); - mat.getAdditionalRenderState().setWireframe(true); - geo.setMaterial(mat); - return geo; - } - - /** - * Creates a particle emitter that will emit the particles from - * the given shape's vertices. - */ - private ParticleEmitter createParticleEmitter(Geometry geo, boolean pointSprite) { - ParticleMesh.Type type = pointSprite ? ParticleMesh.Type.Point : ParticleMesh.Type.Triangle; - ParticleEmitter emitter = new ParticleEmitter("Emitter", type, 1000); - Material mat = new Material(assetManager, "Common/MatDefs/Misc/Particle.j3md"); - mat.setTexture("Texture", assetManager.loadTexture("Effects/Smoke/Smoke.png")); - mat.setBoolean("PointSprite", pointSprite); - emitter.setMaterial(mat); - emitter.setLowLife(1); - emitter.setHighLife(1); - emitter.setImagesX(15); - emitter.setStartSize(0.04f); - emitter.setEndSize(0.02f); - emitter.setStartColor(ColorRGBA.Orange); - emitter.setEndColor(ColorRGBA.Red); - emitter.setParticlesPerSec(900); - emitter.setGravity(0, 0f, 0); - //emitter.getParticleInfluencer().setVelocityVariation(1); - //emitter.getParticleInfluencer().setInitialVelocity(new Vector3f(0, .5f, 0)); - emitter.setShape(new EmitterMeshVertexShape(Arrays.asList(geo.getMesh()))); - emitter.setInWorldSpace(worldSpace); - //emitter.setShape(new EmitterMeshFaceShape(Arrays.asList(geo.getMesh()))); - return emitter; - } - - /** - * Creates a motion control that will move particle emitter in - * a circular path. - */ - private void createMotionControl() { - - float radius = 5f; - float height = 1.10f; - - MotionPath path = new MotionPath(); - path.setCycle(true); - - for (int i = 0; i < 8; i++) { - float x = FastMath.sin(FastMath.QUARTER_PI * i) * radius; - float z = FastMath.cos(FastMath.QUARTER_PI * i) * radius; - path.addWayPoint(new Vector3f(x, height, z)); - } - MotionEvent motionControl = new MotionEvent(myModel, path); - motionControl.setLoopMode(LoopMode.Loop); - motionControl.setDirectionType(MotionEvent.Direction.Path); - motionControl.play(); - } - - private void configCamera() { - cam.setLocation(new Vector3f(0, 6f, 9.2f)); - cam.lookAt(Vector3f.UNIT_Y, Vector3f.UNIT_Y); - - float aspect = (float) cam.getWidth() / cam.getHeight(); - cam.setFrustumPerspective(45, aspect, 0.1f, 1000f); - } - - /** - * Adds a ground to the scene - */ - private void setupGround() { - CenterQuad quad = new CenterQuad(12, 12); - quad.scaleTextureCoordinates(new Vector2f(2, 2)); - Geometry floor = new Geometry("Floor", quad); - Material mat = new Material(assetManager, Materials.LIGHTING); - Texture tex = assetManager.loadTexture("Interface/Logo/Monkey.jpg"); - tex.setWrap(Texture.WrapMode.Repeat); - mat.setTexture("DiffuseMap", tex); - floor.setMaterial(mat); - floor.rotate(-FastMath.HALF_PI, 0, 0); - rootNode.attachChild(floor); - } - - /** - * Adds lights and filters - */ - private void setupLights() { - viewPort.setBackgroundColor(ColorRGBA.DarkGray); - rootNode.setShadowMode(RenderQueue.ShadowMode.CastAndReceive); - - AmbientLight ambient = new AmbientLight(); - ambient.setColor(ColorRGBA.White); - //rootNode.addLight(ambient); - - DirectionalLight sun = new DirectionalLight(); - sun.setDirection((new Vector3f(-0.5f, -0.5f, -0.5f)).normalizeLocal()); - sun.setColor(ColorRGBA.White); - rootNode.addLight(sun); - - DirectionalLightShadowFilter dlsf = new DirectionalLightShadowFilter(assetManager, 4096, 3); - dlsf.setLight(sun); - dlsf.setShadowIntensity(0.4f); - dlsf.setShadowZExtend(256); - - FXAAFilter fxaa = new FXAAFilter(); - BloomFilter bloom = new BloomFilter(BloomFilter.GlowMode.Objects); - - FilterPostProcessor fpp = new FilterPostProcessor(assetManager); - fpp.addFilter(bloom); - fpp.addFilter(dlsf); - fpp.addFilter(fxaa); - viewPort.addProcessor(fpp); - } - - - }).setFramesToTakeScreenshotsOn(45) - .setBaseImageFileName(imageName) - .run(); - } -} diff --git a/jme3-screenshot-tests/src/test/java/org/jmonkeyengine/screenshottests/export/TestOgreConvert.java b/jme3-screenshot-tests/src/test/java/org/jmonkeyengine/screenshottests/export/TestOgreConvert.java deleted file mode 100644 index f076902f2d..0000000000 --- a/jme3-screenshot-tests/src/test/java/org/jmonkeyengine/screenshottests/export/TestOgreConvert.java +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright (c) 2024 jMonkeyEngine - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * * Neither the name of 'jMonkeyEngine' nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package org.jmonkeyengine.screenshottests.export; - -import com.jme3.anim.AnimComposer; -import com.jme3.app.Application; -import com.jme3.app.SimpleApplication; -import com.jme3.app.state.BaseAppState; -import com.jme3.asset.AssetManager; -import com.jme3.export.binary.BinaryExporter; -import com.jme3.export.binary.BinaryImporter; -import com.jme3.light.DirectionalLight; -import com.jme3.math.ColorRGBA; -import com.jme3.math.Vector3f; -import com.jme3.renderer.Camera; -import com.jme3.scene.Node; -import com.jme3.scene.Spatial; -import org.jmonkeyengine.screenshottests.testframework.ScreenshotTestBase; -import org.junit.jupiter.api.Test; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.IOException; - -/** - * @author Richard Tingle (aka richtea) - */ -public class TestOgreConvert extends ScreenshotTestBase{ - - /** - * This tests loads an Ogre model, converts it to binary, and then reloads it. - *
- * Note that the model is animated and the animation is played back. That is why - * two screenshots are taken - *
- */ - @Test - public void testOgreConvert(){ - - screenshotTest( - new BaseAppState(){ - @Override - protected void initialize(Application app){ - AssetManager assetManager = app.getAssetManager(); - Node rootNode = ((SimpleApplication)app).getRootNode(); - Camera cam = app.getCamera(); - Spatial ogreModel = assetManager.loadModel("Models/Oto/Oto.mesh.xml"); - - DirectionalLight dl = new DirectionalLight(); - dl.setColor(ColorRGBA.White); - dl.setDirection(new Vector3f(0,-1,-1).normalizeLocal()); - rootNode.addLight(dl); - - cam.setLocation(new Vector3f(0, 0, 15)); - - try { - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - BinaryExporter exp = new BinaryExporter(); - exp.save(ogreModel, baos); - - ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); - BinaryImporter imp = new BinaryImporter(); - imp.setAssetManager(assetManager); - Node ogreModelReloaded = (Node) imp.load(bais, null, null); - - AnimComposer composer = ogreModelReloaded.getControl(AnimComposer.class); - composer.setCurrentAction("Walk"); - - rootNode.attachChild(ogreModelReloaded); - } catch (IOException ex){ - throw new RuntimeException(ex); - } - } - - @Override - protected void cleanup(Application app){} - - @Override - protected void onEnable(){} - - @Override - protected void onDisable(){} - } - ) - .setFramesToTakeScreenshotsOn(1, 5) - .run(); - - } -} diff --git a/jme3-screenshot-tests/src/test/java/org/jmonkeyengine/screenshottests/gui/TestBitmapText3D.java b/jme3-screenshot-tests/src/test/java/org/jmonkeyengine/screenshottests/gui/TestBitmapText3D.java deleted file mode 100644 index b68e4589df..0000000000 --- a/jme3-screenshot-tests/src/test/java/org/jmonkeyengine/screenshottests/gui/TestBitmapText3D.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright (c) 2024 jMonkeyEngine - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * * Neither the name of 'jMonkeyEngine' nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package org.jmonkeyengine.screenshottests.gui; - -import com.jme3.app.Application; -import com.jme3.app.SimpleApplication; -import com.jme3.app.state.BaseAppState; -import com.jme3.asset.AssetManager; -import com.jme3.font.BitmapFont; -import com.jme3.font.BitmapText; -import com.jme3.font.Rectangle; -import com.jme3.renderer.queue.RenderQueue; -import com.jme3.scene.Geometry; -import com.jme3.scene.Node; -import com.jme3.scene.shape.Quad; -import org.jmonkeyengine.screenshottests.testframework.ScreenshotTestBase; -import org.junit.jupiter.api.Test; - -/** - * @author Richard Tingle (aka richtea) - */ -public class TestBitmapText3D extends ScreenshotTestBase{ - - /** - * This tests both that bitmap text is rendered correctly and that it is - * wrapped correctly. - */ - @Test - public void testBitmapText3D(){ - - screenshotTest( - new BaseAppState(){ - @Override - protected void initialize(Application app){ - String txtB = "ABCDEFGHIKLMNOPQRSTUVWXYZ1234567890`~!@#$%^&*()-=_+[]\\;',./{}|:<>?"; - - AssetManager assetManager = app.getAssetManager(); - Node rootNode = ((SimpleApplication)app).getRootNode(); - - Quad q = new Quad(6, 3); - Geometry g = new Geometry("quad", q); - g.setLocalTranslation(-1.5f, -3, -0.0001f); - g.setMaterial(assetManager.loadMaterial("Common/Materials/RedColor.j3m")); - rootNode.attachChild(g); - - BitmapFont fnt = assetManager.loadFont("Interface/Fonts/Default.fnt"); - BitmapText txt = new BitmapText(fnt); - txt.setBox(new Rectangle(0, 0, 6, 3)); - txt.setQueueBucket(RenderQueue.Bucket.Transparent); - txt.setSize( 0.5f ); - txt.setText(txtB); - txt.setLocalTranslation(-1.5f,0,0); - rootNode.attachChild(txt); - } - - @Override - protected void cleanup(Application app){} - - @Override - protected void onEnable(){} - - @Override - protected void onDisable(){} - } - ).run(); - - - } -} diff --git a/jme3-screenshot-tests/src/test/java/org/jmonkeyengine/screenshottests/light/pbr/TestPBRLighting.java b/jme3-screenshot-tests/src/test/java/org/jmonkeyengine/screenshottests/light/pbr/TestPBRLighting.java deleted file mode 100644 index 0cbd19da24..0000000000 --- a/jme3-screenshot-tests/src/test/java/org/jmonkeyengine/screenshottests/light/pbr/TestPBRLighting.java +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Copyright (c) 2024 jMonkeyEngine - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * * Neither the name of 'jMonkeyEngine' nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package org.jmonkeyengine.screenshottests.light.pbr; - -import com.jme3.app.Application; -import com.jme3.app.SimpleApplication; -import com.jme3.app.state.BaseAppState; -import com.jme3.asset.AssetManager; -import com.jme3.environment.EnvironmentCamera; -import com.jme3.environment.FastLightProbeFactory; -import com.jme3.light.DirectionalLight; -import com.jme3.light.LightProbe; -import com.jme3.material.Material; -import com.jme3.math.ColorRGBA; -import com.jme3.math.Vector3f; -import com.jme3.post.FilterPostProcessor; -import com.jme3.post.filters.ToneMapFilter; -import com.jme3.renderer.Camera; -import com.jme3.scene.Geometry; -import com.jme3.scene.Node; -import com.jme3.scene.Spatial; -import com.jme3.texture.plugins.ktx.KTXLoader; -import com.jme3.util.SkyFactory; -import com.jme3.util.mikktspace.MikktspaceTangentGenerator; -import org.jmonkeyengine.screenshottests.testframework.ScreenshotTestBase; -import org.junit.jupiter.api.TestInfo; -import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.Arguments; -import org.junit.jupiter.params.provider.MethodSource; - -import java.util.stream.Stream; - -/** - * Screenshot tests for PBR lighting. - * - * @author nehon - original test - * @author Richard Tingle (aka richtea) - screenshot test adaptation - * - */ -public class TestPBRLighting extends ScreenshotTestBase { - - private static StreamThis test creates a quad with a bump map material and a point light that orbits around it. - * The light's position is represented by a small red sphere. Screenshots are taken at frames 10 and 60 - * to capture the light at different positions in its orbit. - * - * @author Richard Tingle (screenshot test adaptation) - */ -public class TestSimpleBumps extends ScreenshotTestBase { - - /** - * This test creates a scene with a bump-mapped quad and an orbiting light. - */ - @Test - public void testSimpleBumps() { - screenshotTest(new BaseAppState() { - private float angle; - private PointLight pl; - private Spatial lightMdl; - - @Override - protected void initialize(Application app) { - SimpleApplication simpleApplication = (SimpleApplication) app; - Node rootNode = simpleApplication.getRootNode(); - AssetManager assetManager = simpleApplication.getAssetManager(); - - // Create quad with bump map material - Quad quadMesh = new Quad(1, 1); - Geometry sphere = new Geometry("Rock Ball", quadMesh); - Material mat = assetManager.loadMaterial("Textures/BumpMapTest/SimpleBump.j3m"); - sphere.setMaterial(mat); - MikktspaceTangentGenerator.generate(sphere); - rootNode.attachChild(sphere); - - // Create light representation - lightMdl = new Geometry("Light", new Sphere(10, 10, 0.1f)); - lightMdl.setMaterial(assetManager.loadMaterial("Common/Materials/RedColor.j3m")); - rootNode.attachChild(lightMdl); - - // Create point light - pl = new PointLight(); - pl.setColor(ColorRGBA.White); - pl.setPosition(new Vector3f(0f, 0f, 4f)); - rootNode.addLight(pl); - } - - @Override - protected void cleanup(Application app) { - } - - @Override - protected void onEnable() { - } - - @Override - protected void onDisable() { - } - - @Override - public void update(float tpf) { - super.update(tpf); - - angle += tpf * 2f; - angle %= FastMath.TWO_PI; - - pl.setPosition(new Vector3f(FastMath.cos(angle) * 4f, 0.5f, FastMath.sin(angle) * 4f)); - lightMdl.setLocalTranslation(pl.getPosition()); - } - }) - .setFramesToTakeScreenshotsOn(10, 60) - .run(); - } -} \ No newline at end of file diff --git a/jme3-screenshot-tests/src/test/java/org/jmonkeyengine/screenshottests/model/shape/TestBillboard.java b/jme3-screenshot-tests/src/test/java/org/jmonkeyengine/screenshottests/model/shape/TestBillboard.java deleted file mode 100644 index 096662503b..0000000000 --- a/jme3-screenshot-tests/src/test/java/org/jmonkeyengine/screenshottests/model/shape/TestBillboard.java +++ /dev/null @@ -1,151 +0,0 @@ -/* - * Copyright (c) 2025 jMonkeyEngine - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * * Neither the name of 'jMonkeyEngine' nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package org.jmonkeyengine.screenshottests.model.shape; - -import com.jme3.app.Application; -import com.jme3.app.SimpleApplication; -import com.jme3.app.state.BaseAppState; -import com.jme3.material.Material; -import com.jme3.math.ColorRGBA; -import com.jme3.math.Vector3f; -import com.jme3.scene.Geometry; -import com.jme3.scene.Mesh; -import com.jme3.scene.Node; -import com.jme3.scene.control.BillboardControl; -import com.jme3.scene.debug.Arrow; -import com.jme3.scene.debug.Grid; -import com.jme3.scene.shape.Quad; -import org.jmonkeyengine.screenshottests.testframework.ScreenshotTestBase; -import org.junit.jupiter.api.TestInfo; -import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.Arguments; -import org.junit.jupiter.params.provider.MethodSource; - -import java.util.stream.Stream; - -/** - * Screenshot test for the Billboard test. - * - *
This test creates three different billboard alignments (Screen, Camera, AxialY)
- * with different colored quads. Each billboard is positioned at a different x-coordinate
- * and has a blue Z-axis arrow attached to it. Screenshots are taken from three different angles:
- * front, above, and right.
- *
- * @author Richard Tingle (screenshot test adaptation)
- */
-@SuppressWarnings("OptionalGetWithoutIsPresent")
-public class TestBillboard extends ScreenshotTestBase {
-
- private static Stream This test creates a scene with a monkey head model that has a cartoon/cel-shaded effect
- * applied to it. The CartoonEdgeFilter is used to create yellow outlines around the edges
- * of the model, and a toon shader is applied to the model's material to create the cel-shaded look.
- *
- * @author Richard Tingle (screenshot test adaptation)
- */
-public class TestCartoonEdge extends ScreenshotTestBase {
-
- /**
- * This test creates a scene with a cartoon-shaded monkey head model.
- */
- @Test
- public void testCartoonEdge() {
- screenshotTest(new BaseAppState() {
- @Override
- protected void initialize(Application app) {
- SimpleApplication simpleApplication = (SimpleApplication) app;
- Node rootNode = simpleApplication.getRootNode();
-
- simpleApplication.getViewPort().setBackgroundColor(ColorRGBA.Gray);
-
- simpleApplication.getCamera().setLocation(new Vector3f(-1, 2, -5));
- simpleApplication.getCamera().lookAt(Vector3f.ZERO, Vector3f.UNIT_Y);
- simpleApplication.getCamera().setFrustumFar(300);
-
- rootNode.setCullHint(CullHint.Never);
-
- setupLighting(rootNode);
-
- setupModel(simpleApplication, rootNode);
-
- setupFilters(simpleApplication);
- }
-
- private void setupFilters(SimpleApplication app) {
- if (app.getRenderer().getCaps().contains(Caps.GLSL100)) {
- FilterPostProcessor fpp = new FilterPostProcessor(app.getAssetManager());
-
- CartoonEdgeFilter toon = new CartoonEdgeFilter();
- toon.setEdgeColor(ColorRGBA.Yellow);
- fpp.addFilter(toon);
- app.getViewPort().addProcessor(fpp);
- }
- }
-
- private void setupLighting(Node rootNode) {
- DirectionalLight dl = new DirectionalLight();
- dl.setDirection(new Vector3f(-1, -1, 1).normalizeLocal());
- dl.setColor(new ColorRGBA(2, 2, 2, 1));
- rootNode.addLight(dl);
- }
-
- private void setupModel(SimpleApplication app, Node rootNode) {
- Spatial model = app.getAssetManager().loadModel("Models/MonkeyHead/MonkeyHead.mesh.xml");
- makeToonish(app, model);
- model.rotate(0, FastMath.PI, 0);
- rootNode.attachChild(model);
- }
-
- private void makeToonish(SimpleApplication app, Spatial spatial) {
- if (spatial instanceof Node) {
- Node n = (Node) spatial;
- for (Spatial child : n.getChildren()) {
- makeToonish(app, child);
- }
- } else if (spatial instanceof Geometry) {
- Geometry g = (Geometry) spatial;
- Material m = g.getMaterial();
- if (m.getMaterialDef().getMaterialParam("UseMaterialColors") != null) {
- Texture t = app.getAssetManager().loadTexture("Textures/ColorRamp/toon.png");
- m.setTexture("ColorRamp", t);
- m.setBoolean("UseMaterialColors", true);
- m.setColor("Specular", ColorRGBA.Black);
- m.setColor("Diffuse", ColorRGBA.White);
- m.setBoolean("VertexLighting", true);
- }
- }
- }
-
- @Override
- protected void cleanup(Application app) {
- }
-
- @Override
- protected void onEnable() {
- }
-
- @Override
- protected void onDisable() {
- }
- })
- .setFramesToTakeScreenshotsOn(1)
- .run();
- }
-}
\ No newline at end of file
diff --git a/jme3-screenshot-tests/src/test/java/org/jmonkeyengine/screenshottests/post/TestFog.java b/jme3-screenshot-tests/src/test/java/org/jmonkeyengine/screenshottests/post/TestFog.java
deleted file mode 100644
index d92b9af020..0000000000
--- a/jme3-screenshot-tests/src/test/java/org/jmonkeyengine/screenshottests/post/TestFog.java
+++ /dev/null
@@ -1,271 +0,0 @@
-/*
- * Copyright (c) 2025 jMonkeyEngine
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * * Neither the name of 'jMonkeyEngine' nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package org.jmonkeyengine.screenshottests.post;
-
-import com.jme3.app.Application;
-import com.jme3.app.SimpleApplication;
-import com.jme3.app.state.BaseAppState;
-import com.jme3.asset.AssetManager;
-import com.jme3.light.DirectionalLight;
-import com.jme3.material.Material;
-import com.jme3.math.ColorRGBA;
-import com.jme3.math.Quaternion;
-import com.jme3.math.Vector3f;
-import com.jme3.post.FilterPostProcessor;
-import com.jme3.post.filters.FogFilter;
-import com.jme3.renderer.queue.RenderQueue;
-import com.jme3.scene.Node;
-import com.jme3.terrain.geomipmap.TerrainQuad;
-import com.jme3.terrain.heightmap.AbstractHeightMap;
-import com.jme3.terrain.heightmap.ImageBasedHeightMap;
-import com.jme3.texture.Texture;
-import com.jme3.util.SkyFactory;
-import org.jmonkeyengine.screenshottests.testframework.Scenario;
-import org.jmonkeyengine.screenshottests.testframework.ScreenshotTestBase;
-import org.junit.jupiter.api.Test;
-
-/**
- * Screenshot test for the Fog filter.
- *
- * This test creates a scene with a terrain and sky, with a fog effect applied.
- * The fog is a light gray color and has a specific density and distance setting.
- *
- * @author Richard Tingle (screenshot test adaptation)
- */
-public class TestFog extends ScreenshotTestBase {
-
- /**
- * This test creates a scene with a fog effect.
- */
- @Test
- public void testFog() {
- screenshotMultiScenarioTest(new Scenario("FullscreenQuad",new BaseAppState() {
- @Override
- protected void initialize(Application app) {
- SimpleApplication simpleApplication = (SimpleApplication) app;
- Node rootNode = simpleApplication.getRootNode();
-
- simpleApplication.getCamera().setLocation(new Vector3f(-34.74095f, 95.21318f, -287.4945f));
- simpleApplication.getCamera().setRotation(new Quaternion(0.023536969f, 0.9361278f, -0.016098259f, -0.35050195f));
-
- Node mainScene = new Node();
-
- mainScene.attachChild(SkyFactory.createSky(simpleApplication.getAssetManager(),
- "Textures/Sky/Bright/BrightSky.dds",
- SkyFactory.EnvMapType.CubeMap));
-
- createTerrain(mainScene, app.getAssetManager());
-
- DirectionalLight sun = new DirectionalLight();
- Vector3f lightDir = new Vector3f(-0.37352666f, -0.50444174f, -0.7784704f);
- sun.setDirection(lightDir);
- sun.setColor(ColorRGBA.White.clone().multLocal(2));
- mainScene.addLight(sun);
-
- rootNode.attachChild(mainScene);
-
- FilterPostProcessor fpp = new FilterPostProcessor(simpleApplication.getAssetManager());
-
- FogFilter fog = new FogFilter();
- fog.setFogColor(new ColorRGBA(0.9f, 0.9f, 0.9f, 1.0f));
- fog.setFogDistance(155);
- fog.setFogDensity(1.0f);
- fpp.addFilter(fog);
- simpleApplication.getViewPort().addProcessor(fpp);
- }
-
-
- private void createTerrain(Node rootNode, AssetManager assetManager) {
- Material matRock = new Material(assetManager, "Common/MatDefs/Terrain/TerrainLighting.j3md");
- matRock.setBoolean("useTriPlanarMapping", false);
- matRock.setBoolean("WardIso", true);
- matRock.setTexture("AlphaMap", assetManager.loadTexture("Textures/Terrain/splat/alphamap.png"));
- Texture heightMapImage = assetManager.loadTexture("Textures/Terrain/splat/mountains512.png");
- Texture grass = assetManager.loadTexture("Textures/Terrain/splat/grass.jpg");
- grass.setWrap(Texture.WrapMode.Repeat);
- matRock.setTexture("DiffuseMap", grass);
- matRock.setFloat("DiffuseMap_0_scale", 64);
- Texture dirt = assetManager.loadTexture("Textures/Terrain/splat/dirt.jpg");
- dirt.setWrap(Texture.WrapMode.Repeat);
- matRock.setTexture("DiffuseMap_1", dirt);
- matRock.setFloat("DiffuseMap_1_scale", 16);
- Texture rock = assetManager.loadTexture("Textures/Terrain/splat/road.jpg");
- rock.setWrap(Texture.WrapMode.Repeat);
- matRock.setTexture("DiffuseMap_2", rock);
- matRock.setFloat("DiffuseMap_2_scale", 128);
- Texture normalMap0 = assetManager.loadTexture("Textures/Terrain/splat/grass_normal.jpg");
- normalMap0.setWrap(Texture.WrapMode.Repeat);
- Texture normalMap1 = assetManager.loadTexture("Textures/Terrain/splat/dirt_normal.png");
- normalMap1.setWrap(Texture.WrapMode.Repeat);
- Texture normalMap2 = assetManager.loadTexture("Textures/Terrain/splat/road_normal.png");
- normalMap2.setWrap(Texture.WrapMode.Repeat);
- matRock.setTexture("NormalMap", normalMap0);
- matRock.setTexture("NormalMap_1", normalMap1);
- matRock.setTexture("NormalMap_2", normalMap2);
-
- AbstractHeightMap heightmap = new ImageBasedHeightMap(heightMapImage.getImage(), 0.25f);
- heightmap.load();
-
- TerrainQuad terrain = new TerrainQuad("terrain", 65, 513, heightmap.getHeightMap());
-
- terrain.setMaterial(matRock);
- terrain.setLocalScale(new Vector3f(5, 5, 5));
- terrain.setLocalTranslation(new Vector3f(0, -30, 0));
- terrain.setLocked(false); // unlock it so we can edit the height
-
- terrain.setShadowMode(RenderQueue.ShadowMode.Receive);
- rootNode.attachChild(terrain);
-
- }
-
-
- @Override
- protected void cleanup(Application app) {
- }
-
- @Override
- protected void onEnable() {
- }
-
- @Override
- protected void onDisable() {
- }
-
- @Override
- public void update(float tpf) {
- super.update(tpf);
- System.out.println(getApplication().getCamera().getLocation());
- }
-
- }),new Scenario("FullscreenTriangle",new BaseAppState() {
- @Override
- protected void initialize(Application app) {
- SimpleApplication simpleApplication = (SimpleApplication) app;
- Node rootNode = simpleApplication.getRootNode();
-
- simpleApplication.getCamera().setLocation(new Vector3f(-34.74095f, 95.21318f, -287.4945f));
- simpleApplication.getCamera().setRotation(new Quaternion(0.023536969f, 0.9361278f, -0.016098259f, -0.35050195f));
-
- Node mainScene = new Node();
-
- mainScene.attachChild(SkyFactory.createSky(simpleApplication.getAssetManager(),
- "Textures/Sky/Bright/BrightSky.dds",
- SkyFactory.EnvMapType.CubeMap));
-
- createTerrain(mainScene, app.getAssetManager());
-
- DirectionalLight sun = new DirectionalLight();
- Vector3f lightDir = new Vector3f(-0.37352666f, -0.50444174f, -0.7784704f);
- sun.setDirection(lightDir);
- sun.setColor(ColorRGBA.White.clone().multLocal(2));
- mainScene.addLight(sun);
-
- rootNode.attachChild(mainScene);
-
- FilterPostProcessor fpp = new FilterPostProcessor(simpleApplication.getAssetManager(),true);
-
- FogFilter fog = new FogFilter();
- fog.setFogColor(new ColorRGBA(0.9f, 0.9f, 0.9f, 1.0f));
- fog.setFogDistance(155);
- fog.setFogDensity(1.0f);
- fpp.addFilter(fog);
- simpleApplication.getViewPort().addProcessor(fpp);
- }
-
-
- private void createTerrain(Node rootNode, AssetManager assetManager) {
- Material matRock = new Material(assetManager, "Common/MatDefs/Terrain/TerrainLighting.j3md");
- matRock.setBoolean("useTriPlanarMapping", false);
- matRock.setBoolean("WardIso", true);
- matRock.setTexture("AlphaMap", assetManager.loadTexture("Textures/Terrain/splat/alphamap.png"));
- Texture heightMapImage = assetManager.loadTexture("Textures/Terrain/splat/mountains512.png");
- Texture grass = assetManager.loadTexture("Textures/Terrain/splat/grass.jpg");
- grass.setWrap(Texture.WrapMode.Repeat);
- matRock.setTexture("DiffuseMap", grass);
- matRock.setFloat("DiffuseMap_0_scale", 64);
- Texture dirt = assetManager.loadTexture("Textures/Terrain/splat/dirt.jpg");
- dirt.setWrap(Texture.WrapMode.Repeat);
- matRock.setTexture("DiffuseMap_1", dirt);
- matRock.setFloat("DiffuseMap_1_scale", 16);
- Texture rock = assetManager.loadTexture("Textures/Terrain/splat/road.jpg");
- rock.setWrap(Texture.WrapMode.Repeat);
- matRock.setTexture("DiffuseMap_2", rock);
- matRock.setFloat("DiffuseMap_2_scale", 128);
- Texture normalMap0 = assetManager.loadTexture("Textures/Terrain/splat/grass_normal.jpg");
- normalMap0.setWrap(Texture.WrapMode.Repeat);
- Texture normalMap1 = assetManager.loadTexture("Textures/Terrain/splat/dirt_normal.png");
- normalMap1.setWrap(Texture.WrapMode.Repeat);
- Texture normalMap2 = assetManager.loadTexture("Textures/Terrain/splat/road_normal.png");
- normalMap2.setWrap(Texture.WrapMode.Repeat);
- matRock.setTexture("NormalMap", normalMap0);
- matRock.setTexture("NormalMap_1", normalMap1);
- matRock.setTexture("NormalMap_2", normalMap2);
-
- AbstractHeightMap heightmap = new ImageBasedHeightMap(heightMapImage.getImage(), 0.25f);
- heightmap.load();
-
- TerrainQuad terrain = new TerrainQuad("terrain", 65, 513, heightmap.getHeightMap());
-
- terrain.setMaterial(matRock);
- terrain.setLocalScale(new Vector3f(5, 5, 5));
- terrain.setLocalTranslation(new Vector3f(0, -30, 0));
- terrain.setLocked(false); // unlock it so we can edit the height
-
- terrain.setShadowMode(RenderQueue.ShadowMode.Receive);
- rootNode.attachChild(terrain);
-
- }
-
-
- @Override
- protected void cleanup(Application app) {
- }
-
- @Override
- protected void onEnable() {
- }
-
- @Override
- protected void onDisable() {
- }
-
- @Override
- public void update(float tpf) {
- super.update(tpf);
- System.out.println(getApplication().getCamera().getLocation());
- }
-
- }))
- .setFramesToTakeScreenshotsOn(1)
- .run();
- }
-}
\ No newline at end of file
diff --git a/jme3-screenshot-tests/src/test/java/org/jmonkeyengine/screenshottests/post/TestLightScattering.java b/jme3-screenshot-tests/src/test/java/org/jmonkeyengine/screenshottests/post/TestLightScattering.java
deleted file mode 100644
index 5353226f90..0000000000
--- a/jme3-screenshot-tests/src/test/java/org/jmonkeyengine/screenshottests/post/TestLightScattering.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Copyright (c) 2025 jMonkeyEngine
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * * Neither the name of 'jMonkeyEngine' nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package org.jmonkeyengine.screenshottests.post;
-
-import com.jme3.app.Application;
-import com.jme3.app.SimpleApplication;
-import com.jme3.app.state.BaseAppState;
-import com.jme3.light.DirectionalLight;
-import com.jme3.material.Material;
-import com.jme3.math.ColorRGBA;
-import com.jme3.math.Quaternion;
-import com.jme3.math.Vector3f;
-import com.jme3.post.FilterPostProcessor;
-import com.jme3.post.filters.LightScatteringFilter;
-import com.jme3.renderer.queue.RenderQueue.ShadowMode;
-import com.jme3.scene.Geometry;
-import com.jme3.scene.Node;
-import com.jme3.scene.Spatial;
-import com.jme3.util.SkyFactory;
-import com.jme3.util.mikktspace.MikktspaceTangentGenerator;
-import org.jmonkeyengine.screenshottests.testframework.ScreenshotTestBase;
-import org.junit.jupiter.api.Test;
-
-/**
- * Screenshot test for the LightScattering filter.
- *
- * This test creates a scene with a terrain model and a sky, with a light scattering
- * (god rays) effect applied. The effect simulates light rays scattering through the atmosphere
- * from a bright light source (like the sun).
- *
- * @author Richard Tingle (screenshot test adaptation)
- */
-public class TestLightScattering extends ScreenshotTestBase {
-
- /**
- * This test creates a scene with a light scattering effect.
- */
- @Test
- public void testLightScattering() {
- screenshotTest(new BaseAppState() {
- @Override
- protected void initialize(Application app) {
- SimpleApplication simpleApplication = (SimpleApplication) app;
- Node rootNode = simpleApplication.getRootNode();
-
- simpleApplication.getCamera().setLocation(new Vector3f(55.35316f, -0.27061665f, 27.092093f));
- simpleApplication.getCamera().setRotation(new Quaternion(0.010414706f, 0.9874893f, 0.13880467f, -0.07409228f));
-
- Material mat = simpleApplication.getAssetManager().loadMaterial("Textures/Terrain/Rocky/Rocky.j3m");
- Spatial scene = simpleApplication.getAssetManager().loadModel("Models/Terrain/Terrain.mesh.xml");
- MikktspaceTangentGenerator.generate(((Geometry) ((Node) scene).getChild(0)).getMesh());
- scene.setMaterial(mat);
- scene.setShadowMode(ShadowMode.CastAndReceive);
- scene.setLocalScale(400);
- scene.setLocalTranslation(0, -10, -120);
- rootNode.attachChild(scene);
-
- rootNode.attachChild(SkyFactory.createSky(simpleApplication.getAssetManager(),
- "Textures/Sky/Bright/FullskiesBlueClear03.dds",
- SkyFactory.EnvMapType.CubeMap));
-
- DirectionalLight sun = new DirectionalLight();
- Vector3f lightDir = new Vector3f(-0.12f, -0.3729129f, 0.74847335f);
- sun.setDirection(lightDir);
- sun.setColor(ColorRGBA.White.clone().multLocal(2));
- scene.addLight(sun);
-
- FilterPostProcessor fpp = new FilterPostProcessor(simpleApplication.getAssetManager());
-
- Vector3f lightPos = lightDir.normalize().negate().multLocal(3000);
- LightScatteringFilter filter = new LightScatteringFilter(lightPos);
-
- filter.setLightDensity(1.0f);
- filter.setBlurStart(0.02f);
- filter.setBlurWidth(0.9f);
- filter.setLightPosition(lightPos);
-
- fpp.addFilter(filter);
- simpleApplication.getViewPort().addProcessor(fpp);
- }
-
- @Override
- protected void cleanup(Application app) {
- }
-
- @Override
- protected void onEnable() {
- }
-
- @Override
- protected void onDisable() {
- }
- })
- .setFramesToTakeScreenshotsOn(1)
- .run();
- }
-}
\ No newline at end of file
diff --git a/jme3-screenshot-tests/src/test/java/org/jmonkeyengine/screenshottests/scene/instancing/TestInstanceNodeWithPbr.java b/jme3-screenshot-tests/src/test/java/org/jmonkeyengine/screenshottests/scene/instancing/TestInstanceNodeWithPbr.java
deleted file mode 100644
index 9069fb4464..0000000000
--- a/jme3-screenshot-tests/src/test/java/org/jmonkeyengine/screenshottests/scene/instancing/TestInstanceNodeWithPbr.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * Copyright (c) 2024 jMonkeyEngine
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * * Neither the name of 'jMonkeyEngine' nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package org.jmonkeyengine.screenshottests.scene.instancing;
-
-import com.jme3.app.Application;
-import com.jme3.app.SimpleApplication;
-import com.jme3.app.state.BaseAppState;
-import com.jme3.font.BitmapText;
-import com.jme3.light.DirectionalLight;
-import com.jme3.material.Material;
-import com.jme3.math.ColorRGBA;
-import com.jme3.math.Vector3f;
-import com.jme3.scene.Geometry;
-import com.jme3.scene.instancing.InstancedNode;
-import com.jme3.scene.shape.Box;
-import org.jmonkeyengine.screenshottests.testframework.ScreenshotTestBase;
-import org.junit.jupiter.api.Test;
-
-import java.util.Locale;
-
-/**
- * This test specifically validates the corrected PBR rendering when combined
- * with instancing, as addressed in issue #2435.
- *
- *
- * It creates an InstancedNode with a PBR-materialized Box to ensure the fix in
- * PBRLighting.vert correctly handles world position calculations for instanced geometry.
- *
- *
- *
- * The shaders are still subject to the GLSL max limit of 16 textures, however
- * each TextureArray counts as a single texture, and each TextureArray can store
- * multiple images. For more information on texture arrays see:
- * https://www.khronos.org/opengl/wiki/Array_Texture
- *
- * Uses assets from CC0Textures.com, licensed under CC0 1.0 Universal. For more
- * information on the textures this test case uses, view the license.txt file
- * located in the jme3-testdata directory where these textures are located:
- * jme3-testdata/src/main/resources/Textures/Terrain/PBR
- *
- * @author yaRnMcDonuts - original test
- * @author Richard Tingle (aka richtea) - screenshot test adaptation
- */
-@SuppressWarnings("FieldCanBeLocal")
-public class TestPBRTerrainAdvanced extends ScreenshotTestBase {
-
- private static Stream