125000 Triangles & Still Smooth

A few months ago I played with an idea of creating 3D illusion from an image and its depth map. First versions were based on displacement maps (custom implementation in pixel bender) and later I used common 3D engines to transform image into a 3D model. With software rendering I hit fps limit somewhere around 10000 triangles, what is like 70×70 segments per plane. Now if your source image is something like 700×700 pixles, the fragmentation is 10px per segment, that is not enough details for me 🙂 .

Luckily, Adobe introduced Molehill a GPU-accelerated 3D API and I was curious about where the limits of this are. While Away3D already released its molehill version, I have transformed existing 3ddm Away3D version what literally was just like 10 lines of code.

You need Flash Player 11 to view this:

This demo uses 250×250 segments (125000 triangles) and still runs smooth. You can also run it standalone. Textures and depth maps are created with PhotoSculpt. PhotoSculpt software creates photorealistic 3D models and seamless tileable 3D textures.

While both Molehill and Away3D molehill version are still in its prerelease stages, I observed some issues that I had while developing. It seemed like Away3D accepts only texture bitmaps sized at power of two and same size for width and height (64×64, 128×128…). When I tried to use more than 250×250 segments per plane the “buffer is full” exception was thrown. I believe those issues will not be in release versions.

Just a short recap of how to setup your development environment to use molehill:

5 comments so far

  1. […] weeks ago I played with molehill and Away3D engine. Creating 3D scene is straightforward with an engine, but I still wanted to get deeper inside and […]

  2. Ilya Gazman July 16, 2011 15:48


    I been able to see the zombietycoon sample of adobe, but here I only see white screen with only black squere at the right top corner of the screen show statistics and frame rates…

    Any ideas?

    I use win7 64 bit with DVI connection for my screen

  3. Jozef Chúťka July 18, 2011 09:59

    hi Ilya,
    thx for noticing. there has been some difference in stage3D implementation (stage3d.viewport) with latest flash player 11 beta. I have updated the .swf and it is running again. just clear browser cache…

  4. Kag September 27, 2011 12:00


    How can I change the background white color (or have no color at all) on the players of this page:


    Thank you and keep the good work


  5. Jozef Chúťka September 29, 2011 10:25

    hi Kag,
    for most versions you can use wmode transparent, however for the molehill (stage3D) version you can not. to make stage3D available you need to embed into wmode direct. For this cast there is no other choice to change bg color othar than through actionscript

Leave a comment

Please be polite and on topic. Your e-mail will never be published.