Engine v3.4.0 beta testing

yes the same issue, just tested it now…

I don’t have currently other hw devices supporting jme, other than my Android device & the RPI, do you have a simple example of using multiColor2.j3md ? , but i do have windows on the same laptop, would that matter ? the drivers support…

1 Like

I have tested this now on my Android device, Android 10 API 29, OGLES 3.2, i can see the particles rendered, but i can see no difference between settling point sprite to true & to false…what does mixing coordinates do anyway ? i hate magic :-)).

I don’t know why jme GLRenderer detects it as OpenGL 2 (this shouldn’t be the case) , may be the equivalent :

2021-04-22 20:01:50.814 20637-25254/com.scrappers.dbcodecamp I/GLRenderer: OpenGL Renderer Information
     * Vendor: {0}
     * Renderer: {1}
     * OpenGL Version: {2}
     * GLSL Version: {3}
     * Profile: {4}

mix() interpolates. It’s not magic. It’s figuring out which ‘texel’ to paint on that fragment.

1 Like

Here’s one: https://github.com/stephengold/Heart/blob/master/HeartExamples/src/main/java/jme3utilities/debug/test/TestSkeletonVisualizer.java

1 Like

Fortunately, i have a windows image on the same device (dual boot), so it works on windows :smile: for both jme3.3.2-stable & jme3.4.0-beta1,

Device Specs showing :

INFO: OpenGL Renderer Information
 * Vendor: Intel
 * Renderer: Intel(R) HD Graphics 620
 * OpenGL Version: 4.6.0 - Build 26.20.100.7262
 * GLSL Version: 4.60 - Build 26.20.100.7262
 * Profile: Compatibility

It’s my issue now or Parrot’s, not the engine one, i will search for updates for gpu drivers in parrot.

EDIT : After reading the specs given from Linux Runtime VS Windows Runtime, I have spotted the Profile: Core in Linux, Profile: Compatibility in windows, may be that what causes the crash, that windows drivers are more capable of running in a compatibility mode for that kinda of hardware !
& my actual driver that is stated by the distributor & manufacturer is Intel HD 620 not mesa 19.3.3, that’s why I thought that the problem comes from the Linux drivers !

2 Likes

@Pavl_G I’ve faced multiple random GL rendering issues with the intel UHD 620 of my laptop in linux. I’ve solved not all but most of them using the configuration I stated here and also setting MESA_LOADER_DRIVER_OVERRIDE=i965 in /etc/environment

I don’t know if this will help you with the gl_PointCoord issue but it may worth a try (I’ve not tested it myself)

1 Like

Thanks @joliver82 , I would check that.

1 Like

JMonkeyEngine v3.4.0-beta2 was released today. It’s basically beta1 with PR 1527 integrated.

If those pesky NPEs were discouraging anyone from testing v3.4 (or solving other bugs), now would be a great time to jump in and do your part for JMonkeyEngine!

6 Likes

Test Issue Physics Terrain

hi everyone,
I was updating some projects to the new version of jmonkey 3.4.0. I have noticed that using the jme3-jbullet libraries, the debug physical form of the terrain is not displayed when physical debugging is enabled. Am I doing something wrong or is there some problem?

below a test case:

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.test;

import com.jme3.app.SimpleApplication;
import com.jme3.bullet.BulletAppState;
import com.jme3.bullet.collision.shapes.BoxCollisionShape;
import com.jme3.bullet.collision.shapes.CollisionShape;
import com.jme3.bullet.collision.shapes.HeightfieldCollisionShape;
import com.jme3.bullet.control.RigidBodyControl;
import com.jme3.bullet.util.CollisionShapeFactory;
import com.jme3.light.AmbientLight;
import com.jme3.light.DirectionalLight;
import com.jme3.material.Material;
import com.jme3.math.ColorRGBA;
import com.jme3.math.FastMath;
import com.jme3.math.Vector3f;
import com.jme3.scene.Geometry;
import com.jme3.scene.shape.Box;
import com.jme3.terrain.geomipmap.TerrainLodControl;
import com.jme3.terrain.geomipmap.TerrainQuad;
import com.jme3.terrain.geomipmap.lodcalc.DistanceLodCalculator;
import com.jme3.terrain.heightmap.AbstractHeightMap;
import com.jme3.terrain.heightmap.ImageBasedHeightMap;
import com.jme3.texture.Texture;

/**
 *
 * @author capdevon
 */
public class Test_IssuePhysicsTerrain extends SimpleApplication {
    
    private BulletAppState physics;
    private float grassScale = 64;
    private float dirtScale = 16;
    private float rockScale = 128;

    /**
     * 
     * @param args 
     */
    public static void main(String[] args) {
        Test_IssuePhysicsTerrain app = new Test_IssuePhysicsTerrain();
        app.start();
    }

    @Override
    public void simpleInitApp() {
        flyCam.setMoveSpeed(25f);
        viewPort.setBackgroundColor(new ColorRGBA(0.7f, 0.8f, 1f, 1f));
        
        initPhysics();
        initLights();
        initTerrain();

        cam.setLocation(new Vector3f(0, 10, -10));
        cam.lookAtDirection(new Vector3f(0, -1.5f, -1).normalizeLocal(), Vector3f.UNIT_Y);
     
        for (int i = 0; i < 25; i++) {
            float halfExtent = 1f;
            Box mesh = new Box(halfExtent, halfExtent, halfExtent);
            Geometry body = new Geometry("Cube.GeoMesh." + i, mesh);
            Material mat = new Material(getAssetManager(), "Common/MatDefs/Misc/Unshaded.j3md");
            mat.setColor("Color", ColorRGBA.Red);
            body.setMaterial(mat);
            body.setLocalTranslation(getRandomSpawnPoint(10, 0));
            rootNode.attachChild(body);
            
            BoxCollisionShape collShape = new BoxCollisionShape(new Vector3f(halfExtent, halfExtent, halfExtent));
            RigidBodyControl rb = new RigidBodyControl(collShape, 5f);
            body.addControl(rb);
            physics.getPhysicsSpace().add(rb);
        }
    }
    
    private Vector3f getRandomSpawnPoint(int radius, int height) {
        float x = FastMath.nextRandomInt(-radius, radius);
        float z = FastMath.nextRandomInt(-radius, radius);
        return new Vector3f(x, height, z);
    }
        
    /**
     * Initialize the physics simulation
     */
    private void initPhysics() {
        physics = new BulletAppState();
        physics.setDebugEnabled(true);
        stateManager.attach(physics);
    }

    private void initLights() {
        DirectionalLight light = new DirectionalLight();
        light.setDirection((new Vector3f(-0.5f, -1f, -0.5f)).normalize());
        rootNode.addLight(light);

        AmbientLight ambient = new AmbientLight();
        ambient.setColor(ColorRGBA.White.mult(1.3f));
        rootNode.addLight(ambient);
    }
    
    private void initTerrain() {
        // First, we load up our textures and the heightmap texture for the terrain

        // TERRAIN TEXTURE material
        Material matRock = new Material(assetManager, "Common/MatDefs/Terrain/Terrain.j3md");
        matRock.setBoolean("useTriPlanarMapping", false);

        // ALPHA map (for splat textures)
        matRock.setTexture("Alpha", assetManager.loadTexture("Textures/Terrain/splat/alphamap.png"));

        // HEIGHTMAP image (for the terrain heightmap)
        Texture heightMapImage = assetManager.loadTexture("Textures/Terrain/splat/mountains512.png");

        // GRASS texture
        Texture grass = assetManager.loadTexture("Textures/Terrain/splat/grass.jpg");
        grass.setWrap(Texture.WrapMode.Repeat);
        matRock.setTexture("Tex1", grass);
        matRock.setFloat("Tex1Scale", grassScale);

        // DIRT texture
        Texture dirt = assetManager.loadTexture("Textures/Terrain/splat/dirt.jpg");
        dirt.setWrap(Texture.WrapMode.Repeat);
        matRock.setTexture("Tex2", dirt);
        matRock.setFloat("Tex2Scale", dirtScale);

        // ROCK texture
        Texture rock = assetManager.loadTexture("Textures/Terrain/splat/road.jpg");
        rock.setWrap(Texture.WrapMode.Repeat);
        matRock.setTexture("Tex3", rock);
        matRock.setFloat("Tex3Scale", rockScale);

        // WIREFRAME material
        Material matWire = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
        matWire.getAdditionalRenderState().setWireframe(true);
        matWire.setColor("Color", ColorRGBA.Green);

        // CREATE HEIGHTMAP
        AbstractHeightMap heightmap = null;
        try {
            //heightmap = new HillHeightMap(1025, 1000, 50, 100, (byte) 3);

            heightmap = new ImageBasedHeightMap(heightMapImage.getImage(), 1f);
            heightmap.load();

        } catch (Exception e) {
            e.printStackTrace();
        }

        /*
         * Here we create the actual terrain. The tiles will be 65x65, and the total size of the
         * terrain will be 513x513. It uses the heightmap we created to generate the height values.
         */
        /**
         * Optimal terrain patch size is 65 (64x64).
         * The total size is up to you. At 1025 it ran fine for me (200+FPS), however at
         * size=2049, it got really slow. But that is a jump from 2 million to 8 million triangles...
         */
        TerrainQuad terrain = new TerrainQuad("terrain", 65, 513, heightmap.getHeightMap());
        TerrainLodControl control = new TerrainLodControl(terrain, getCamera());
        control.setLodCalculator( new DistanceLodCalculator(65, 2.7f) ); // patch size, and a multiplier
        terrain.addControl(control);
        terrain.setMaterial(matRock);
        terrain.setLocalTranslation(0, -100, 0);
        terrain.setLocalScale(2f, 0.5f, 2f);
        rootNode.attachChild(terrain);
        
        /**
         * We set up collision detection for the scene by creating a compound
         * collision shape and a static RigidBodyControl with mass zero.
         */
        CollisionShape collShape = CollisionShapeFactory.createMeshShape(terrain);
        //CollisionShape collShape = new HeightfieldCollisionShape(terrain.getHeightMap(), terrain.getLocalScale());

        /**
         * A mesh-accurate shape optimized for static terrains. This shape is
         * much faster than other mesh-accurate shapes.
         */
//        CollisionShape collShape = new HeightfieldCollisionShape(heightMap.getHeightMap(), terrain.getLocalScale());
        RigidBodyControl rgb = new RigidBodyControl(collShape, 0);
        terrain.addControl(rgb);

        // We attach the scene and the player to the rootnode and the physics space,
        // to make them appear in the game world.
        physics.getPhysicsSpace().add(terrain);
    }

}

the libraries used in the classpath:

gson.jar
j-ogg-all.jar
jbullet.jar
jinput-natives-all.jar
jinput.jar
jme3-core.jar
jme3-desktop.jar
jme3-effects.jar
jme3-jbullet.jar
jme3-jogg.jar
jme3-lwjgl.jar
jme3-niftygui.jar
jme3-plugins.jar
jme3-terrain.jar
jme3-testdata.jar
jmf.jar
jsr305.jar
lwjgl-platform-natives-windows.jar
lwjgl.jar
nifty-default-controls.jar
nifty-examples.jar
nifty-style-black.jar
nifty.jar
stack-alloc.jar
vecmath.jar
xpp3.jar
2 Likes

Thanks for participating in beta testing!
I think you’ve re-discovered issue 1129

JMonkeyEngine v3.4.0-beta3 was released today!

It should fix the following bugs:

  • LWJGL context restart issues (PR #1526, issues #844 and #1445)
  • AnimEvent.onStop() kills prior event on the same layer (PR #1537)
  • failed assertion in TestAnimMigration (issue #1533, PR #1534)
  • crashes in TransformTrack.getTranslations() and getRotations() (PR #1532)
  • jme3-jbullet depends on unavailable Maven artifacts (PR #1541)

I haven’t made much progress in my beta testing. I plan to crank through jme3-examples a few times this weekend.

7 Likes

JMonkeyEngine v3.4.0-beta4 was released today!

It should fix the following bugs:

  • MorphControl doesn’t override JmeCloneable/Savable methods (issue #1548, PR #1549)
  • diagnostic messages from TestMusicPlayer (issue #1544, PR #1547)
  • crash in TestManyLocators (issue #1543, PR #1546)
  • crash in TestAppStates (issue #1542, PR #1545)
9 Likes

I’ve just broken ground on a Kotlin-based project initially using 3.3.2. I’ve updated to 3.4.0-beta4 and no issues so far.

I’m not using the SDK, I’m using IDEA community + gradle (Kotlin scripting), so any issues I do encounter will likely be on my end, but I’ll update here.

4 Likes

Thanks, @tsalaroth … and welcome to JMonkeyEngine!

I’ve completed the testing I promised on 13 April. I’ll turn my attention to the Wiki now.

4 Likes

thanks, myself i didnt seen issues so far, tho didnt had time to check all things.

1 Like

Hmm, our game roughly doubled the FPS when upgraded from 3.3.2 → 3.4 beta 4. Running without VSYNC. And the FPS is taken from the StatsAppState. Even looking at the detailed stats, I’m really unsure what could have caused this and is this real life or just fantasy. I’m using LWJGL 3.

I don’t entirely understand the math behind the detailed view. It is not just adding up CPU + GPU time.

With jME 3.3.2:

With jME 3.4 beta 4:

Edit: Investigating this a bit more. With LWJGL 3 I have gotten lower FPS for a long time (many jME revisions) compared to LWJGL 2. And this jME 3.4 just seems to boost the FPS to levels I’ve experienced with LWJGL 2. So this might be true life and I know that some frame render stuff was changed on jME 3.4 LWJGL 3 side… Good job and thanks if this is the case then!

6 Likes

Thanks for the report.

I didn’t expect JME v3.4 to be any more efficient than v3.3. My guess would be the FPS increase is a side-effect of fixing issue 1455. It’s strange, though, since I thought the fix would only have an impact when VSync was enabled, and you’re saying it was disabled in both tests.

Were you aware that VSync is enabled by default in v3.4?

2 Likes

I wonder if it could be related to the GLFW_REFRESH_RATE changes:

It doesn’t really explain why in those stats SSAO was a lot faster, etc…

Either way, it sounds to me like 3.3 had an lwjgl3 bug that is now fixed in 3.4.

2 Likes

Yes, setFrameRate on lwjgl3 leads to too slow frame rate · Issue #1455 · jMonkeyEngine/jmonkeyengine · GitHub. It is this one. I have VSYNC off and the frame rate limited to 200.

1 Like