[SOLVED] com.jme3.asset.AssetLoadException: Inconsistent animation sampling

вер. 12, 2019 10:54:20 ПП com.jme3.app.LegacyApplication handleError
SEVERE: Uncaught exception thrown in Thread[jME3 Main,5,main]
com.jme3.asset.AssetLoadException: An error occurred loading Models/knights/knight_on_foot/KnightOnFoot.gltf
at com.jme3.scene.plugins.gltf.GltfLoader.loadFromStream(GltfLoader.java:150)
at com.jme3.scene.plugins.gltf.GltfLoader.load(GltfLoader.java:78)
at com.jme3.asset.DesktopAssetManager.loadLocatedAsset(DesktopAssetManager.java:259)
at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:373)
at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:416)
at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:420)
at main.Test.simpleInitApp(Test.java:87)
at com.jme3.app.SimpleApplication.initialize(SimpleApplication.java:220)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(LwjglAbstractDisplay.java:130)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:211)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: com.jme3.asset.AssetLoadException: Inconsistent animation sampling
at com.jme3.scene.plugins.gltf.TrackData.checkTimesConsistantcy(TrackData.java:139)
at com.jme3.scene.plugins.gltf.TrackData.update(TrackData.java:130)
at com.jme3.scene.plugins.gltf.GltfLoader.readAnimation(GltfLoader.java:805)
at com.jme3.scene.plugins.gltf.GltfLoader.loadFromStream(GltfLoader.java:136)
… 10 more

Occurs when I tried load *.gltf model

Loading without animation was successfully

Not sure if this is it but blender starts animations at keyframe one and gltf starts them at 0 by default when exporting.

Have you set the beginning frame to 1 in the config panel fot gltf export?

%D0%B8%D0%B7%D0%BE%D0%B1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5

This param helps
After enabling error absent

I haven’t opportunity to change start frame

@ValeriiNikitin

You need go animation graph, select all for each animation. press T → set Linear Interpolation.

This error is because exporter export as “NON-LINEAR”(if you dont do what i said above) while JME support only LINEAR animations.

Its already said here:

https://wiki.jmonkeyengine.org/jme3/advanced/blender_gltf.html

but i think there is missing short key for it: T → set Linear

Thanks
Works fine

1 Like

I need to quit assuming people have actually read the wiki before asking a question.

dont worry, its new wiki page, and anyone everyone can miss something :slight_smile:

so should never assume anything.

@ValeriiNikitin please use code block when posting codes

btw, I marked this topic as [SOLVED].