Tweener vs. TweenLite / TweenMax

This should be basic, but I still want to express my love for it: Nowadays, unless it’s small or especially detailed stuff, most of the animation I show is scripted and I suppose non of the more advanced websites around could do without. Flash’s internal Tween-Class has been around for a few years, but it’s rather cumbersome to use and not exactly fast.

Two alternative tweening-engines are widely popular: TweenLite and Tweener, with Tweener being the by far most mentioned one. Both are extremely similar, though. To e.g. set a movieclips alpha to 0 in 2 seconds, you’d write:

TweenLite.to(myMovieClip, 2, {alpha:0}); // or:
Tweener.addTween(myMovieClip, {time:2, alpha:0});

The differences are so small, that, even in larger projects, it should be possible to switch between both within minutes. If it were only a matter of preference, I’d choose Tweener because of it’s slightly nicer syntax – but TweenLite’s speed is superior by far. Their speed test shows it quite clearly, but even in rather simple environments where I thought performance was no issue, when using Tweener, I’ve continuously gotten to dead ends I just couldn’t understand and which were solved instantly, when trying the same with TweenLite.

And one of the greatest functions in recent history (at least for me) is TweenLite’s delayedCall. As the name suggests it delays the calling of a function; which is absolutely essential, when scripting animation – and a lot less messy than using the usual onComplete parameter. I really couldn’t imagine working without it anymore. So show TweenLite some love! :)

Away3D: Pixel Precision / Pixel Perfect display?

I’ve taken a look at Away3D again, because I had a problem in PV3D, which was so stupid I couldn’t believe that it could actually be a problem. However, as expected, Away3D isn’t exactly free of problems either: If you place 3D objects on a website it might be necessary to display them precisely 1:1, without distortion. That’s especially important if I want to place text or small bitmaps on the objects, as e.g seen on the temporary TCM splash page. In Papervision3D the setting is:

Object.z = Math.round((camera.zoom * camera.focus) -Math.abs(camera.z))
           + Object.depth/2; // take or add 0.5 if it's still blurred

In Away3D the major solution is to place the surface 900 pixels away from the camera, when using default camera. Why 900? I have no clue, but who cares, it won’t persist through changes of the camera anyway. Even worse, it’s not even giving proper results… I’ve spent quite a while testing it and there’s always artifacts and distortions:

I know the image isn’t friendly to the eyes, but it shows the problem quite clearly. The top right one is the original that I used as a material. Weirdly, the bottom left pixel corner is cut and one pixel line in the middle of the plane is duplicated horizontally and vertically as soon as you place it on an object (a cube, in this case). Adding segments or turning on precision doesn’t change anything. Adding / subtracting 0.5 from the coordinates shows parts of the cut corners, but the opposite sides get blurry. Adding smoothing to the material, as some suggested, isn’t a solution either. I suppose this isn’t a mere problem of not having tried enough, because there were others who had this problem before, with no solution. Maybe it only works for planes and not cubes? Well, at least up there’s the setting to get it almost correct.

I’ve quickly checked Hidden Heroes, which was made with Away3D, to see if those ingenious guys fromGGH have found a solution… but it seems that they’re also just switching between blurred and distorted 3D-Planes and normal 2D MovieClips.

Meh. I’ll keep looking.

Agency Website

In the meantime we’ve relaunched the website of the agency I currently work for. Looking back, it feels as if it was more difficult to convince people to do things this way or that way, than it was to actually build it (which is me, exaggerating (though only a bit)).

I like that we’ve managed to get different disciplines work together – flash, 3d and motion – which definitely made the website a lot better than any of us could have done it alone. But that having more people leads to better results should be true for almost anything. Well, as long as there’s either a common goal or someone to take the lead, though I don’t want to get too philosophic here :p

This is, by the way, not the first try: There was a version before that, which suffered from the same problemsI described earlier and hence never saw the light of day. It was nice and all, but it lacked spirit. Things really can’t be good if you only make them big and abundant. Having a distinctive look and story really made things a whole lot better.

I wonder if it’s good enough to become a sotd, but probably not the way it is right now. There’s still quite a few rough edges and there were too many political decisions involved for me to be totally convinced. Things could have been crisper and overall better and more well-rounded than they are right now… I might convince my guys and girls to produce an english version of it, one of these days, with a little more creative freedom and more attention to the little, yet important details…

Papervision3D vs. Away3D – Part 2: Well, maybe not.

Meh, I gave up on my idea of switching to Away 3D, mainly because it’s stupid. While it would certainly make sense considering how papervision is most likely dead, Away3D is probably not that much more productive and better.

Considering how hard it has already been to figure out things like 2D/3D projection, dynamic materials and the insanely god damn uber-annoying animated dae models – besides countless mathematical problems – it would be a ton of wasted effort. I suppose there are solutions for of those most problems, but finding them is probably even more of a royal pain than it was to find them for Papervision3D. I don’t really understand why, but in general there seems to be a bit less blogs and tutorials around and since Away3D uses an archaic mailing list, there’s tons of hardly usable duplicates of every thread. And reaching dead ends means that you have to ask the question yourself, possibly waiting for several days before you get an answer.

While it would certainly make sense on the long run, the idea of having to figure all of these things out AGAIN, before I can continue with even the most basic tasks, completely killed my mood for months. So I’ll better continue with what I have, keep up the speed and maybe consider changing engines once I’m done. Which would probably be best, because molehill is at the horizon and will most likely change everything anyway…

Away3D: First steps

After a day or so, Away3D turns out to be quite a bit harder to get into than Papervision3D, mainly due to the lack of proper documentation.

The support forums are more of a mailing-list, with a bad searching function and very hard to navigate. Google also only seldomly gives proper results for Away3D problems, one reason being that the mailing-list is mirrored several times by different services, which kinda spams the search results.

And often enough, even if you find tutorials, they’re hopelessly outdated. The strong part of Away3D, its frequent updates, is also one of its larger problems, as methods are replaced frequently with no one documenting their use properly (or at all). Whatever problems you’ve managed to solve when using Papervision3D, Away3D has new ones in store for you…

What’s comparable is the fact that they have a book, in this case “The Essential Guide to 3D in Flash” (quite snotty compared to PV3D’s “Papervision3D Essentials”, haha). I’ll look into it.