GS's 'animate' is screwed !

CloudsClouds Member Posts: 1,599
edited February 2012 in Working with GS (Mac)
Last night I hit a bit of a disaster with my current working project . . . .

I am relying fairly heavily on the animate behaviour for most parts of the game play, sound sync is fairly important to what I am doing.

What I discovered . . . after hours of playing around trying to get my audio to sync with my animations (even loosely sync, and even just for as short a period as 2 or 3 seconds) . . . what I discovered is that the animate behaviour is completely broken !

: (

That slider at the bottom of the animate behaviour might display a range of frame rates going from 1fps to 30fps but those frame rates are all screwed up.

Rather than 30 fps being the fastest and the speed getting incrementally slower as you select a lower frame rate - all the way down to 1 fps - the frame rates are all over the place:


First we have . .

30 fps

. . . . then we step down to . . . .

29 - 28 - 27 - 26 - 25 - 24 - 23 - 22 - 21 fps
(all these frame rates are identical, 29 fps is no faster than 21 fps)

. . . . then we step down to . . . .

20 fps

. . . . then we step down to . . . .

19 - 18 - 17 - 16 fps
(all these frame rates are identical, 19 fps is no faster than 16 fps)

. . . . then we step down to . . . .

15 fps

. . . . then we step down to . . . .

14 - 13 fps
(these two frame rates are identical)


. . . . then we step down to . . . .


12 fps down to 1 fps seem to be in order (ie: incrementally slower) although it's hard to say for sure without a more exacting test.


Anyhow, personally I'm screwed, weeks of work in a real mess, I really didn't think of making painstaking tests of all the functions I was aiming to use in GameSalad (who does!).


This all might seem a little esoteric but hopefully this is of some use to someone out there.



image


«1

Comments

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    That's why I create my animations at ten frames per second and then I use pencil to make a movie of it and build my sounds In GarageBand or sound track pro while synced to the movie track.
  • CloudsClouds Member Posts: 1,599
    edited February 2012
    @FryingBaconStudios

    "That's why I create my animations at ten frames per second and then I use pencil to make a movie of it and build my sounds In GarageBand or sound track pro while synced to the movie track."

    The problem is with Gamesalad not Pencil / After Effects / C4D / Logic / Garageband (etc etc . . )

    You can be working with a Pencil generated movie in Garageband - and all is well - everything is in sync - but it's when you place those files (your Garageband bounce and your image sequence) in GameSalad that all bets are off because although your sound now sits perfectly against your 10 fps sequence, the animate behaviour in GameSalad is unlikely to play your frames back at anything close to 10 fps.

    Check out 10 fps on the above graph - the left hand edge of it's bar should be touching the red line.

    I am (was) doing a similar thing . . . After Effects + C4D . . . rendered movie thrown into Logic Studio for sound sync to movie . . . the two elements put together in Gamesalad, I was not hoping for perfect sync, near enough would do, but everything is way way way out - and not always in a predictable way (like a simple offset).

  • CloudsClouds Member Posts: 1,599
    Here's a more visual illustration of the problem . . . . . for anyone whose interested:

    http://www.mediafire.com/?b0e1pxmi45ligmr
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    edited February 2012
    Hmmm I'll check it out but I have just finished a lip sync animation and a dance animation and it stays in perfect sync at ten frames. I've never had problems doing this way and have tons of animations. That clip is in the latest version of GS

  • Rob2Rob2 Member Posts: 2,402
    Yep..thats smpte for ya... perfect sync every time ..lol
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    edited February 2012
    @rob2 ? The sound and animation are running in GS if they sync was off recording it wouldn't fix that..lol although by making a movie in pencil and keeping a consistent frame rate by syncing my audio in GarageBand or sound track studio give you a solid smpte base line to work from and ensures a consistency. I've never had sync issues with any of my animations in GS other than the Android sound delay and even that was a trackable consistent delay. Just a reminder that the viewer does lag so going by that is useless. The best way to tell is ad hoc so by presyncing my stuff I always get perfect sync in ad hoc.
  • CloudsClouds Member Posts: 1,599
    edited February 2012
    "Just a reminder that the viewer does lag so going by that is useless."

    I did some fairly detailed tests, not only in the viewer, it was the same deal outside the viewer - the frame rates are screwed.
  • CloudsClouds Member Posts: 1,599
    edited February 2012
    @FryingBaconStudios

    "I have just finished a lip sync animation and a dance animation and it stays in perfect sync at ten frames. I've never had problems doing this way and have tons of animations. That clip is in the latest version of GS"

    Nice bear !! :)

    To be honest I can't tell much from that particular example of yours, he's just a bear (albeit a cute bear) swaying with the music, he could be running 3 fps too slow or 12 fps too fast and I wouldn't really have any way of telling !? There's nothing obvious to check sync against.
  • POMPOM Member Posts: 2,599
    edited February 2012
    @Tynan ,
    Although i do see some anomalies in the framerate , i think its less severe than you describe it .
    if you want to test frame rates per second in GS, you shouldn't test it with 100 frames , but with 30 frames . cause 30 is the max value GS can reproduce for animations.
    See how this modified version of your test is much more accurate about frame rates because the animation has 30 frames :
    http://www.mediafire.com/?o8hyfgrv9msj4jr

    In the long run , all the aligned lines lose the sync , and represents different frame rates .

    But yes , indeed some anomalies , i believe its due to the current engine of game salad , its a bit ..... slow with animations ;)

    Roy.
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    edited February 2012
    @pom you reminded me, if the number of frames doesn't match the rate you set it will go out of sync. This is why we have drop frame smpte. So if I had a rate of 10 fps and had 11 frames of animation on the second loop it will go out of sync because of the extra frame. @tynan this may be where you are having problems. It is crucial you create your animations to a real frame rate and match that frame rate in GS, if not your animation will drift out of sync. As a film and video person we deal with these issues when matching film and video because film is 24 frames per second and video is either 30fps or drop frame which is 29.97
  • POMPOM Member Posts: 2,599
    @FryingBaconStudios
    Yeah that was my meaning , its just your english is better for explaining this in a more professional way ;)

    Roy.
  • CloudsClouds Member Posts: 1,599
    edited February 2012
    @P-O-M

    Although i do see some anomalies in the framerate , i think its less severe than you describe it .

    I described it exactly as it is, really ! Those figures above are accurate, I promise !!


    if you want to test frame rates per second in GS, you shouldn't test it with 100 frames , but with 30 frames .

    I am testing the relationship between the frame rates rather than testing how accurately GS measures a second.

    I have 30 frame rates laid out next to each other, the amount of iterations is irrelevant - but the more iterations you have the more clearly you can see the discrepancies between the frame rates - cutting this range down to 30 frames (why choose 30 ? We are not measuring 30 fps any more than we are measuring 25 fps or 9 fps . . ?) only makes the measurement less accurate. You need to run this over more frames not less to increase the temporal resolution - which gives us a better view of the relationship between the frame rates (especially at the low end where 30 iterations renders over just a few pixels).


    See how this modified version of your test is much more accurate about frame rates because the animation has 30 frames

    I can't see how it is more accurate ? It shows the same disparity between the frame rates, but to a lesser degree ?


    In the long run , all the aligned lines lose the sync , and represents different frame rates .

    Are you even looking at the same thing as me ! ;) Frame rates 29 - 28 - 27 - 26 - 25 - 24 - 23 - 22 - 21 are running at the same speed !!

    8-X
  • Rob2Rob2 Member Posts: 2,402
    @FBS what are you going on about. If my animation is 11 frames and I play it at 10 frames a second that is fine if that is the speed it was designed to run at.
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    edited February 2012
    That's great as long as your sound is matched to that rate. We are talking about sound matching and going out of sync with sound. I agree GS doesn't handle long series of frames well, which is why I produce my animations to under 30 frames @ 10fps. That's a three second animation. The sound needs to be matched to a set frame rate. All I can say is my stuff is always in sync and I'll post a lip sync I did and you'll see it's perfect.
  • old_kipperold_kipper Member Posts: 1,420
    @tynan I came to the conclusion that something was up when I tried doing lipsync. I ordered frames based on mouth shapes against time (using magpie pro as the reference), and things would never sync unless I sat at certain frame rates.

    p.s. with tables it might well be possible to set up import of the magpie frame data to run the frames against sound, and fire it off timers to keep it in sync. Not tried it yet as have too much on my plate but will shout if I get it going.

    kipper
  • CloudsClouds Member Posts: 1,599
    edited February 2012
    @FryingBaconStudios

    "tynan this may be where you are having problems.

    GameSalad's animate behaviour plays back your image sequences at frame rates that bear little resemblance to what you set the animate behaviour to play them back at, it even shows no coherency within it's own range of frame-rates . . . like I say 30 fps goes off and does it's thing while 29 - 28 - 27 - 26 - 25 - 24 - 23 - 22 & 21 fps all play back an image sequence at the same frame rate !

    This has nothing to do with "[creating] your animations at a real frame rate" - For example, you can open Photoshop, make 100 separate documents, paint the numbers 1 to 100 on each subsequent file and save them off as a series of images . . . . now we have an image sequence of 100 frames . . . but what frame rate are they ? . . . have we created our image sequence at a 'real frame rate' ? No, in fact not only do they not have a 'real frame rate', they have no frame rate at all.

    I hate to sound rude, but I know what I am talking about, I have a masters in animation, I worked for 6 years as technical director of a (very big and very well known) computer animation facility and have been approached by people like Nikon (amongst many others) to advise on technical implementations of audio and video, I have bored people to death at breakfast explaining why NTSC runs at 29.97 and not 30 fps (CSC), and as far back as 1997 (maybe even earlier ?) did a talk for Sony on PAL/NTSC . . . . blah blah blah

    It is crucial you create your animations to a real frame rate and match that frame rate in GS, if not your animation will drift out of sync.

    I think you misunderstand the basic point of my original post, regardless of what frame rate we work at Gamesalad's animate frame rates are near arbitary, for example as I have pointed out all the frame rates from 21 up to 29 frames per second run at the same speed !! - the rest of frame rates are all over the place, 16 - 17 -18 - 19 for instance are all locked together . . . 21 fps is around 4 fps faster than 20 fps !! 30fps runs much slower than an (external) 25 fps source . . . etc etc.

    As a film and video person we deal with these issues when matching film and video because film is 24 frames per second and video is either 30fps or drop frame which is 29.97

    This is not a drop frame issue or a PAL / SECAM / NTSC / SMPTE / BBC / RAFLMAO / C.S.I Miami (etc etc etc etc) issue ! :-)) The problem is inside Gamesalad, it's animate behaviour is screwed ! 8-X 8-X 8-X 8-X 8-X 8-X 8-X - I promise on my children's eyes and LeonardDeveloper's next 5 logos.

    Or to use highly technical language, the frame-rates are screwy.


    P.S . . . "film is 24 frames per second and video is either 30fps or drop frame which is 29.97"</> . . . you missed out the most common rate for video, 25fps. . . and don't forget 24fps, 50fps, 59.94fps, 23.976fps, 50i and 60i . . . . 30 and 29.97 might be what the US and a few other countries use, but the majority of the globe use 25.
  • CloudsClouds Member Posts: 1,599
    @old_kipper

    "I came to the conclusion that something was up when I tried doing lipsync."

    I can imagine that would be a problem, you need your animation to playback at the right speed for any sync to work, but for lip-sync you really need things to be tight !



  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    edited February 2012
    I was only trying to help @Tynan and I didn't even remotely say anything about your skill level or knowledge..You know I like and respect you. I did think you had thicker skin than to try and read between the lines and as you know, I don't write between the lines, I just come out and say things..lol. I'm just sharing my results in GS. I agree, as I said, GS doesn't handle long animations well. Let's hope when they drop lua the lag might clear up. He is my latest lip sync test. This is 17 frames created at 10fps and synced to audio at 10fps. I do know a little something about audio sync as a sound engineer and I worked with Jack Hart A friend of mine who lives just up the road who developed the algorithm for the satellite syncing of “Ode to Joy” simultaneously on 5 continents for the 1988 Nagano winter Olympics it was brilliant work.



  • HoneyTribeStudiosHoneyTribeStudios Member Posts: 1,792
    @tynan @old_kipper How does syncing hold up when using either a timer behaviour or the game.time to trigger the animations instead of the animation behaviour?
  • CloudsClouds Member Posts: 1,599
    @FryingBaconStudios

    "I didn't even remotely say anything about your skill level or knowledge."

    No, I've not said you have, I was just trying to point out that I wasn't lost in a maze of numbers and ideas I was unfamiliar with, I hate blowing my own trumpet (did I tell you about my Olympic Gold in grandstanding?) but I wanted to give you some context.

    "Let's hope when they drop lua the lag might clear up.

    That's part of the issue, it's not simply a lag, or a generalised offset, it's all over the place ! :s

    Yep, let's hope the fabled Lua-Drop™ will give us stable frame rates.

    "He is my latest lip sync test. This is 17 frames created at 10fps and synced to audio at 10fps."

    Looking nice !! : )

    I expect with only 17 frames (and a low frame rate like 10 fps) you probably avoid the worst of the GS frame rate mayhem, I'm running sequences @ 25 fps for between 90 and 150 frames.

    "I do know a little something about audio sync as a sound engineer and I worked with Jack Hart A friend of mine who lives just up the road who developed the algorithm for the satellite syncing of “Ode to Joy” simultaneously on 5 continents for the 1988 Nagano winter Olympics it was brilliant work."

    Can you get him to sort out GameSalad's numerous bugs !? :D
  • CloudsClouds Member Posts: 1,599
    edited February 2012
    Here is a project with a 25 frame sequence in - and an audio file with a click exactly every 1 second.

    The animate behaviour is set to 25 fps . . . . but as you can see the red (single frame) flash at the start drifts out of sync very quickly as 25 fps in 'animate' is nowhere near 25 fps, in fact do this experiment with the file . . . change the animate fps to 30 . . . and you will see that even at 30 fps 'animate' doesn't manage to keep up with the 25 fps click track, that is to say: animate's 30 fps is not even running at 25 fps, let alone 30.


    http://www.mediafire.com/?us9fg5v1xs2wyyx
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    edited February 2012
    @Tynan I wish I could he's a brilliant guy! He's been working with Sony and other companies on DRM algorithms. When I talk to him he says it's tough to write a DMR that can't be hacked..They were close a few times but close only counts in horseshoes...lol Can I ask why you need to use a high frame rate? I found ten gives me the most reliable return and have stuck with that. How is the performance on an ad hoc? Have you publishedd your animation with a click track to ad hoc? Our new app is going to host lots of lip sync so I may run an ad hoc test with a click track to see.
  • CloudsClouds Member Posts: 1,599
    edited February 2012
    @FryingBaconStudios

    "Can I ask why you need to use a high frame rate?"

    For me it's the lowest frame rate that allows (realistic) phi phenomenon / beta movement, to be honest 24fps would do it, but I am so programmed to type 25fps into everything I touch (PAL land) I went for the extra 1 fps out of habit. Lower frame rates can work really well depending on the style of the piece, in fact for cartoon-ish stuff smooth 25/30 can look too fluid - but for what I am doing I need 25 fps - my iPad (1) handles it all just fine (so far!) . . although I am thinking of pushing the whole thing out of the realms of iPad 1 land and make it iPad 2 + only

    "Have you publishedd your animation with a click track to ad hoc?"

    No, never published an ad hoc in my life, I wouldn't know how to. I have passed all these tests over to my iPad and they do exactly the same as the Gamesalad project on my Mac.
  • Rob2Rob2 Member Posts: 2,402
    edited February 2012
    @Tynan in this case you will not see any fundamental difference between the viewer and an adhoc. They both use the same engine and both parse your project file in an identical fashion.
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    edited February 2012
    Through the viewer? The viewer sucks too. My partner in the Gleeson Group consults over at MIT as a systems analyst for their Macs. Last week he went in and after they explained what the problems were and how they tried to fix them, he provided the simple solution in five minutes. He said they are so smart over there they over analyze everything. Sometimes we need to just apply Ockham's razor; "a principle that generally recommends that, from among competing hypotheses, selecting the one that makes the fewest new assumptions usually provides the correct one, and that the simplest explanation will be the most plausible until evidence is presented to prove it false." This is a backhanded compliment I know.. lol @rob I can't see how that is as the viewer puts another layer between you and the machine. I found my published outputs to perform better than the viewer and even GS admitted such in a post several months ago.
  • Rob2Rob2 Member Posts: 2,402
    sudden rethink... the connection to the desktop may effect performance... but I doubt it.
  • CloudsClouds Member Posts: 1,599
    @Rob2

    "in this case you will not see any fundamental difference between the viewer and an adhoc. They both use the same engine and both parse your project file in an identical fashion"

    I kind of suspected that might be the case, the discrepancies are so marked that I couldn't really see it being a platform issue.
  • Rob2Rob2 Member Posts: 2,402
    edited February 2012
    Precisely :)

    ps I never said what a bloody elegant demo 'frame rates04' was.
  • CloudsClouds Member Posts: 1,599
    edited February 2012
    @Rob2

    " . . . desktop may effect performance"

    Here the thing, let's imagine there was performance loss, let's imagine the processor was struggling with something or other - then we'd expect to see everything equally brought to it's knees.

    For example, if we overload some device with a really heavy (processor wise) car racing game, when things get really bogged down and the game keeps freezing, you wouldn't expect to see one (just one) of the cars racing off while all the other's got stuck behind, when a processor is overloaded the whole system slows or freezes . . . now if you look at what the animate behaviour is doing, rather than all the frame rates lagging or playing back slowly or glitching and jumping frames or even being subject to a universal offset or delay . . it's instead producing a pattern, a repeatable pattern where some frame rates bunch up with others and race off while others stick to a lower speed and other's still seem to be locked to their neighbouring frame rate - and this is repeatable and persistent.
Sign In or Register to comment.