[FIXED] 1.5.0 RC: strange slowdowns when looping animation

Hi David,
Thank you that put so many efforts to fix this bug.
I will try to check what you said tonight (can’t promise though, since I am really busy today and tomorrow).

Probably, it was too late night when I did the last test, excuse me. Of course, you are right. Here are the correct results (this time, I double-checked it):

Version 2008.02.27, interpolate-frames set to 0:

  • Ralph pops to each frame,
  • fps > 200,
  • print self.actor.getPartBundle(‘modelRoot’).getFrameBlendFlag() prints 0.
    Version 2008.02.27, interpolate-frames set to 1:
  • Ralph pops to each frame,
  • fps > 200,
  • print self.actor.getPartBundle(‘modelRoot’).getFrameBlendFlag() prints 0 (!).
    Version 2008.02.28, interpolate-frames set to 0:
  • Ralph in slow motion,
  • fps < 150,
  • print self.actor.getPartBundle(‘modelRoot’).getFrameBlendFlag() prints 1 (!).
    Version 2008.02.28, interpolate-frames set to 1:
  • Ralph in slow motion,
  • fps < 150,
  • print self.actor.getPartBundle(‘modelRoot’).getFrameBlendFlag() prints 1.

So, in 2008.02.27 (and before) interpolate-frames is always disabled, and in 2008.02.28 (and later) interpolate-frames is always enabled. Changing its value affects neither fps nor visual motion.

EDIT: I have tested latest release 1.5.0, it behaves the same as 2008.02.28.

Search your entire filesystem for anything with the extension “prc.” Maybe there’s a config file somewhere overriding something.

Even better, try this:

>>> print ConfigVariableBool('interpolate-frames')
ConfigVariable interpolate-frames:
  interpolate-frames 0  (default value)

Set this true to interpolate character animations between frames, or false to hold 
each frame until the next one is ready.  This can also be changed on a per-character 
basis with PartBundle::set_frame_blend_flag().

This will list all of the .prc files that define the indicated variable, especially the one that gives it its current value.

Are you sure you’re spelling it correctly?

David

Should I import it somehow? It says “NameError: name ‘ConfigVariableBool’ is not defined”.

EDIT: I found it in the manual.

I used following code to print the info:

from pandac.PandaModules import loadPrcFileData
from pandac.PandaModules import ConfigVariableBool

#loadPrcFileData("", "even-animation 1")
loadPrcFileData("", "interpolate-frames 0")
n=self.actor.getPartBundle('modelRoot').getFrameBlendFlag()
print "self.actor.getPartBundle('modelRoot').getFrameBlendFlag()", n
print ConfigVariableBool('interpolate-frames')

Panda 2008.02.27, loadPrcFileData("", “interpolate-frames 0”):

self.actor.getPartBundle('modelRoot').getFrameBlendFlag() 0
ConfigVariable interpolate-frames:
  interpolate-frames 0  (from )
  interpolate-frames 0  (default value)

Panda 2008.02.27, loadPrcFileData("", “interpolate-frames 1”):

self.actor.getPartBundle('modelRoot').getFrameBlendFlag() 0
ConfigVariable interpolate-frames:
  interpolate-frames 1  (from )
  interpolate-frames 0  (default value)

Panda 2008.02.28, loadPrcFileData("", “interpolate-frames 0”):

self.actor.getPartBundle('modelRoot').getFrameBlendFlag() 1
ConfigVariable interpolate-frames:
  interpolate-frames 0  (from )
  interpolate-frames 0  (default value)

Panda 2008.02.28, loadPrcFileData("", “interpolate-frames 1”):

self.actor.getPartBundle('modelRoot').getFrameBlendFlag() 1
ConfigVariable interpolate-frames:
  interpolate-frames 1  (from )
  interpolate-frames 0  (default value)

I searched the whole hard drive. I have prc files in “etc” directories of my four Panda installations (1.4.2, 2008.02.27, 2008.02.28, 1.5.0). Confauto.prc and Config.prc.
There is also AcroSign.prc in C:\Program Files\Adobe\Reader 8.0\Reader\plug_ins but I guess it is not a problem :slight_smile:

I added solution about interpolate-frames to FAQ. Josh or David, please, check and correct it if something is wrong there :slight_smile:

Looks good, thanks!

David