View Single Post
  #5  
Old 11-30-2004, 03:16 PM
vjonshih vjonshih is offline
Member
 
Join Date: Sep 2004
Posts: 15
So there are two complex "actions" in the code that we've found to possibly have been affecting the lag...I want to know if you have any suggestions as to any possible (relatively easy) solutions:

(1) We have whole-body animations exported from Character Studio Max (.cax) files...whenever the timers call a .cax animation, *no* lag occurs. However, we also have these complex recorded-head-movement animations. What we've done is record head-movements into text files, and then at the beginning of the script, we read all of the data into an array -- and when we call for an avatar to perform that specific head movement, we have a timer call to run through index 1000 through 10000 (for instance) of the action array and make the avatar's head move according to the pitch,yaw,roll data in the array. This seems to be stalling the computer a bit -- we don't read in the specific text file containing the head movement data EACH time we call the avatar to perform that action, so that's not an issue. However, it must be the fact that when multiple avatars are doing different recorded head movements, all of the timer calls to the centralized head-movement-data array stalls the computer.

Do you know of any way to export/import text files containing lines of head-movement-data into a program like Character Studio Max and then re-exporting it out to a .cax file or something of that sort? If so, that would solve that particular lag problem I think.

(2) When we commented out the timers that called the head-movement actions to be performed, the lag was still there but it was less prominent. We've narrowed it down to the action of making the avatars speak a .wav file. There are about 8 or so .wav files for each of the 7 avatars that we have them speak -- but we don't have them preloaded into the script before hand (via sound = viz.add('speech.wav')) -- so, apparently, each time the timer calls for a specific avatar to speak a certain .wav file, Vizard is opening up that .wav file each time to run. Is it better/possible to load all the .wav files beforehand in the script via viz.add -- and then have the timers call them to be spoken later on?

Sorry for the verbosity of this message...but I really appreciate any suggestions you have to offer!
Reply With Quote