Does interpolate have a glitch?

Hello

I use the interpolate behaviour a lot to add nice effects with movement and fading. However I have noticed that it doesn't seem to run a full cycle as its meant to, as of it skips a value or something. For instance, when interpolate an actors image alpha to zero, it tends to go 0.3, 0.2, 0,2 then 0. And it just looks messy, I even tried adjusting the value so it goes into the negatives so the skipping wont be seen, bit still no luck. It's very annoying not being able to make it run smooth. Sort of takes away from the atmosphere. Is this a bug, glitch or have I done something wrong with using the behaviour?

Thanks

Comments

  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    yes, what you describe seems familiar. i know ive seen posts on it before, and i swear ive seen some people post workarounds, but i don't remember exactly what they are, been a long time.
  • BoomshackBarryBoomshackBarry Member Posts: 712
    Yep there's a glitch with it where it jumps at the end, causing a visible jump. There are work arounds, I think a solution was posted in the spare code thread.
  • ShahotinaroShahotinaro Member Posts: 6
    Set the alphas to -.2 and 1.2
  • SocksSocks London, UK.Member Posts: 12,822
    edited August 2013
    It's a known glitch, annoyingly it's been there for years, ruins fade outs and fade ins (both visual and audio).

    The glitch occurs in the last 10% of the last whole number of your interpolation.

    So on an interpolated move from, for example, X=0 pixels to X=1,000 pixels you won't see it (your actor will theoretically skip the last 10% of the last pixel, imperceivable stuff).

    But on an alpha channel fade or an audio ramp - where the whole interpolation spans just one number (0 to 1 or 0 to 1) it chops off the last 10%, which you can clearly hear and/or see.

    Solution 1) push the glitch outside your working range, example: interpolate from 0 to 1.2 (or 1 to -0.2) - and adjust the time of your interpolate accordingly to allow for it arriving at its intended value early. This method is quick and works fine for most common scenarios, it works with linear interpolations but screws up ease in and ease out - and of course will not work with an interpolate that doesn't end at 1 or 0 (eg: fading to 50% black will not hide the glitch).

    Solution 2) hide the interpolation glitch by making it a tiny fraction of a larger number, rather than interpolate from 0 to 1 (or 1 to 0) . . . . interpolate an attribute from 1 to 256 (or whatever value suits your needs) and constrain the alpha channel (or audio volume) to that attribute divided by 256 (or whatever you chose as your higher value). This way involves an extra attribute but allows glitch free ease in and ease out interpolation (and, of course, linear interpolation).
    .
  • MillionairAppsMillionairApps Member Posts: 110
    Thanks @socks and everyone, I think I came across a year or so ago but didnt bother me too much. Hope it gets fixed soon :p

    It works fine now using the second solution, bit of extra work but atleast it works now.

    Cheers
  • SocksSocks London, UK.Member Posts: 12,822
    Hope it gets fixed soon.
    I doubt it, It's was reported to GameSalad years ago. ;)
  • beefy_clyrobeefy_clyro Member Posts: 5,394
    Dont get @Socks started on the Interpolate glitch haha
  • SocksSocks London, UK.Member Posts: 12,822
    Dont get @Socks started on the Interpolate glitch haha
    @beefy_clyro


    :P
  • mataruamatarua Auckland, New ZealandMember Posts: 854
    Thanks guys - solved my issue too - I have found that by giving it a power of 1000 - or that might be fraction of a 1000 that it's smoother than by 100 - this was over a 30 second period. Nice now :)
Sign In or Register to comment.