JME GLTF Support

Hello I can’t access your files on bitbucket.
test your gltf file here : https://gltf-viewer.donmccurdy.com/
If it works then the issue is with JME
Else the issue is with the gltf file itself and I encourage you to post an issue in the blender exporter project
Issues · KhronosGroup/glTF-Blender-Exporter · GitHub

There is another exporter that you might want to consider. GitHub - Kupoman/blendergltf: A glTF exporter for Blender

Also a convoluted but much more reliable workflow is to upload your model on sketchfab.com set it as downloadable then download the gltf sketchfab generates for you. You can set the model in private so that nobody can see it.

3 Likes

I believe there’s already an issue opened for the KhronosGLTF exporter, it sounds like they’re still working on supporting multiple animations How can I export multiple animations(actions)? · Issue #112 · KhronosGroup/glTF-Blender-Exporter · GitHub

I tried the alternate KupomanGLTF exporter and it was able export all of my animations, except they were all distorted in the engine as if I hadn’t applied the location/rotation/scale in blender, so that didn’t work either. This was about 2-3 weeks ago though, so maybe something has changed with their exporter since then

@nehon I didn’t know about the Sketchfab workflow, but that sounds like the best way to export multiple animations at once for now , at least until the blender GLTF exporter is updated, thanks!

Edit: it does look like there’s been some update on the issue with the Khronos GLTF exporter since i last checked Support multiple actions, NLA tracks by donmccurdy · Pull Request #166 · KhronosGroup/glTF-Blender-Exporter · GitHub

1 Like

Bad converter, I can not upload gltf on
https://gltf-viewer.donmccurdy.com/
and when I upload .blend on https://sketchfab.com/models/2ee7e9dfadbc47a9b13036057aad35d3#
it works fine, and when I download it as gltf it does not download

KupomanGLTF works worse than KhronosGLTF

Drag your gltf files on it (gltf + bin file + textures if any)
Or maybe you have errors when you upload it?

About your model on sketchfab, it takes forever to generate the gltf I don’t know why. But I know the person that might know why. I will keep you posted.

I have created an issue about this:

I added bin file and it is uploaded, but there are many problems

  1. There are no bones
  2. Only one animation instead two
  3. vertexes attached to something wrong

http://dl3.joxi.net/drive/2018/03/12/0011/2843/781083/83/8cdb1f29cb.jpg

That was kind of my point. The Khronos exporter did shit.
It’s not working very well right now.

As for the issue with sketchfab there are some troubles right now and it should be fixed soon.

1 Like

Guys from sketchfab.com fixed converter, and now it works fine
Thanks for help

http://dl4.joxi.net/drive/2018/03/12/0011/2843/781083/83/79e75cfd6e.jpg

3 Likes

Hi guys,

is vertex animation part of JME3.2?
If not, are there plans to implement it?

Will be in 3.3

And if you feel adventurous it’s already available in the monkanim branch of the engine. Just know it’s an utterly unstable branch and things may break from one commit to another.

2 Likes

Only if you pay money or invite a person who signs up.

Thought I would try gltf and have found I have the same results as Konstantin_Denisov.

No fix since cant upload to sketchfab without losing your models…

I also ran into a bit of trouble using Sketchfab’s converter and have an issue opene on their forums currently.

Although have you tried the Khronos GLTF exporter since it’s been updated? They finally released a version that’s working enough that I can export a fully animated model from blender into JME very quickly and without needing to use NLA tracks :slightly_smiling_face:

They said it’s a development version but it seems to work perfectly from my trials so far. The download is at the bottom of the first post on this pull request Support multiple actions, NLA tracks by donmccurdy · Pull Request #166 · KhronosGroup/glTF-Blender-Exporter · GitHub

Yes, that’s the script I am using but with 2.79b blender. I cant figure out if your supposed to use actions or nla strips, bake or not, apply modifiers or not, blah blah blah. I have tried every setting on and off and it always results in as Konstantin_Denisov reported or worse.

Wait, I was using the linked to release. I will try this one out.

Nah. Doesn’t work either.

If you do as instructed, nothing is exported. Have to bake on export and then you get a non playable action in your .blend and one in the AnimControl that doesn’t play.

I ran though every setting again and no different then the released script.

What version of blender are you using?

I’m on 2.78c

I made a model and gave it a skeleton, assigned vertex groups to each bone and left the armature modifier set but not applied. Then if I make any new animations in the action editor, they all get imported to the engine without having to do anything else.

Occasionally I’ll have one animation that doesn’t make it out of blender, but If I just create a new animation and copy the key frames over then then it works.

I also noticed that you need to set the frame start and end time equal to the values of your longest animation. My longest animatino is a walk animation that’s 30 frames, so i have to have the end frame set to 30 at export time or it will be shortened when it makes it into JME.

That may be why.

The New versions break a lot of old stuff. I ran into some Ogre problems right off. I also used maximo for my animations so that may be a problem.

This version totally wiped my settings also, that’s probably because they wanted a vanilla install due to the 1k bug fixes.

Hrmm, with ogre it needs to equal all your animations lengths added together, including any gaps between strips.

Mhh true.
Though, Sketchfab workflow is not really the intended way. The khronos exporter should be at some point.

Cool I’ll try it again.

Hello
I have problems with animation for this model.

It works on https://sketchfab.com as you see, and it works on https://gltf-viewer.donmccurdy.com/
also I converted its to j3o
But I cant open it. I think it happens because clothes on this character have animation but don’t have bones.
It is separated objects what copied from parts of character and changed to have view of clothes and have animation.
Exception:
0:164(1): preprocessor error: #error NUM_BONES must be between 1 and 255.

at com.jme3.renderer.opengl.GLRenderer.updateShaderSourceData(GLRenderer.java:1269)
at com.jme3.renderer.opengl.GLRenderer.updateShaderData(GLRenderer.java:1296)
at com.jme3.renderer.opengl.GLRenderer.setShader(GLRenderer.java:1360)
at com.jme3.material.logic.SinglePassAndImageBasedLightingLogic.render(SinglePassAndImageBasedLightingLogic.java:237)
at com.jme3.material.Technique.render(Technique.java:166)
at com.jme3.material.Material.render(Material.java:974)
at com.jme3.renderer.RenderManager.renderGeometry(RenderManager.java:614)
at com.jme3.renderer.queue.RenderQueue.renderGeometryList(RenderQueue.java:266)
at com.jme3.renderer.queue.RenderQueue.renderQueue(RenderQueue.java:305)
at com.jme3.renderer.RenderManager.renderViewPortQueues(RenderManager.java:877)
at com.jme3.renderer.RenderManager.flushQueue(RenderManager.java:779)
at com.jme3.renderer.RenderManager.renderViewPort(RenderManager.java:1108)
at com.jme3.renderer.RenderManager.render(RenderManager.java:1158)
at com.jme3.app.SimpleApplication.update(SimpleApplication.java:253)
at com.jme3.jfx.injfx.JmeToJfxApplication.update(JmeToJfxApplication.java:31)
at com.ss.editor.JmeApplication.update(JmeApplication.java:384)
at com.jme3.system.lwjgl.LwjglWindow.runLoop(LwjglWindow.java:494)
at com.jme3.system.lwjgl.LwjglWindow.run(LwjglWindow.java:577)
at com.jme3.system.lwjgl.LwjglWindow.create(LwjglWindow.java:418)
at com.jme3.jfx.injfx.JmeOffscreenSurfaceContext.create(JmeOffscreenSurfaceContext.java:215)
at com.jme3.app.LegacyApplication.start(LegacyApplication.java:463)
at com.jme3.app.LegacyApplication.start(LegacyApplication.java:424)
at com.jme3.app.SimpleApplication.start(SimpleApplication.java:125)
at com.ss.editor.JfxApplication.startJmeApplication(JfxApplication.java:184)
at com.ss.editor.JfxApplication.lambda$main$0(JfxApplication.java:143)
at java.base/java.lang.Thread.run(Thread.java:844)