Papervision Optimization
If you’ve dabbled at all with Papervision yet, you may have already seen small wisps of smoke coming from your processor, as have I. I’m having a love-hate relationship with Flash player. Flash player does not yet live up to the potential that 3D APIs such as Papervision have to offer. I am ready, willing and able to use many of the wonderful features that the Papervision Team has added, such as shaders; but when it comes to practical implementation, I’m always faced with the limitations of Flash player and the processor. To keep us on good working terms, Optimization is key.
I recently took an online course with John Grden of the Papervision Core Team, and added a whole bunch of optimization strategies to my bag of tricks. The class was offered at the Rich Media Institute. John is an awesome teacher, and I highly recommend the class if it comes up again. It’s a lot to follow online, but the modules are available for 30 days after the class. Here are a few helpful strategies that I picked up from John’s course:
- STAGE QUALITY. Set it to Low or even Medium if possible. High will kill the processor.
- MIPMAPPING. Keep your texture width and height divisible by 2 (such as 128/256). Avoid odd numbers or decimals and smoothing comes for free.
- VIEWPORTS. Keep them as small as possible. And do not apply filters to Viewports.
- BITMAPS vs. MOVIEASSETMATERIALS. Use bitmaps if possible. MovieAssetMaterials, even if they are not animated, cost more.
- TIMER. Try using a timer for your render loop. It can save you precious processing power. But it won’t play well with timeline animations on your textures.
- ANIMATION. Set the animation Boolean on MovieAssetMaterials to False when the animation has ended. Keep animated material as small as possible. Non-animated materials may be bigger.
John also included a highly useful FramesRipper class in the source code for the course, which I’ve already found useful for a project. It basically takes a movie clip and turns the frames into bitmaps that are stored in an array. The class includes methods for playing the ripped frames just like you would a timeline. If you have a MovieClip with lots of filter tweens or other elements that are taxing the processor, this class works like a charm. The FramesRipper class alone is well worth the price of admission.
Tags: 3D API, Application programming interface, flash developer, Flash Player, FrameRipper, joe sc, joe schorn, John Grden, Multimedia, Papervision 3D
![Reblog this post [with Zemanta]](http://img.zemanta.com/reblog_e.png?x-id=3ea65f91-33b5-44e8-bc93-2af58d4f8d4d)


February 2nd, 2010 at 6:30 pm
Wonderful blog post! Informational and well written. I think I could learn a thing or two from the way you set up your blog. I have subscribed to your rss feed and bookmarked your blog on delicious. I have a blog about SEO and social media that you are welcome to comment on if you find something that intrigues you.
February 11th, 2010 at 4:46 pm
Thanks Joe – neat stuff!