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:

  1. STAGE QUALITY. Set it to Low or even Medium if possible. High will kill the processor.
  2. MIPMAPPING. Keep your texture width and height divisible by 2 (such as 128/256). Avoid odd numbers or decimals and smoothing comes for free.
  3. VIEWPORTS. Keep them as small as possible. And do not apply filters to Viewports.
  4. BITMAPS vs. MOVIEASSETMATERIALS. Use bitmaps if possible. MovieAssetMaterials, even if they are not animated, cost more.
  5. 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.
  6. 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.

Reblog this post [with Zemanta]

Tags: , , , , , , , , ,

2 Responses to “Papervision Optimization”

  1. FloridaSEO Says:

    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.

  2. Steve Timko Says:

    Thanks Joe – neat stuff!

Leave a Reply