3D, ActionScript 3, Flash Player 11

Away3D broomstick pixel perfect on a perspective lens

I’m doing some experiments with “Broomstick“, the new born (alpha) version of Away3D which leverages the brand new Stage3D (molehill) of flash player 11 (incubator).

Here’s the coded formula to obtain pixel perfect sprites by moving the camera in the Z axis just before rendering:

// camera is the current Camera3D object with a PerspectiveLens
// h has to be the height of your current viewport
var h:Number = /*current viewport*/stage3DProxy.viewPort.height;
var fovy:Number = (camera.lens as PerspectiveLens).fieldOfView*Math.PI/180;
camera.z = -(h/2) / Math.tan(fovy/2);

…just a snippet, hope you find it useful 😉

More on this topic:
http://knol.google.com/k/perspective-transformation
http://en.wikipedia.org/wiki/3D_projection

Advertisements
3D, News

FP 10 and 3D engines for flash platform – Ralph Hauwert and Rob Bateman

Here’s two big interviews. Guys from “Papervision Daily” and “Dreaming in Flash” (be sure to have both links among your bookmarks :)) had the good idea to take an interview from Ralph Hauwert (from Papervision3D core team) and Rob Bateman (from Away3D core team).
Both interviews are about what’s next to new Astro features and what kind of benefits is PixelBender (AIF) giving to their engines.

I highly suggest to take a look to those interviews, just to be aware of what’s going on 🙂

here’s the links:

..and here’s the little summary:

  1. Features such as native 3D APIs won’t affect both engines because they’re based on drawing triangles (skewing)
  2. Otherwise, new drawing APIs will strongly improve both engines performances, vectors of drawTriangle instruction will replace arrays of very long drawing instructions
  3. PixelBender will enhace shaders’ performances, Ralph talks about 10 times faster… Both are quite sure this technology will be used on shaders.
  4. Both are assuming it would be great (but not a priority) to implement vector render (as Five3D already does)

stay tuned,

byez