Oh such busy times! I’m not keeping up with my planned blog posts as much as I’d like, but between work and Away3D 4.0 updates there’s not as much time left to actually write about it. But, I did want to share a video from my presentation on Flash on the Beach 2011, showcasing some of the things that can be done relatively easily with Away3D 4.0 by compositing several shadow methods and so on. It also showcases some tricks that aren’t in the engine yet, but will be after some refactoring. It’s very much a coder’s demo, so don’t expect too much artistic sense ;)
Some of the things shown that I’d like the point out:
- Subsurface scattering for ice and gelatinous materials
- Large amount of independently moving scene graph objects (1000 cubes)
- Terrain texture splatting
- Partial shadow mapping for large view frustra (coming soon)
- Dynamic cube map refraction + colour aberration (coming soon)
- Dynamic cube map reflections (coming soon)
I’ll elaborate on some more once they’re available in the engine, I promise! :)
The Away3D team also recently joined forces with Evoflash (in particular Simo) again to create a real scene demo for Adobe MAX. Read all about that one Simo’s blog. Great job guys!
Super cool David! Away rocks as always! Thanks a lot for this demo :)
woah, that’s only 1000 cubes? just imagine what 100000 could look like – and it’s still within the reach. let’s say 1000 meshes made of 100 cubes each, with a joint per cube. should be same amount of draw calls, no? don’t know if you could actually handle 100 bones, however, maybe if you optimize the shader for this kind of skin.
wow, impressive !!! what’s the trick for the dynamic reflection ? a new shader not include in away3d ?
Makc: Yeah, you should be able to crank out many more cubes if you create some specialized animated geometry for it. Just need to keep the number of joints per set low enough so it can be skinned using gpu.
Fred: As the post says: “coming soon” ;-)
Looking good david!
Too bad i missed FOTB, would have loved to see you show up there!
In you demo i see different colors on the sides of the cubes.
Is this a lighting effect or did you actually managed to give the cube sides all different materials ?
Anyways,
Awesome job!
Keep on the greatness :)
Ciao
Rackdoll
Rackdoll: Cheers! Yeah, that’s just an effect of having oppositely placed lights with different colours :) I don’t know why people are so fixated on having multiple materials for different sides of a single cube though; that’s the single most inefficient method of going about it :s
Brilliant showcase!
Well done on getting so many cubes rendered!!
Are their any tips on how we can achieve maximum draw calls on Stage3D
far as I can tell my main bottlenecks are
1. constructing the transform matrices every frame (especially if there are rotations)
2. uploading constants (predominantly the transformations) per object
2 seems to be my biggest issue and not sure if there is any way to speed it up
I though about batching, but at the moment I am just trying to find out the boundaries.
i.e. how many cubes (with the most basic material) can be rendered individually while sharing the same geometry and material with each one having a unique transformation.
Do you know how many away3d can handle? is 1000 near the top end of what can be rendered at 60fps? cheers and once again great job
having actually done some more testing the matrix stuff is pretty cheap with the latest fp11
so the issues are uploading constants and the calls to drawTriangles
guess there isn’t much I can do about that :(
Ben: GPU rendering suffers when too many (small) batches are sent.. If you can merge geometries together, that will save a lot of draw calls. Typically, that means they can’t move independently though. However, you could also create a custom Animation that assigns a transformation matrix to each vertex. So for each merged geometry, its vertices have a unique index associated with it to point to the geometry’s transformation matrix. Essentially, this is an optimized skeleton animation with a single weight per bone and no bone hierarchy. You should be able to use the existing SkeletonAnimation/SkeletonAnimationState etc to accomplish such things, but you might want to look into implementing an AnimatorBase subclass that can easily manage the transformations for you.
Can you tell me how you apply the glow effect on the cubes?
Thanks
Paulo: That’s just a RadialBlurFilter3D applied to the view.