ozRocker Posted May 6, 2016 Share Posted May 6, 2016 I've been exporting my animations using Babylon exporter 4.4.4. I notice that the end result is missing a frame at the beginning or end so when the animation is looping there is a noticeable skip. This is what my Blender animation looks like: Here's a playground with those animations exported: http://www.babylonjs-playground.com/#1IGIDN These are my ranges: "ranges":[{"name":"Idle","from":1,"to":199},{"name":"Run","from":201,"to":214},{"name":"Walk","from":216,"to":238}] I noticed there's a frame gap between the ranges so I removed the gap. "ranges":[{"name":"Idle","from":1,"to":199},{"name":"Run","from":200,"to":214},{"name":"Walk","from":215,"to":238}] Both walk and run look smoother without that gap which you can see here: http://www.babylonjs-playground.com/#1IGIDN#1 However they still appear to be missing a frame. Any ideas how I can fix this? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted May 6, 2016 Share Posted May 6, 2016 This seems to be an issue with the exporter. I let @JCPalmer commenting here as he is the father of this exporter Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted May 6, 2016 Share Posted May 6, 2016 Guess that makes you the grandfather. Yes, the skipping frame issue was talked about 3 weeks ago. Fact is I do not have a blend where the animation is smooth enough to know whether a frame was missing or not. The change is probably going to be very small change to some looping check. The gap is intentional though, as just a sanity check. Look at your .babylon. Bet there is no frame 200, or 215 in the file. As of 4.4.4, line breaks are put in every frame to make this easy to check. We are still suffering are from the intro of Blender Actions as BJS animation ranges, and support for inverse kinetics which were introduced in version 4.2. It looks to bad to have a fifth bug fix version, 4.4.5, so I have already added a quick enhancement from 5.0 TOB to allow it to be 4.5.0 (an additional 10% in .babylon size). If you provide a blend, I can get to the bottom this. Quote Link to comment Share on other sites More sharing options...
ozRocker Posted May 6, 2016 Author Share Posted May 6, 2016 @JCPalmer if it helps you can have a play with the Blender file I was using http://www.punkoffice.com/downloads/blender_animations.zip Its a 2MB .ZIP with .blend file and .jpg texture JCPalmer 1 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted May 6, 2016 Share Posted May 6, 2016 Grandfather or godfather is fine to me But you did so many great improvements that I could not be the father anymore ! Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted May 9, 2016 Share Posted May 9, 2016 Ok, I found the missing last frame. Basically each action has a range element, which is a 2 element array. I was generating all the frame #'s from a function, whose 2nd argument was an "up to but including" type. Add one, and you get your missing frame. I have also made the gap between animations ranges wider, in addition to reducing the export file size about 10% more. There will now be a gap of at least 5 frames, starting on an even multiple of 10. The exporter now logs more info for each action in: processing action Idle: in[0 - 200], out[0 - 200] processing action Run: in[0 - 15], out[210 - 225] processing action Walk: in[0 - 24], out[230 - 254] I have noticed that whatever you are doing to get the motion capture loaded, there are non-integer frames being generated in the .blend. The ranges are actually: action.frame_range 0.0 - 200.0 action.frame_range 0.0 - 15.199993133544922 action.frame_range 0.0 - 24.799991607666016 FYI, I also listed each frame & none of them is an integer. Now when the export happens, the exporter sets the scene to an integer "frame" in time. Blender interpolates between the 2 closest data points. That is what is in the export. I need to build my own test before I PR. Google drive is https, so I doubt the browser is going to let me modify your playground. You're probably sleeping now. Likely PR will be done by the time you are up. Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted May 9, 2016 Share Posted May 9, 2016 Ok, no file reduction size for .babylon file users. Here is the entire scene on google drive. Still looks good, even though 'Walk' is missing 0.799991607666016 frames. Much better than missing 1.799991607666016 frames as before. PR eminent. Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted May 9, 2016 Share Posted May 9, 2016 Ok, PR in progress. Also noticed that my scene does not have for lack of a better term "fucked up" left foot. Even in the idle action, the foot is wrong. Did I do anything? I am running a version of 2.4 that I built myself from Gulp on May 5th. What is the playground running? I saw something on Matrix.Lerp being wrong. Do not know if this is in my file, but I do have the companion max file, if needed. Quote Link to comment Share on other sites More sharing options...
gryff Posted May 9, 2016 Share Posted May 9, 2016 Quote I have noticed that whatever you are doing to get the motion capture loaded, there are non-integer frames being generated in the .blend. Yes Jeff I noticed that too when I looked at the files. Oz is using some Mixamo animation files - looks like the "free samples" that include an "idle" animation. I have this free sample so I imported it into Blender 2.76 in different two ways. ( A & B in image below.) A: animation loaded with the "frame rate" in Blender set at 24fps. Result the last frame is 200 in the action editor. B: animation loaded with the "frame rate" in Blender set at 30fps. Result the last frame is 250 in the action editor. If I look at this idle animation in the Autodesk FBX Convertor - the last frame is 250. Checking the file oz posted above - it has that "frame rate" value set to 24 which may explain those non-integer frames and why the last frame is 200. cheers, gryff Quote Link to comment Share on other sites More sharing options...
ozRocker Posted May 9, 2016 Author Share Posted May 9, 2016 That's correct. They are standard Mixamo animations. Yep, I left the Blender framerate as the default. I didn't even think of changing it but I can see how that would cause some problems. So there's a fix for me to do. thanks guys! Quote Link to comment Share on other sites More sharing options...
gryff Posted May 10, 2016 Share Posted May 10, 2016 Quote I left the Blender framerate as the default Open your Blender default scene, change that setting to 30fps then go to File -> Save Startup File. It will become the new default. I delete the Cube too and set the light to a Hemi. cheers, gryff JCPalmer, adam and ozRocker 3 Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted May 10, 2016 Share Posted May 10, 2016 Yeah, I should probably change my start up file too. I must deleted that camera, light, & cube a hundred times. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.