Unity3D Tweening performance

Hey, I’ll be short =)
I’m going to compare quickly 3 types of tween animations: built-in Legacy Animation, HOTween and DOTween.
I use 5k objects from prefabs as tweens targets.
Tweens are looped, start by default, have 1 sec length and tweening transform position from (0, 0, 0) to (1.3, 1.4, 1.5).

Used software info:
– Unity 4.6 Beta 16.
– HOTween v1.3.350.
– DOTween 0.7.310 Alpha
– Unity profiler with ‘Deep Profile’ enabled.

Initialization resources usage

Let’s compare initialization time and GC allocations first.
Time + GC Allocation + real memory allocation. Time is frame total time. Memory usage includes memory used by objects.

Animation
Frame time: ~166.7 ms (from 3 samples)
GC Allocations: 97.8 KB
Total memory usage: ~20.07 MB (from 3 samples)
Frames to initialize: 1

HOTWeen
Frame time: ~268.68 ms (from 3 samples) + ~55.62 ms (from 3 samples) for second frame
GC Allocations: 4293 KB + 1.3 KB for second frame
Total memory usage: ~25.1 MB (from 3 samples)
Frames to initialize: 2

DOTween
Frame time: 122.86 ms (from 3 samples)
GC Allocations: 1800 KB (may be kept away from GC using internal pooling)
Total memory usage: ~10 MB (from 3 samples)
Frames to initialize: 1

Resources usage per frame

Now tweening performance, allocations per frame (excluding constant Unity-releated allocators) and total memory usage while running tweens (memory usage increases for a while after initialization).
Time is frame total time.

Animation
Frame time: 12-13 ms
GC Allocations: 0 B

HOTween
Frame time: 36-40 ms
GC Allocations: 420 B – 672 B (sad face here)

DOTween
Frame time: 9 ms
GC Allocations: 0 B

Brand new DOTween gets the best Unity tweening solution award from me!
And it’s free, very flexible, user-friendly and has a great author. It definitely desires donation!

Grab messy benchmark sources (should be compatible with Unity 4.5) here.

Found a typo? Please, highlight it and press Shift + Enter or click here to inform me!

Share Button

Efficient Adobe Flash Professional using

Working with Adobe Flash Professional you should consider about performance and culture of the content you’re creating.
After some docs reading and co-workers listening, I came to this: I should collect and keep most common and useful “authoring-in-Flash Pro” rules in one place to help with efficient content creating. To make your knowledge of this topic even deeper – consider reading completely all links at the end of this post.
These rules will be useful for the Flash Animators and Flash Designers first of all, developers should know some rules too though.

Completely compatible with Flash Pro CS5.5 and not completely with earlier versions.

Continue reading

Found a typo? Please, highlight it and press Shift + Enter or click here to inform me!

Share Button

Inverting animation in the Alternativa3D

Hi! If you wish to reverse (play from the end to the beginning) some of your animations in the Alternativa3D engine, you could try to set the AnimationClip‘s property speed to the negative value, but it could be harmful in most cases and don’t officially supported.

Unfortunately, there is no any information or suggests about inverting animations like so on the public yet and nothing about it in the official documentation. I think, current engine build (7.7) have no lightweight native implementation of this functionality. It could be nice to see something like boolean reverse property at the AnimationClip class, isn’t it? Bot there is nothing similar yet =(

So, with great tip from the Vladimir Babushkin (about rebuilding animation by keyframes with reversed time), I came to this piece of code:
Continue reading

Found a typo? Please, highlight it and press Shift + Enter or click here to inform me!

Share Button

HTML5 IDE

Recently I saw very nice IDE, designed for the HTML5 in the beta stage.
You can work with vector graphics, timeline-based animations, and more.
It’s a Radi!

Radi HTML5 IDE

Check out some examples:
canvas
video

Found a typo? Please, highlight it and press Shift + Enter or click here to inform me!

Share Button