[Solved with Xbuf] Animation not playing in JME SDK alpha 4 Scene Composer!

This is the code that I use, minus some inspection infrastructure to find the conrtols:

            System.out.println("**** Run animation:" + animationName);

            // Go through all of the controls that have the animation
            for( AnimControl control : animControls.get(animationName) ) {
                int count = control.getNumChannels();
                AnimChannel channel;
                if( count > 0 ) {
                    // Reuse the channel from before
                    channel = control.getChannel(0);
                } else {
                    channel = control.createChannel();
                }
                channel.setAnim(animationName);
            }

I didn’t test it in 3.1 :frowning:

try to switch in software skinning

Oooh… that’s a good point. My code is using software skinning. Maybe hardware skinning got messed up.

Nah, hardware skinning works for me, too.

was worth the shot :stuck_out_tongue:

Well, something is wrong because if I clone it with hardware skinning on I get an error about sharing materials… even if the materials were cloned.

I’ll look into it later today.

Got to bed… monkeys can survive while you sleep :wink:

How I can do this?

skeletonControl.setHardwareSkinningPreferred(false)

It doesn’t works :frowning:

Yeah well It seems it’s more a cloning issue.

Uploaded here : https://drive.google.com/file/d/0B35eWZpi0dBoRGJlenVHQ3NyR28/view?usp=sharing

Unzip it inside your Models directory to have textures import correctly. so the directory path should look like: assets\Models\Models\Players\Jo Sang\cadnav.com_model\Jo Sang

1-I also tried with this release : SDK alpha 4-SNAPSHOT
it also did not play animation in scene composer. So the problem is not related to me using nightly version of netbeans (3/30/2016).

2- The model above contains .blend and .j3o with textures also license file(from cadnav.com). it is rigged and animated with Mixamo Auto Rigger.
3- meshes do not use shared material.
4- .blend converted to .j3o in alpha 4.
5- the animations plays OK in SDK scene composer for versions previous than SDK alpha 4.
6-Also animation plays OK inside game in alpha 4.
7- Have any question yet ?

Well, there was a cloning issue… but it would have thrown a big nasty exception. So unless the SDK code is hiding some exceptions when cloning then this was maybe not the issue here.

I’ve just committed a fix for the cloning issue that I saw. Basically, the clone of SkeletonControl was getting confused and think the materials were shared when they weren’t. (Mostly because Material is not yet cloned with the Cloner.)

2 Likes

Actually the SDK is pretty good in hiding Exceptions :smiley:
This is because the ExceptionMinLevel is set so high that no Exceptions are put into the Log.

On the other hand the assetManager#loadModel() call is wrapped in try/catch and opens a dialog “Error when opening Model”.

That however doesn’t guarantee that an exception which is thrown in the first Control#update or whatever would be shown.

So can you please change SDK so it prints the whole log info and don’t hide them ?

Well that would require a huge refactoring and the idea currently is that the code manually logs exceptions where needed and sucks up the other ones.

Other ones would be for example an multiple-lines-long Exception for each not found Asset, small Bugs in the SDK etc, so it’s best to hide them and properly implement Error Logging.

On the Other hand when you run the SDK in Netbeans, every Exception is logged, so it’s good for Debugging Purposes.

Does setting log level in SDK help at getting exceptions like that?

Only the LogLevel in Installer.java from jme3-core, but as said, this is done for a reason and won’t help here.

1 Like

I builded JME of version

SHA 80f4e049 by Paul Speed, 05.04.2016 18:01

and the problem with playing of animation didn’t resolved.