Set range for every animation take separately !?


(Ventsi) #1

Hi, i just registered and did try to upload an FBX file exported from blender 2.78. It contains a few animations (around 10). The upload was successful and it is looking really great. However i struggle with one thing. I can not have the proper animation range for every take ( one animation per take )... Was searching the forums for a while but not seeing anything regarding my question.

As far as i understand, if you want to showcase animations the best way currently is to export them into a single Take... !? Is this true or i can set key range per take... This will be the perfect solution. I couldn't find any option for setting ranges... !

So currently what is the best way to upload an object to showcase all of its animations... some of which loopable !?


(Waleguene) #2

Hi @ventsi,

I don't have a strong answer for the "one single take" versus "separated animations". Most of the time, users are limited by the FBX exporter (for example 3dsMax doesn't export more than one take in FBX, at least before version 2018, now it seems to allow this). Most of the models you will see with several animations are coming from .blend files (yeah, Blender files are supported, so you could directly upload your .blend file instead of exporting into FBX).

About the animation range issue, could you give more details?
When processing .blend files, animation duration is defined by the "frame_range" property of the Blender action.
When you export an animated model in FBX, If I'm right, the exporter generates one animation for each action, but I don't know if it's using the action.frame_range property or if it uses the Scene.frame_start -/ Scene.frame_end.

If you can share a simple blend file having a wrong range between Blender and FBX/Sketchfab, I could take a look and provide you a better answer :slight_smile:


(Ventsi) #3

Hi, here is the character i uploaded

The question i am having is not regarding to any specific issue i am having but it is a more common thing i guess !

If you preview the "Roar" animation or may be "Walk In Place" or "Run In Place" they do not loop properly and i would like to have them loop seamlessly.

I think i know why is this happen ! In Blender sometimes ( like in my case ) when you animate you can have some keys outside the actual range you need in case you offset some keys to make the animation look better. The point is now that Blender exports the take ( i guess so ) in a way that all the keys are included in it. I always could go and create start and end key for the take, disable the cycle feature of the animation curves and get rid of all the keys outside the range (for every take) but that way it would be hard to go back and make changes to animation. I could copy the animation takes and clamp the range to all of them. But let's say you make some changes to animations you have to repeat the process for every take in order to export it with the proper range. I thought if i go and add all the takes in the NLA editor and set range for every take this might force the FBX exporter in blender to export the takes with the range i want but this did not work (Will try to upload the .blend file itself to see if works) !

If we can have an option in the 3D settings to set start and end range per take ( if there is no any other way in Blender ) will be awesome... You will not waste time to copy and fix the takes before you export them!

So i guess i need to know if you recommend what to do in Blender to export with range for every take in Blender even if i have keys outside it !?

I hope i managed to explain well enough ! Thank You !


(Waleguene) #4

Yeah thanks, it's more clear now :slight_smile:

So your point is that you have some keyframes outside of Blender's timeline range. You expect your animation to not include those keyframes but they are included because the export code probably defines action length from the interval between first and last keyframes, and not the timeline range.

On Sketchfab, you cannot edit your animations' duration, and uploading the Blend file will not fix the issue since we use the same logic to determine animation length (action.frame_range).

Bender doesn"t to offer any option for this when exporting in FBX, so the only solution I have in mind for now would be to have a simple scripts that "temporarily" removes these out-of-range keyframes for export and then restore them.

Just curious, what's the purpose of having these keyframes ?


(Ventsi) #5

Hi, yes you got it right.

Yeah there isn't a way :slight_smile: Would be a time saver to have that option though (just in my opinion, well not for all the users).

Let's say you do an in place walk or run cycle or an animated creature tail, sometimes it is just happen to have some keys outside the animation range just because you set the animation curves to "infinity" in Maya or add the "Cycles" modifier to a curve in Blender which makes the curve to repeat to infinity. If you offset the whole curve to achieve some drag/overlapping, the keys would go outside the range. Yes i could go and add keys inside the range but the whole idea is that often you need to go back and change or polish animation clips. In this case you have to export one by one all the actions with the proper range set, and then import them one by one in a new blender project in order to have animation actions with proper range ( this is what i have done in order to have proper animations in sketchfab ). Now when i go back an polish or change some animations i will have to export the takes and do that part of the process again before update a model to sketchfab. Not always when you upload a model for first time it will have the best animations.

Another example for having keys out side the range is if you have a walk cycle and animate the one leg only, you can just copy all the curves to the other leg and then in the graph editor you offset the keys in order to offset the other leg (because it moves exactly to the one from which we copied the curves), this is much faster way of animating a walk cycle and i use it but i very often decide that i need to polish something and if i want to have the updated animations in sketchfab i have to export and import in new project and compose them again.

If i had the option to set a range per animation take in sketchfab i will just export the FBX after i am done with animations and when i re-upload it to sketchfab it will be updated without the need to go through this tedious process in blender.

The Unity engine has exactly the option that i am pointing - you can set the range from the take you want to use !

I would guess that many users would benefit from such option in sketchfab.
If you consider adding such an option would be awesome... and may be ask the users if they would need it !

Thanks. Currently i found the way to prepare an animated model for sketchfab. Thank You !