Results 1 to 4 of 4

Thread: [BUG] Animation loops get truncated by one frame, creating a nasty hitch

  1. #1
    Basic Member MaxOfS2D's Avatar
    Join Date
    Jun 2015
    Location
    France
    Posts
    146

    Exclamation [BUG] Animation loops get truncated by one frame, creating a nasty hitch

    It's a subtle bug but it's there. It can easily be seen in the model viewer UI. In 3ds Max, I have a 80 frame loop, but it's really 81 because it begins from frame 0. I exported it like that from 3ds Max as FBX.



    But in the model viewer, the last frame is 79... so we've gone from 0-80 to 0-79.



    Here's the hitch in slow motion (with the duplicate loop frame removed so you can tell more easily)



    For now, the workaround is to just add an extra frame at the end... but if the bug gets fixed, then that extra frame will not be necessary anymore and you'd have a new loop hitch. So I'd rather avoid submitting with that workaround in place.

    I don't know if this is a bug with the FBX importer, if it has to do with animation processing, whatever the loop flag does in Source 2, or if it's some quirk that's only present in the workshop item importer.

    Here are my files, hopefully this is an easy repro case: https://dl.dropboxusercontent.com/u/...mhitch_bug.zip
    Last edited by MaxOfS2D; 10-04-2015 at 07:12 PM.

  2. #2
    Valve Developer
    Join Date
    Sep 2011
    Posts
    18
    This is the expected behavior - for looping animations (eg. run or idle) you should author your animation with the first and last frames identical. We'll change the importer UI to make the requirement more explicit.

  3. #3
    Basic Member MaxOfS2D's Avatar
    Join Date
    Jun 2015
    Location
    France
    Posts
    146
    Quote Originally Posted by michaelc View Post
    This is the expected behavior - for looping animations (eg. run or idle) you should author your animation with the first and last frames identical.
    That is exactly what I'm doing, though, and what I've been doing in Source 1 as well. But it's once the animation is in the new tools that a frame gets "cut away"...



    As you can see here, 4 frame loop, with the object being in all 4 corners. The first and last frame are the same. This is what I'm exporting out of 3ds Max as a FBX file. (whether I export from 2016 or 2014 doesn't seem to change anything)

    Now take a look at this (don't worry, it's just 30s, I don't want to waste your time):



    I think this showcases the issue much more clearly than before (I should have thought of doing a test like this before, sorry)

    I've updated the zip with the model files to include this 4 frame FBX.
    Last edited by MaxOfS2D; 10-14-2015 at 08:43 PM.

  4. #4
    Valve Developer
    Join Date
    Sep 2011
    Posts
    18
    So just to be clear, the workaround you described is that you would have to export [ A, B, C, A, A ] to get a smooth loop, correct? (That's definitely not the expected behavior and we're investigating - thanks for the example files.)

    Are you able to export as DMX? Does the problem still happen in that case?

    Update: We've investigated this and it looks like there's a bug in our FBX handling and we're working on a fix. In the meantime you should be able to work around the problem by using DMX files instead of FBX (or just leaving the extra frame in an FBX - but as you pointed out you shouldn't submit to the workshop with that workaround in place.)

    Update 2: This will be fixed in our next release. Thanks for the bug report and detailed info!
    Last edited by michaelc; 10-15-2015 at 07:19 PM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •