Home / Project & Story

3D in Flash: Papervision, Away3D and Sandy3D

 

Our favorite weapon of choice to power 3D in Coobico: Sandy3D

This entry might be getting a bit technical (doh!), but let me share a bit about our favorite weapon of choice to power 3D in Coobico:

3D in Flash had remained in relative obscurity until last year, because Actionscript was just not fast enough to power more than some bland, unimpressive 3D-scenes. However, with the advent of AS3, Flash made a major leap. Around February 2008, the three most ubiquitous open-source 3D-engines Papervision, Away3D and Sandy3D published their recent installments, which lead to an explosion in the usage of 3D in Flash. For Coobico, I made an in-depth assessment of these three engines shortly thereafter, to decide which one would be most suitable to our creative vision and our production pipeline from 3D to Flash. 

Sandy3D is the oldest of the frameworks, one of its branches is even available for AS2. Papervision, being a bit younger, was available in its effects- and “Great White”-branches up until now, but it was announced that both branches will be merged into Great White shortly. Away3D originally was a Papervision-derivative, but made some impressive improvements on its own after breaking with Papervision.

In fact, Away3D offers one of the most powerful packages of the three: it comes with a lot of features, shaders and the most different types of parsers (notably an .obj-parser), and does a very good job with z-sorting. However, I found various in-depth tasks (like re-assigning textures on the fly) a bit counter-intuitive to me. Talking about textures, phong-shading of rectangular shapes can lead to funny results, due to triangulation issues (i.e. one polygon of a shape is shaded while the other one stays unshaded). The biggest let-down of Away3D might be the lack of documentation (as usual). By the time I was checking it out, it was hard to find any documentation for any of the in-depth features—I finally decided against Away3D, cause there was not enough time to rummage through tons of undocumented classes, just to find out what they might actually be doing. Please notice though, that this is already a few months ago: if documentation of Away3D has improved in the meantime, I would highly recommend it, if you want to get into 3D.

Papervision, even though having earned a good reputation with a large community of developers, was a bit of a let-down to me in the end. It was lacking a few of the standard-features of the other two competitors, namely native support of 3D-sound and 2D-sprites. Phong-shading had the same problems as Away3D. Again, this was a few months ago, and I didn’t checked back in the meantime. It might very well be that PV3D has already implemented more features in the meantime.

Sandy, last but not least, is not as hyped as Away and PV3D, but its thorough set of features and rendering-capabilities is on par with Away3D (even though it admittedly needs to improve its z-sorting). All of its packages are very well documented, with quite a few tutorials available, because this engine is around just for such a long time already. Maybe this is also a reason why I felt that understanding Sandy was most easy and intuitive. Then there is a neat feature to turn down the quality of shapes from triangular to rectangular, which eliminates shading-artefacts of boxes, very important for Coobico.

Ultimately, I decided that Coobico would be developed with Sandy, because it felt most compatible. There are other solutions like Sharikura, which seemingly encompasses all other engines, but which is not yet publicly available, and Alternativa, a commercial solution, which yet has to prove if it can handle very large scenes with animations. 

This list is by no means exhaustive. Please feel free to leave a comment if you know another noteworthy 3D-engine.

Back to the main page

Comments & Trackbacks

Brian Davis: 28.07.2008,  11:58 PM

I probably haven’t spent as much time as you reviewing these, but here is my opinion thus far.

Away 3D: primarily uses Objects to pass variables to their classes, which makes it easy for me to see and modify their examples.
(This has it’s draw backs as well)
if i were to change a camera object into a MovieClip, you would normally expect this error:

1067: Implicit coercion of a value of type flash.display:MovieClip to an unrelated type away3d.cameras:Camera3D.

but the compiler cannot catch Objects, as they are not Data Typed.  So we get this far less descriptive error:

TypeError: Error #1006: lookAt is not a function.
  at Intermediate_ZSortCorrection_fla::MainTimeline/initObjects()
  at Intermediate_ZSortCorrection_fla::MainTimeline/init()
  at Intermediate_ZSortCorrection_fla::MainTimeline/frame1()


However i cannot ignore the quality of the products display of 3D objects, particularly when hitting other objects or the camera, it handles all “clipping issues” perfectly, as far as i have seen.
http://www.flashkeep.com/away1.swf

I could use a good example of how to get a tiled texture though
http://www.closier.nl/playground/tiling.html

Papervision :
has disappointed me in many aspects so far.
Clipping issues are a huge problem here.
even when objects are not passing through each other, faces disapear when they are even close…  plus camera clipping is terrible.

when you make a cube, you give it a width, height, and depth, and you have access to none of these properties from that point forward.


Sandy:
I have tried to get the sandy examples up and running even from the svn location…  i receive various errors, but its probably more my fault than theirs, and perhaps i should be using flex with their product anyway.

I have looked through their demos, enough to see that clipping/depth sorting is not as big of a problem as it is with papervision…  but have not seen any demos of objects passing through each other and how they would look.

the sandy examples do not include the .swf files which would have been a good reference for me as i could not compile the flas my self.

I think my preferred 3d engine is away3D so far, but i will keep an ear open for sandy3D…  also i am greatly looking forward to Sharikura, it seems extremely efficient from the demos i have seen.

Does Away3D and Sandy3D support 3dsMax and google Sketch Up models?  through Collada like Papervision does?


other 3D engines I found, although I’m not sure if any are note-worthy:

five3D
freespin3D

and there are several engines supporting physics for various 3D engines, one such engine is WOW.

Lutz.W: 29.07.2008,  12:33 AM

Brian, I mostly agree with your opinion. Both Away and Sandy have parsers for Collada-files (quite a few people seem to use Python-based Blender to create their Collada-files, a method which I also tried), Away additionally supports generic .DAE, as far as I remember.

Sandy can parse ASE-files if you are looking for a quick way from 3DMax to Flash.

However, I found that none of the existing parsers offers enough control over the created output, so I ended up writing a custom parser for Coobico, which can be fed with VRML…

blablabla: 08.08.2008,  10:18 PM

haha gut aha

Thomas PFEIFFER: 01.09.2008,  08:41 PM

Hello Lutz,
I was watching your website and the incredible story board (concept art) pages. You are doing an incredible work (and I work in flash games industry wink ).

As the lead developer of Sandy, I’m glad you consider to use this API for the game. Until now, we have few succesful 3D games done with Sandy, and some more are coming. That is the proof that Sandy is a capable engine.
We are making some good efforts to improve the library even if not a lot of “visible” updates are available, but the svn moves quite fast. Parsers have been improved, and hopefully performance too.

Do not hesitate to contact us through Sandy forum to get some advices/help smile

Lutz.W: 01.09.2008,  11:38 PM

Dear Thomas, thanks a lot—I can just return the compliment for your great work with Sandy (and for sharing it with all of us). Now, we do not yet have fixed the whole 3D-back-end, so at the moment I can’t say if we will really stick with Sandy or not. But I would nonetheless fully recommend Sandy for any professional project. Your range of tutorials and the very helpful forum really set you apart from the rest of the pack. smile

makc: 02.09.2008,  03:25 PM

Any chance of open-sourcing VRML parser?

Lutz.W: 03.09.2008,  01:35 AM

makc, the parser is made-to-measure for our game-engine and thus not really useful for the public. But I can post a quick tutorial on the underlying principles to provide you with a starting-point. Stay tuned…

Max: 03.09.2008,  05:01 PM

Hi Lutz,

gibt es einen Testlink (privat?), der den Einsatz der Engine zeigt? Mich interessiert vor allen Dingen die Performance der Szene.

cheers
Max

Lutz.W: 03.09.2008,  08:45 PM

Hallo Max, z.Zt. leider noch nicht. Wir werden aber entsprechende Gameplay-Videos veröffentlichen, sobald wir alle Kernbereiche implementiert haben.

makc: 15.09.2008,  12:58 AM

spammer fail!

foo bar: 16.09.2008,  03:54 PM

you might want to close comments on this, spammers are taking it over…

flash game: 27.09.2008,  05:55 PM

Away 3D: primarily uses Objects to pass variables to their classes, which makes it easy for me to see and modify their examples.

makc: 27.09.2008,  07:36 PM

I do not see how this makes any difference at all.

Neil H: 26.10.2008,  07:14 AM

Sandy’s code is more professional and it looks like the programmers are actual Software Engineers ... Away3D code is not as good… just take a look at the Number3D class in Away 2.2… YUK! Never thought a vector class would have TWO matrices in it… Bloated.

ieaiaio: 02.03.2009,  04:39 PM

good thing i bumped to sandy3d first. i like the OOPness of sandy. and the documentation and the forums/support

suat: 08.06.2009,  07:52 PM

Did you hear about yogurt3D ?

check this http://www.yogurt3d.com/

there is a demo.

Commenting is not available in this weblog entry.