Domanda

I am displaying a Blender model in Actionscript-3 using Papervision3D.

The model has animations, and so I have set up some AnimationClip3D animations in the code:

clip[0] = new AnimationClip3D("Clip0", 0.0, 1.0); //first animation
clip[1] = new AnimationClip3D("Clip1", 1.0, 2.0); //second animation

and so on. These are small animations 1 or 2 seconds long. The numbers indicate the start and end time in seconds.

The model shows up fine and performs the animations correctly in a random order as intended, but every 15 seconds or so, the animation pauses and 'jumps' as though there is a delay.

I set up a NEXT_FRAME listener to trace the data at each frame, and this is the output, where time is the AnimationEvent time:

Frame 1 Time 0.389
Frame 2 Time 0.995
...
Frame 25 Time 14.539
Frame 26 Time 15.128
Frame 27 Time 15.707
Frame 28 Time 0.132
Frame 29 Time 0.714

As you can see, the AnimationEvent time gets reset to zero at around 16 seconds.

Excuse my newbie question but, what causes this, and how can I stop my animation from pausing and jumping at 16 seconds?

UPDATE: I believe the problem is sorted now - please see my solution below.

È stato utile?

Soluzione 2

I believe the problem is sorted now.

I forgot to add the animation clips to the animation of the DAE:

myDAE.animation.addClip(clip[0]);
myDAE.animation.addClip(clip[1]);

and so on.

What this means is that before adding these lines it was using clip "All" - the whole animation - and getting confused.

I can now play the correct clip (false = without looping):

myDAE.play(clip[0], false);

Altri suggerimenti

I have had a similar problem when I animated a 3D-model in 3DsMax, then exported it as seperate .png-frames and then imported those images onto the timeline, making it loop. For an example, see http://www.gamersnet.nl/?skin=oranje2013 . It's the little crown in the middle. I wasn't able to fully eliminate the pause, but it's a lot less worse and not noticable unless you know/are looking for it.

The thing is that when doing any sort of animation, you set a start and an end position. In this case the start and end position where the same. This means that the first frame of the animation and the last frame of the animation are identical. So to make the transition smoother, I deleted the last frame(s), so that there were no identical frames.

I am not sure if this is also the case with your problem (I have never used Papervision3D), but the problem seems similar to the one I encountered. So maybe the solution is the same :)

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top