
-->
Sandy3D is an engine for the Adobe Flash patform and recently for the haXe platform too.
Version 3.1 of Sandy is the second generation on AS3 version of the engine. It does benefit from the great AMV2 performance and the AS3 language capabilities.
The engine's capabilities are related to the performance of the virtual machine, which does not provide any native 3D nor hardware acceleration (the Flash 10 player introduces some 3D features, but we speak here of Flash 9 and earlier versions).
Sandy3D currently provides the following features :
Sandy3D uses the Flash vector rendering engine. Some tests with real rasterization have been done, but the result is too slow for a correct resolution.
Frustum culling with two levels : bounding sphere and bounding box.
Frustum clipping. It provides better quality rendering for immersive worlds.
Basic mean depth sorting (painter algorithm). It is inaccurate but fast. All the work has to be done at the modelisation level. Sandy gives you the ability to force an object depth to avoid some of the issues.
Managment of Sprites and oriented Sprites. As a sprite can have any native displayable flash objects, you can have video, interactive element, etc.
Collada, 3DS and ASE external formats are supported.
Sandy3D offers a feature which lets you choose to have a container per object (very useful to attach some filters effects to this container), or per polygon (different effects are possible, but Z-sorting is now polygon based, so more accurate).
About the mapping, Sandy3D offers the following :
Color material using the native Flash drawing method. Fast!
BitmapMaterial with affine texture mapping. A perspective corrected mapping is also possible.
VideoMaterial, can receive any video stream, webcam, High definition FLV video, etc.
Each material can have some attributes to proceed some specific rendering :
Show edges. You can play with alpha, thickness and color
Show outline of the 3D object. Here too, color, alpha and thickness are settable.
Set a light behaviour. Actually only one light is possible in Sandy, and it is a directionnal light. Phong, Gouraud, Cel shading, and flat shading are all available.
About performance, Sandy3.1 is able to render about 2000-5000 polygons correctly on a pretty recent computer with really correct screen resolution (fullscreen is possible too). But you must remember that polygon count may vary depending on the following points:
size of textures and if they are animated (MovieMaterial is more consuming as a normal static BitmapMaterial)
size of the scene and size of objects on screen (bigger is the object on the user screen, more resource it will take)
quality and power of the client CPU
Sandy3D settings (enableClipping, useSingleContainer, material smooth, lights) are some settings which affect the movie peformance
stage.quality setting. In most of the case, an average stage quality of more than enough
Here is Sandy pipeline :
creation of the geometry
geometry is attached to a 3D shape. This step corresponds to the polygon creation, vertex normals and polygon neighbours generation.
creation of the appearance. An appearance has two materials, a material for front and back sides in case backface culling is disabled; otherwise, the same material will be applied to both sides.
the appearance is linked to the shape, and automatically linked to each polygon. This way, each polygon can have its own appearance.
Once the scene is created, we proceed with 4 steps (for each, a dedicated event is broadcasted)
update: We update the local transformations of each transformable node.
culling: We compute the scene tree transformations concatenation. And proceed to the culling of objects if not visible. A cache system exists to avoid unnecessary multiplications.
rendering: For visible objects, we proceed to their geometry transformation / projection
display: Each material displays the polygons they are linked with.
