BGE, enable all frames, python and animation

Hi.
I’m actually using the game engine to animate a character for a theater performance. The game engine is controlled remotely threw OSC (network) via python. I controlled different kind of things in GE via OSC :

  • start character and objects animation (each action of the character during the performance, like talk, or take an object, or anything he plays is trigg by a human manipulator)
  • control camera and character position (used for traveling in the spaces where character evolve).
  • control head of character. At any time we can correct the head of the character on the animation via a custom python script. (actually still a bit buggy, but didn’t loose hope to finished it! ^^)
  • face expression (shape key) can also be corrected in realtime via python.

I have few questions.

  1. I notice that if I threw to much information per second via OSC (more than fps), it seems that blender construct a kind of stack, even if I drop the information when it’s currently treating it (controlled by a system of flag). Enable all frames allowed me to send more information, actually the only solution I found to go threw this problem, but I didn’t like much this solution. Any other idea?
  2. actually, the time is remotely controlled. But I’m not sure it’s the better way to go. I’m actually moving all my time motor in blender. Two solution : make a python time controller and keep my action actuator by property or change my action actuator by play or loop type. I like the second solution but if I enable all frames, the animation is playing really too fast. Any idea?
  3. in the case where I keep my action actuator by property type, I have a bug on the blend between two action. It seems that he makes the blend between the firsts frames of the current action and the firsts frames of the previous action, not the lasts. Changing type to play or loop will correct the problem but I have the problem on point 2).

I think it will be all for the moment. :slight_smile:
thanks.

  1. As Blender does not have network support it seems more a problem of the network library. I can’t help without more details.
    Maybe the listener to the network does not run at every logic tick.

2)I do not really understand what you want to do.
The speed of “automatic” actions can be set at “scene (F10)” buttons “Format” panel - “FPS:”
The speed of the logic can be set at “Shading(F5)” - “world buttons” - “Mist/Stars/Physics” panel -“fps:”
3) is a bug since 2.49 there was a thread recently. I can’t find it rght now. There is a workaround: When you switch between the actions you should switch to another actuator. So you have to switch between 2 actuators when changing the action

Act 1 - Act 2
action A - off
off - action B
action C - off
off - action D
etc.

I hope it helps

It runs every ticks, but seems to be able to catch only one information by ticks (so I’m limited to sixty information per seconds if I set my logicrate to sixty). And didn’t realised to build a real threaded network receiver.

In fact it works fine at 25 fps when “enable all frames” is disable. But if I activate “enable all frames” option, blender seems to not manage fixed fps. So actually I have a time motor send each frame on a property I used for animate the character at the right time. But it makes many OSC sending, and my synchro between blender and other soft didn’t seems right. I would like to try with blender generating time and frame and sending to all other.

is this thread? http://blenderartists.org/forum/showthread.php?t=167795
In fact, in my case, frame blending works fine, but it works with the first frame of precedent action, and not between the last frame of precedent action and first of new one. (probably due to my frame property who gone back to 0 each time). So need two actuator and two frame prop? can try it.

ok, for question 3), set actuator blendTime variable to 0 at each change of action correct the problem right, with actuator configured by property or play.
[edit] Ok, I was wrong, the problem is still there. Currently searching again why. Two actuators doesn’t correct the problem too. Always make the blendin from the first frame of precedent action.[/edit]
[edit] Found the bug. Was not on blender but on MAXMSP, which I use to control my puppet[/edit]