Pandora’s Box

By C4RL05

First public example of Papervision 3.

Completely redesigned and rewritten from scratch to take advantage of Flash 8 Image API.

Perspective is simulated by tesselating triangles in the same fashion as the original PlayStation. At last, no more skewing :-)

If you want to do it yourself, you could do far worse than downloading Thomas Pfeiffer (aka kiroukou) wonderful DistortImage class, which works in a similar way.

Coded at Outside Line in London.

Don’t open the box!

5 Responses to “Pandora’s Box”

  1. Andrew Says:

    That is very, very impressive. Are you planning on releasing your code for this engine? Or any plans to sell it?

  2. C4RL05 Says:

    As the current version is still under development, I haven’t figured out how (if) I’m going to distribute it.

    Releasing it as open source would also involve doing some documentation and tutorials, so it won’t happen for a while.

    Also I’m currently using it in a couple of commercial projects that haven’t been published yet. It’s fair that the people that are funding the development, get it first.

  3. Elena Says:

    very nice

  4. Jim Says:

    Good stuff.

    Can’t help to ask a few questions. Will appreciate your reply, the sooner the better.

    How much effort did you put in to write such a 3D engine?
    Would you see the performance will suffer a lot if you have multiple items in the view?
    How much performance gain you can get from Flash 9?

    Thanks.
    Jim

  5. C4RL05 Says:

    I’ve dedicated a lot of time to the development of Papervision, most of it outside working hours. Understanding how 3D translates to 2D was the biggest task. Most of the information I found was either too complex or incomplete. The engine itself is really simple. Just an array with all the objects, and a for loop to render each one.

    Performance depends on both the amount of points/objects and the number of triangles. It can be optimized by dynamically tesselating while rendering.

    Flash 9 execution speed will make all the calculations faster, but rendering time will remain still. Fortunately beginBitmapFill() only takes 10% of the complete rendering loop, so a huge improvement in rendering speed is to be expected.

    C4

Leave a Reply