Thanks, that was really helpful.  Where do these equations come from?

camera.focus*(camera.zoom -1);

camera.zoom = camera.focus;


On Nov 16, 3:19 pm, Rob Bateman <[email protected]> wrote:
> Hey eigenface
>
> a plane takes its default dimensions from the width and height properties of
> the plane object, so if you want those to match your bitmapdata, you need to
> do:
>
> plane.width = plane.bitmap.width;
> plane.height = plane.bitmap.height;
>
> you also need to place the plane the correct distance away from the camera,
> because with most normal lenses, size scales in proportion to distance. For
> the standard ZoomFocusLens, the equation for distance that will result in an
> exact size match is:
>
> d = camera.focus*(camera.zoom -1);
>
> for the orthogonal lens, the distance doesn't make any difference because
> size stays constant no matter how far away an object is from the camera. so
> instead you need to do:
>
> camera.zoom = camera.focus;
>
> for an example of an effect simialr ot the one you are describing, take a
> look at the source found here from one of my old presentations:
>
> http://www.infiniteturtles.co.uk/blog/presentation-notes-tfo3d-in-flash
>
> hth!
>
> Rob
>
>
>
> On Mon, Nov 16, 2009 at 10:58 PM, eigenface <[email protected]> wrote:
> > I'm trying to create an effect where the image on the screen flies
> > away as if it was printed on a piece of cardboard caught by the wind.
> > I've copied the image to a BitmapData and created a Plane with
> > BitmapMapMaterial, and I'm using an OrthogonalLens.  I'm having some
> > problems, because neither moving the Plane nor moving the Camera seems
> > to have any effect on the appearance of the Plane.  Zooming in on the
> > Plane seems to work, but it looks distorted - it's perfectly square,
> > and the original BitmapData was rectangular.
>
> > Also, is there a good way to figure out exactly where to put the plane
> > so that it looks exactly like the screen looked before I applied the
> > effect?  I mean, I have a screen full of stuff, then I copied it to a
> > BitmapData, then I render away3d, and at this moment, I still want it
> > to look exactly like it originally did, before I make the Plane fly
> > away.  Any advice about how to set this up would be greatly
> > appreciated.
>
> --
> Rob Bateman
> Flash Development & Consultancy
>
> [email protected]

Reply via email to