Exporters icon indicating copy to clipboard operation
Exporters copied to clipboard

Optimize Animation not really optimizing

Open abolog opened this issue 2 years ago • 3 comments

I'm trying to export a simple animated mesh with few keyframes, but I noticed that the exporter bakes the keyframes for no obvious reason...? Here's a screenshot, I'm using both linear and Bezier, but it kind of doesn't matter: Untitled-1

The Optimized Export, does reduce few keyframes, but there are so many "useless" ones who do no change values. Thanks

abolog avatar Apr 02 '22 16:04 abolog

Thanks for the information.

we will have a look on it. What i can say so far is we are only exporting animation as LINEAR and optimizations are computed On the fly with in house function from frame to frame, which is lead obviously to numerical precision error and wrong "optimization" decision.

Solution are

  • to tag the frame with the type of animation (from MAX/MAYA point of view) and take advantage of this information for optimization.
  • introduce some simple DSP algorithm but this is a non sense here
  • for GLTF take advantage of LINEAR, STEP, CUBICSPLINE interpolation mode.

regards

pandaGaume avatar Apr 03 '22 11:04 pandaGaume

Ok thanks for looking into it, I thought I was doing something wrong.

But what do you mean to tag the frame with the type of animation used? I did set the keyframe to be linear, or you mean something else?

@pandaGaume

abolog avatar Apr 03 '22 11:04 abolog

I'm mean taging the frame into the code, where we do not take the type of animation into account. The frames are processed as timeseries without knowledge of where the sampling is coming from (Linear, Bezier,..). This has the advantage to be generic but has border effect such the one you experienced. related to #1021

pandaGaume avatar Apr 03 '22 12:04 pandaGaume