0
$\begingroup$

Im creating animations in Blender (2.77) to export the model into FBX file to read it later using Assimp library in c++ to do calculate interpolations while run-time, but the problem is I can't understand the proper way to, or better to say, NOT to export interpolated data, I need just key translations and rotations. I found one way to do that - to use Key-> Interpolation Mode->Constant, it exports the keys the way I want to BUT the time value retrieved is quite wrong and doesnt match the timeline at all, and I need exact time (ticks) as it is in Blender for my animation code. Is there any ways to make it works, by ways I mean - or straight option to create animations without interpolations exported, or keep the correct time ticks while exporting the model with constant interpolation mode? Thanks for any tips :)

$\endgroup$
  • $\begingroup$ Given that the keys are coming out correctly I'd guess that the problem is related to frame rate rather than interpolation. $\endgroup$ – Aoradon Jul 11 '17 at 13:09
  • $\begingroup$ thanks for the guess, what do you mean by frame rate? Do you mean ticks per second parameter of the animation in Blender? $\endgroup$ – auraxarr Jul 11 '17 at 17:37
  • $\begingroup$ Each "tick" in the timeline is a frame. FBX files store frame rate on export. Try changing the frame rate. $\endgroup$ – Aoradon Jul 11 '17 at 17:41
  • $\begingroup$ framerate didnt seem to change anything at all - I apply screenshots displaying a bone animation progress and its time reflection in the Visual Studio - all data is framed in red, in VS screenshot the ticks are 4 (why?) - at 15, 16 , 47 and 48 frames. In Blender its fixed at 0, 16 and 48. Can it be an exporting issue? If it is so I just go some other direction then :) link link $\endgroup$ – auraxarr Jul 11 '17 at 18:19
  • $\begingroup$ the thing is also if Im using Bezier or Linear all time ticks are correct. $\endgroup$ – auraxarr Jul 11 '17 at 18:22
1
$\begingroup$

I seem to find out this time values order - while exporting constantly interpolated animation every framekey is presented as a pair, the first one's tick is -1 by number then the actual frame's tick in dope sheet and it contains the translation and rotation BEFORE the actual frame tick value, while the second data in this framekyes pair shows actual trnslation and rotation at the actual time in dope shit, to clarify: 3 actual framekeys with constant interpolation: Assimp gives 6 stored keys, first couple is, lets say, 8th tick first and 9th tick second, this first keys means BEFORE 8th time value all previous ticks the model has translation and rotation it contains. The second one, that shows 9th tick is actual framekey change...Following this the next pair will contain, lets say, 18th and 19th time ticks, and that means that between 9th and 18th tick the bone had stable translation and rotation while at the 19th tick its going to change again. Every second framekey data will repeat every first framekey data in the next couple - this is just an interval where bones were not transfromed because of constant interpolation. Every second is actual translation/rotation of the bone. Just in case someone faces the same strange at first sight Assimp FBX loader behavior :)

$\endgroup$

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.