nulldesign // lars gerckens » 3D Engine Sources + Examples

3D Engine Sources + Examples

About some time ago I started to code my own 3D engine in flash. Derived from a small AS2 project, I challenged myself to built my own flash 3D engine. So I took out my good old Actionscript Animation Book and opened the 3D chapter. Very soon I could move a cube around. A few pages later I learned how to implement simple dynamic lighting. The next challenge was to get texture mapping to work. Since flash still can’t distort images, you need a workaround. After I found these great examples: Seb Lee-Delisle’s flash texture maps and Andre Michelle’s texture examples it was done. Somewhere inbetween I switched to AS3, which was quickly done. Meanwhile Papervision3D became very popular and I thought it didn’t make sense to continue evolving my engine. But since I came so far, I needed to find out how to implement a few effects like depth of field or additive rendering ;)

My engine shouldn’t and doesn’t compete with Papervision3D or Sandy3D, nor it has a very user-friendly API, no stunning effects or animation support, but I learned a lot while building it, understanding 3D to 2D rendering, optimizing the code for a few ms of extra speed (AS3 rocks!) or challenge problems with 3D rotations like gimbal lock and their solutions: quaternions. It’s just another 3D flash engine, at least I can say: I made it! ;)

It’s undocumented, there’s still a lot of work to do and it doesn’t have a cool name , but if you want to play around with it or just take a look how I set up this and that, feel free to download the sources (yes, the 3D ribbon example is included). And I’m always interested in what you think about it, so drop a comment or mail.

09. April 2008 | Posted in 3D, Actionscript, Experiments, Flash 9, Source

21 Comments

  • 1. lwz7512  |  09. April 2008 at 16:58

    Great 3D samples!
    thanks for your share, l like the ribbon and particles , and galaxy sample, it’s so beautifuly!
    A problem make me frustrated, why Flash 3D normally has higher CPU usage, it’s unacceptble.

  • 2. OpenRIA » Blog Arch&hellip  |  09. April 2008 at 17:43

    [...] 这位仁兄看来是做flash游戏开发的,他做了很多flash3D方面的研究和测试,自己也小有成果,虽然他自认比不上PV3D和sandy3d,但是在我看来这些小例子足以能吸引我研究flash3D方面的内容了。虽然目前flash3D对机器负荷太高,但我相信这个问题迟早会解决的。 实例截图: [...]

  • 3. felix  |  09. April 2008 at 18:55

    nice demos. One of the problems with PV3D is that all the features can be overkill and lead to slowdown. The beauty of writing your own engine is that you can make the code as simple as possible.

    I was expecting the images to be clickable? Where’s the 3D ribbon? I made one in PV3d: http://www.airtightinteractive.com/news/?p=99

  • 4. Terry Corbet  |  10. April 2008 at 09:03

    Will you add the depth of field and additive rendering samples to your downloadable sources?

    And, of course, if those advanced demos require any new functionality in the engine library, will you provide the updated codebase?

    Thanks for some really fine work.

  • 5. lars  |  10. April 2008 at 09:42

    These samples are all included in the package and should work out of the box.

  • 6. Don  |  10. April 2008 at 19:55

    hey super sachen, dein Blog adde ich mal zu meinen favorites.
    Ich bin übrigens auch aus HH :)

  • 7. Max  |  11. April 2008 at 18:01

    Eine sehr schöne Leistung. Clean und schnell so wie es sein sollte.

  • 8. Björn Scholl  |  14. April 2008 at 10:31

    Hey Lars, coole Beispiele. Und dann auch noch mit Code … super.

  • 9. let  |  19. April 2008 at 11:55

    Good ^^

  • 10. Nico  |  01. July 2008 at 11:10

    Just one word to say how impressed i am :
    WOW !
    Your 3DEngine rocks man !!!
    Your samples are really great.
    I’m just learning PV3D 2.0 since few days, and to be honest, after having watched your experiments, i think PaperVision’s developers should take a look at your works…

  • 11. Keith Peters  |  11. July 2008 at 15:35

    Nice! Always good to see someone take something you’ve written and go way beyond with it!

  • 12. Seattle Standards - D3FES&hellip  |  25. July 2008 at 08:04

    [...] it one further and have made their Flash visualization an open source download. It’s based on NullDesign’s 3D engine, which is another interesting bit of code to check [...]

  • 13. Patrick  |  07. August 2008 at 20:16

    Very nice engine!
    Did you do any speed comparisons with Papervision3D 2.0?

  • 14. batchass  |  12. August 2008 at 15:49

    Thank you for your amazing work!

  • 15. batchass  |  12. August 2008 at 16:02

    by the way, any MXML example for Flex Builder 3?
    Thanks

  • 16. batchass  |  12. August 2008 at 17:59

    don’t bother about a mxml file, I found…
    are you ok if I adapt it to run into onyx-vj?

  • 17. lars  |  12. August 2008 at 18:20

    Sure, go for it! And show us what you made of it.

  • 18. xos  |  13. September 2008 at 10:00

    hi,
    Have you seen this incredible 3d engine for Flash ?

    http://www.sophie3d.com

  • 19. away4m  |  11. December 2008 at 23:39

    did you plan support fp10 version ?

  • 20. nadous  |  26. January 2009 at 13:05

    Hi, great job with the engine (I’m sick of all the other heavy engine). The only thing the library is lacking is a basic event class and a 3d text renderer. I was wondering when you think you will could interactivity.
    Best…

  • 21. programmieren lernen - GF&hellip  |  29. October 2009 at 22:07

    [...] [...]

Leave a Comment

Required

Required, hidden

Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

Trackback this post  |  Subscribe to the comments via RSS Feed

About

  • nulldesign is the company and showcase site of freelance developer Lars Gerckens who is based in Hamburg, Germany. I'm available for freelance work with focus on Flex, Flash and AIR development. I like to create dynamic user interfaces, cutting edge web experiences and innovative ways to visualize data.

    This site showcases some of my personal work and projects as well as an selection of commercial projects.

    If you are interested in my work or you have any questions, don't hesitate to drop me a line:

  • Profiles: Xing | Linkedin
  • Mail: lars [at] nulldesign [dot] de

Categories

Search