[SOLVED] Can't make shape keys to work

Hi there.

I’m having problem with importing assets from blender. I’ve managed to make jME SDK to detect shape keys animations but it refuses to play them in SceneComposer.

SDK v.3.3.0-stable
Blender 2.92.0
exporting to glTF2 (setteings: https://i.imgur.com/WvLeynU.png )
after importing model in SDK: https://i.imgur.com/aPFEwoC.png (“Mruganie” is one that doesn’t work)
same but in blender: https://i.imgur.com/jQyc0Kh.png and NLA tracks https://i.imgur.com/xCY7Bs2.png

I’m so tired already. I try to make it work for a week now and the only animations that ever work are the bone-related ones, nothing else.

Hi,

Does it work in these online Gltf viewers?

https://gltf-viewer.donmccurdy.com/

https://sandbox.babylonjs.com/

Yes, it works.
GLB file: https://easyupload.io/wk9dva
BLEND file: https://easyupload.io/9vivwk

Ok, I will take a look at it soon.

It works fine in the code. Tried with both JME 3.3.0-stable & 3.4.0-stable. Unfortunately, I do not have JME SDK to test with, sorry.

You can try it in code like this:

    public void simpleInitApp() {
        Node model = (Node) assetManager.loadModel(new GltfModelKey("Models/gowniak.glb"));
        AnimComposer ac = model.getChild("Body").getControl(AnimComposer.class);
        ac.setCurrentAction("Mruganie");
        rootNode.addLight(new DirectionalLight(new Vector3f(-1, -1, -1).normalizeLocal()));
        rootNode.addLight(new AmbientLight(ColorRGBA.White));
        rootNode.attachChild(model);
    }
1 Like

Project is running (only in windowed mode), but is not playing animation. Got a lot of errors instead.
When set to fulscreen: ant -f C:\\eclipse\\workspaces\\jme\\BasicGame -Dnb.internal.action.name=run.sin - Pastebin.com
When run in window: ant -f C:\\eclipse\\workspaces\\jme\\BasicGame -Dnb.internal.action.name=run.sin - Pastebin.com

What version of JME are you using?

Regarding the shader compilation error, can you try with OpenGL 3 core profile?

You need to set this on AppSettings:

settings.setRenderer(AppSettings.LWJGL_OPENGL32);

Regarding

org.lwjgl.LWJGLException: Failed to find ARB pixel format 1 0 

Turn off anti-aliasing/multisampling in the AppSettings.

What version of JME are you using?

Running on jMonkeyEngine 3.3.0-stable

settings.setRenderer(AppSettings.LWJGL_OPENGL32);

still not animating shape keys ant -f C:\\eclipse\\workspaces\\jme\\BasicGame -Dnb.internal.action.name=run.sin - Pastebin.com

Turn off anti-aliasing/multisampling in the AppSettings.

Oh yeah, my bad, I forgot that was a thing with fullscreen; now fullscreen works but no shape key animations.

I figured out what was the core problem - it was OpenGL defaulting to using Intel integrated card only:

OpenGL Renderer Information

  • Vendor: Intel
  • Renderer: Intel(R) HD Graphics 4000
  • OpenGL Version: 4.0.0 - Build 9.17.10.2867
  • GLSL Version: 4.00 - Build 9.17.10.2867
  • Profile: Compatibility

I had to change in Nvidia settings panel my preffered graphic processor from “automatic” to my real graphic card to force it. Before that I tried to leave it globally on “automatic” (as it always been this way and worked with every game/application I’ve had) and changing setting for jME SDK only; what happened was SDK using correct card but not aplications SDK is launching by ant scripts. At this moment I said “nope”, set it globally and called it a day.

Now that there is no wall of text about shaders not compiling everything works as intended and model is animated properly.

Thank you for taking your time and helping me, despite it not being real import-assets issue.
I still wonder why OpenGL in SDK was detecting integrated card only, but oh well, problem solved.

Once again: Thanks
– Obama.

2 Likes

You’re welcome! Glad you could solve it. :slightly_smiling_face:

Edit:
I marked the topic solved.

2 Likes