Stage3D
Stage3D is a ligjt weight interface to DirectX or OpenGL 3D render pipeline. Its low level- Adobe intended it for use via high level libraries and is not part of the Display list(behind everything just like StageVideo). Older 3d engines have been working within the flash environment (making a heavier load but making it easier to integrate) while new engines such as Away3D are layered behind making it much more powerful.
Video Transcript
00:00Away 3D 4 is built on stage 3D, which has been a lot of buzz about.
00:06Stage 3D is actually quite simple. It's a very thin little interface allowing Flash to talk directly to Direct3D,
00:17which is kind of DirectX 9 or 10, 11. I don't think it was implemented much before then, but I could be wrong.
00:23I don't really know a great deal about the history of that.
00:27Or if you're on lineups on Mac, you've got OpenGL, and that gives you a dedicated 3D render pipeline in the GPU.
00:38It's very low level. Stage 3D, I wouldn't advise trying to program for it directly. You can, but it's quite fiddly stuff.
00:50It was built for people like the Away 3D team to build libraries on top of it.
00:57So you've actually got a stack of technologies. You really ought to be working unless you have a direct interest in the mechanics of how 3D stuff works with one of the libraries.
01:13The first thing that trips most people up is it's not part of the display list.
01:19So the Flash stage will always sit in front. So the Flash stage does all your...
01:26I've got to see here somewhere. Your Flash stage does just exactly what you'd expect,
01:32and anything past the GPU for rendering is rendered on stage 3D, which sits just behind the 2D stage.
01:45Now, of course, on Away 3D, 3.6, pay-per-view, and all of these things, they actually drew directly into Flash's display list.
01:55This is now completely separated from Flash's display list, and that causes quite a few problems if you're just expecting it to do what Flash normally does, because it doesn't.
02:06There are actually multiple stages in Flash Player 11. So you've got your normal stage. You can have multiple instances of stage 3Ds of different sizes.
02:19You can scatter them all around the place, and they actually sit in front of stage video at the back.
02:24So you can actually do some very complex stuff, especially with AR. There's no reason you can't render video at the back.
02:32Several different bits of 3D content in front of that, and some 2D UI in front of that, which is fantastically powerful.
02:41I haven't actually tried combining video and 3D yet, but I would absolutely love to when I get the time.
02:49So stage 3D, that is because it talks to OpenGL and Direct3D. It thinks in the way that all traditional 3D systems do in terms of meshes made out of polygons.
03:06If any of you are used to working with 3D models, a lot of 3D models will have rectangular polygons as well as triangles.
03:14Stage 3D needs triangles. They're simpler and easier to use. So if you're trying to import models which are made with square polygons anywhere,
03:25you're going to have to get them into Blender or 3D Studio Max or something like this and convert all of the squares into triangles,
03:38which is fine if you're a 3D modeler. And if you're not, just open Blender or open 3D Studio Max, and it's like a whole other world.
03:49It's like Photoshop's just gone insane. I don't think actually I've used an application as complex as Blender ever.
03:58I can't think of anything with that many different options and windows in it.
04:02It's quite fun, but there's much more of a learning curve than in a way 3D, which is really simple.
04:09Meshes use bitmap materials generally. Vectors don't really have much place in the GPU render pipeline.
04:21It doesn't think like that. So when you're used to using Flash and you just think, oh, yeah, it's not a Flash library and we can do this and we can use sprites and stuff,
04:29you can't. That unseated me because I was quite used to using sprites, movie clips, and vectors forever,
04:39and you do think of vectors in 3D. It's a point in 3D space, a point in 2D space, but they behave very, very differently,
04:48and you get all sorts of anti-aliasing problems. The display list, on the other hand, of course, Flash is a vector.
04:56It is a vector rendering machine, first and foremost, and although it handles bitmaps brilliantly these days,
05:04that's not really the core of what it does. So that's the first difference you've got to be aware of.
