Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Neikke on June 04, 2019, 04:19:06 AM

Title: What's more expensive? iTween animations or baked FBX animations?
Post by: Neikke on June 04, 2019, 04:19:06 AM
Hi,

since I'm aiming at mobile platforms, I was wondering which way would be less expensive performance-wise: having a few Itween simple animations (move, rotate) or playing baked animations stored in FBX?

Let's say I have lots of simple static Enemy objects which I want to quickly kick out from the scene on collision with player. Of course I could animate those enemy objects making simple animation in Max, export it in FBX and then play it on collision with player, or I could basically achieve the same result having a few iTween actions (Move Add, Rotate by, Scale etc) in one PlayMaker FSM placed on that enemy object. But what would be your recommendation for mobile platforms?

These collisions with player will happen let's say once in 5 or 10 second period. Thanks in advance!
Title: Re: What's more expensive? iTween animations or baked FBX animations?
Post by: daniellogin on June 04, 2019, 05:14:16 AM
I would guess that the iTween would be more expensive, but that may not actually matter.

Maybe if it's not much work for you to do, set up a quick test where you put say 100 objects down which you kick out one way and then the other. Like set up a button press FSM which activates the effect and look at your stats. Maybe set up a string of 3 groups staggered so the effect is felt over a few seconds.

This would work better though if the test is done in a good approximation of what the rest of your game performance would be like. No point testing in an empty world if you will be playing in a 1 trillion triangles drawn map, etc.
Title: Re: What's more expensive? iTween animations or baked FBX animations?
Post by: Neikke on June 04, 2019, 10:01:37 AM
Yeah may be having some test will help figure this out. Was just wondering if anybody had such experience and knows some bottlenecks in regards to mobile platforms specifically. Thanks!
Title: Re: What's more expensive? iTween animations or baked FBX animations?
Post by: djaydino on June 04, 2019, 05:43:05 PM
Hi.
You should try HOTween or DOTween as itween is outdated and slow.
Title: Re: What's more expensive? iTween animations or baked FBX animations?
Post by: jeanfabre on June 05, 2019, 07:15:01 AM
Hi,

 I would not bet on any one being better than the other, in order to execute an animation, you need some code to parse the animation data and apply it, very much like how tweening works, so It is very likely similar in performances.

my advice is to start with what is the most intuitive for you and see, then you can start optimizing if you can spot some issues using the profiler.

 Bye,

 Jean
Title: Re: What's more expensive? iTween animations or baked FBX animations?
Post by: brendang on June 07, 2019, 05:42:00 PM
Seems like this 'which tweening' issue has lingered for quite some time.  Heard a rumor last year that there would be naitve tween solutions available.  iTween is too slow, and now the others are no better?  The guidance here is fairly weak... no offence, but is there recommended solution for simple tween type animations?
Title: Re: What's more expensive? iTween animations or baked FBX animations?
Post by: jeanfabre on June 12, 2019, 07:19:12 AM
Hi,
 
 Yes, tweening is coming in future releases of PlayMaker, you can access them already: https://hutonggames.fogbugz.com/f/page?W1714


As for what tweening to use, Dotween would be the best one I think:

https://assetstore.unity.com/packages/tools/visual-scripting/playmaker-actions-for-dotween-by-doozy-49222

let me know how it goes, I never used it myself.

 Bye,

 Jean
Title: Re: What's more expensive? iTween animations or baked FBX animations?
Post by: Neikke on June 12, 2019, 08:19:43 AM
Hey thanks for the heads-up guys. DOTween definitely looks good!