MorphTarget

Hi,
I created a Morphtarget in Blender.

testObjekt = (Node)assetManager.loadModel("Models/testObjekt/testObjekt.j3o");
testObjekt.setLocalScale(1f);
testObjekt.move(-1, 0, 0);

Node hilfsNode = (Node) testObjekt.getChild("abx");
Geometry testObjektgeo = (Geometry) hilfsNode.getChild("abx_0");
Mesh testObjektmesh = testObjektgeo.getMesh();
MorphTarget[] morphs = testObjektmesh.getMorphTargets();

but morphs[0] does not have a setValue Method or something like that.
is there a Tutorial on how to use MorphTargets?

Hi

You can find examples of using morphs here https://github.com/jMonkeyEngine/jmonkeyengine/tree/master/jme3-examples/src/main/java/jme3test/model/anim

Note, only gltf loader supports morphs so you should export your model from blender to gltf then load gltf in JME.

Also, note JME 3.2 does not support morphs, you must use JME 3.3.

2 Likes

thank you

2 Likes