PaperVision3D+ ActionScript3==funtime…

barbieshanghaiIt’s been a while since I had done any decent flash/Actionscript programming. For some reason I had the feeling that nothing was really changing for the last few years. I was so wrong. I have been in a coma while some talented brains have been plotting and building 3D engines that actually work under (the not so optimized) flash player.

So I’m back at it with a papervision3d project for Barbie Shanghai‘s website.
What seemed simple in the first glance was actually quite challenging. The site was designed with cover flow in mind. The problem with the design is that its a pseudo 3D scene, its not a mathematically accurate perspective. The solution was to create an individual Viewport3D scene for each object in the movie. For the movement on the y axis I am actually tweening the whole viewport of each object on the stage. For performance I only render the Viewport3D for each floor only when its changing in size or animating.

I used the Tweener package for all the tweens. I needed to tween the ColorMaterial’s fillColor. So I created a package based on how tweener splits the color hex value. Here is the code for the package: – Papervision3D ColorMaterial property for Tweener. To use it you must call PaperVisionColorMaterialProperty.init(); somewhere in you code.

If you don’t know what PaperVision3D is about, check the following links:
Papervision3D – The source.
ROXIC  – Nice “fake” 3D, notice that the spares are not real 3D objects.
MR-doob – This guy has really mad experiments going on in his lab.

About this entry