tihomirov Posted September 25, 2015 Share Posted September 25, 2015 Babylon 3ds max exporter parses animation curves in a strange way. It ignores key frames and somewhat simplifies the curve. That is why some animations are exported totally wrong. It is not a big problem when you play the whole animation, but when you loop a part of it you can see the glitches (drifting, absence of animation with small value changes). I'm saying that this is exporter problem because I've opened exported .babylon file and found a strange animation data: my animation range is [300-450] but there is nothing in .babylon file about this range. There are frames before and after. That causes my object to drift from wrong value to another wrong value. I really need to find out a way to get all frames exported, or at least to set the distance between them. And remove the "simplification" that ignores animation with small values.Please, help! Quote Link to comment Share on other sites More sharing options...
reddozen Posted September 25, 2015 Share Posted September 25, 2015 wow... i'll need this too as my main character model has 300 animations in a single animation divided by keyframe... Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 25, 2015 Share Posted September 25, 2015 This should work..As we already use it widely...Luuacro will have a look very soon Quote Link to comment Share on other sites More sharing options...
julien-moreau Posted September 28, 2015 Share Posted September 28, 2015 Hello tihomirov Can you send me an example of your curve in a 3ds Max project file ?This should work but I would like to compare with a 3ds Max project of Michel Rousseau Thanks Quote Link to comment Share on other sites More sharing options...
julien-moreau Posted September 28, 2015 Share Posted September 28, 2015 Before, what tool are you using to create your animations and what type of controller are you using to build your animations ? Quote Link to comment Share on other sites More sharing options...
tihomirov Posted September 28, 2015 Author Share Posted September 28, 2015 Hi Luaacro! Hello tihomirov Can you send me an example of your curve in a 3ds Max project file ?This should work but I would like to compare with a 3ds Max project of Michel Rousseau Thanks I will send you my scene 12 hours later (when I'll be at work). Before, what tool are you using to create your animations and what type of controller are you using to build your animations ?The Rotation Controller. And as far as I remember all other problematic animations are also Rotation Controllers, but I'm not sure, because they are a part of a complex animation with bones and IK and I never dug that deep. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 28, 2015 Share Posted September 28, 2015 Adding @romanichel as he wrote this part as well Quote Link to comment Share on other sites More sharing options...
tihomirov Posted September 29, 2015 Author Share Posted September 29, 2015 This is my MAX scene. I've set the animation to auto loop so you can instantly export & run to see what I was talking about.animation_with_loop.zip Quote Link to comment Share on other sites More sharing options...
julien-moreau Posted September 29, 2015 Share Posted September 29, 2015 I tested the project with 3ds Max 2016 and it worked well.I just clicked on "export & run" and I got the same behavior in 3ds Max and babylon. Do you have some code to show us where you run the animations of your skeletons ? Quote Link to comment Share on other sites More sharing options...
tihomirov Posted September 30, 2015 Author Share Posted September 30, 2015 Can you send me the .babylon file, please? Quote Link to comment Share on other sites More sharing options...
julien-moreau Posted September 30, 2015 Share Posted September 30, 2015 Here is the file you can drag'n'drop in the sandbox : http://reath.free.fr/testanim.babylonBy hoping it will work as you want Quote Link to comment Share on other sites More sharing options...
tihomirov Posted October 1, 2015 Author Share Posted October 1, 2015 Your .babylon file is just the same as mine. So Exporter works the same for both of us But after putting this .babylon file in sandbox I realized that it plays the whole animation. But what I was saying is that when you play the whole animation - you can't notice problems. But if you will loop middle part of animation (150-225) you will see it.Let me be more specific. Here is part of an exported .babylon file:"name":"Ship","position":[0.0,0.0,0.0],"rotation":[0.0,0.0,0.0],"scaling":[1.0,1.0,1.0],"rotationQuaternion":[-0.0349,0.0,0.0,-0.9994],"actions":null,"animations":[{"name":"rotationQuaternion animation","property":"rotationQuaternion","dataType":2,"loopBehavior":1,"framePerSecond":60,"keys":[{"frame":0,"values":[-0.0349,0.0,0.0,-0.9994]},{"frame":1,"values":[-0.0396,0.0,0.0,-0.9992]},{"frame":14,"values":[-0.0867,0.0,0.0,-0.9962]},{"frame":27,"values":[-0.1065,0.0,0.0,-0.9943]},{"frame":36,"values":[-0.1014,0.0,0.0,-0.9948]},{"frame":56,"values":[-0.0439,0.0,0.0,-0.999]},{"frame":71,"values":[-0.0198,0.0,0.0,-0.9998]},{"frame":350,"values":[-0.0349,0.0,0.0,-0.9994]},{"frame":351,"values":[-0.038,0.0,0.0,-0.9993]},{"frame":384,"values":[-0.1041,0.0,0.0,-0.9946]},{"frame":417,"values":[-0.1031,0.0,0.0,-0.9947]},{"frame":450,"values":[-0.0349,0.0,0.0,-0.9994]}]}] It describes the animation of "Ship" object.You can see, that there is a huge gap between frame 71 and frame 350. But if you check the next image, which represents the actual Ship animation in 3ds max, you will see that there are key frames in that span. And animation is not linear. And if you loop from frame 150 to frame 225 you will get wrong animation in Babylon. Because there is no info in exported .babylon file about this range. Maybe I've send the wrong version of .max file last time. I'm attaching it again. It should have animation looped from 150 frame to 225 frame.animation_with_loop.zip Quote Link to comment Share on other sites More sharing options...
tihomirov Posted October 5, 2015 Author Share Posted October 5, 2015 Scene saved for 3ds Max 2013animation_with_loop.zip Quote Link to comment Share on other sites More sharing options...
julien-moreau Posted October 5, 2015 Share Posted October 5, 2015 I updated the file you can download using the previous link and drag'n'drop in the sandbox.Can you confirm that the problem still happens ? I tried to compare and I didn't see the difference. Am I weird ? Quote Link to comment Share on other sites More sharing options...
tihomirov Posted October 5, 2015 Author Share Posted October 5, 2015 Great! Now the animation is looped from frame 150 to 225. Can't you see that it is not smooth? For example you can look at lower right tentacle. It jumps. The ship is also jumping after slowly leaning backwards. But you can check the .max file and see that frames 150 and 225 are identical. I've showed you the part of exported file and mentioned that there is no information about animation between frames 71 and 350 in ship animation. This is the cause of bad animation in BabylonJS. Can you tell me, why there is no frames between 71 and 350 in .babylon file? I expect this question will help you understand what I'm talking about better Thank you for your patience! Quote Link to comment Share on other sites More sharing options...
julien-moreau Posted October 6, 2015 Share Posted October 6, 2015 Okay I understand the problem!I followed some advices and I'm updating the 3ds Max exporter. I uploaded a new version of the animation for the ship (between 71 and 350). Can you confirm the animations of the ship ? Quote Link to comment Share on other sites More sharing options...
tihomirov Posted October 7, 2015 Author Share Posted October 7, 2015 There are a lot of new frames in .babylon! Animation is much smoother, but i still can see that it is jumping. I think that is because keyframes (150, 255 etc) are not in .babylon file. Maybe you can add a babylon param to the object that will indicate the step (in frames) of exported baked animation? For example every 10th or 5th frame. Then everybody will be able to create loops between frames that are multiplication of this param. It will solve this problem once and for all! Quote Link to comment Share on other sites More sharing options...
DezOnlyOne Posted October 15, 2015 Share Posted October 15, 2015 Has there been any change on this issue? We updated to the new exporter and we are having the same exact problem Quote Link to comment Share on other sites More sharing options...
julien-moreau Posted October 16, 2015 Share Posted October 16, 2015 To disable the problem, you should use the lastest version (as you are doing) and check the checkbox "Do not optimize animations" in the Babylon.js scene properties in 3ds Max Quote Link to comment Share on other sites More sharing options...
DezOnlyOne Posted October 19, 2015 Share Posted October 19, 2015 I think I am still having issue with interpolating between gaps of missing frames from the export. As I look at the babylon file there are quite a lot of missing frames, and I am getting weird jumps during animation playback. Is there a way to ensure that every single frame is exported? Here is a babylonjs playground example. focus the camera on the face and press the "P" key to see the animation. http://www.babylonjs...d.com/#3I5MK#10 I also have the max file if it helps. It is very large though. 250+ MB http://protest.jht.c...rlLeftMCAM1.max Thanks julien-moreau 1 Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted October 19, 2015 Share Posted October 19, 2015 Sorry to high jack this thread (go gators!), but I am actually interested in a mechanism for removing frames. The mocaps I am looking at are recorded at 120 fps, I wish to remove as many frames as possible which you could derive dynamically using interpolation at what ever the scene ends up running at. I figure I am going to have to have some kind of fuzzy logic tolerance to get a big reduction. Is the 3ds max exporter actively doing this? I am not that familiar with C#, but if it is, where in the source is it being done? Thanks! Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 19, 2015 Share Posted October 19, 2015 The 3dsmax exporter try to remove frame when a frame is equal to the previous. It also try to use linear approx when possible (but sometimes it fails ) Quote Link to comment Share on other sites More sharing options...
DezOnlyOne Posted October 19, 2015 Share Posted October 19, 2015 Does the Blender exporter do this? Not that I can work with Blender. Just asking for info Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 19, 2015 Share Posted October 19, 2015 Yep, this is the basic way of working of blender exporterI mean: Blender exports all frame Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted October 19, 2015 Share Posted October 19, 2015 No, the blender exporter does not does not remove frames, but for non-skeleton animations (position, rotation, & scaling animations of meshes / cameras / lights), I believe the user does not have to include every frame. I was not planning to run the mocap files through Blender, but read them directly in JS. Theoretically, if it was in JS / TS, then it could be available to irrespective of origin, if broken out. Am debating whether to have a toTypescript() method, which would allow you to both convert the mocap to bone animation & strip frames "offline" to the actual real time performance. 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.