Hello,

I'm currently trying to figure out how to display objects pixel
perfect, so that there's no distortion and things are shown as if they
were two-dimensional. That's especially important if I want to place
text or small bitmaps on the objects. In Papervision that should be:

Object.z = Math.round((camera.zoom * camera.focus) -
Math.abs(camera.z)) + Object.depth/2;

In Away3D the solution is supposed to be to place the camera 900 px
away from the object's surface, but I've tried for hours without
proper results... setting smooth to true isn't an option and precision
mode doesn't work either. I've also tried adding or subtracting 0.5
from almost any parameter...

Could anyone please try this? I've attached a smaaall class with only
the basic settings and an example image: 
https://dl.dropbox.com/u/11985201/precise.png
... How to add this to the cube's front without having major
distortions? I also really don't get why the left and bottom border ar
cut... Isn't there someone who has solved this? I'd be uber-thankful
for your help, because this is really, really crucial (for me at
least).

package
{
        import away3d.containers.View3D;
        import flash.events.Event;
        import flash.display.Sprite;
        import away3d.primitives.Cube;
        import away3d.materials.MovieMaterial;
        import away3d.cameras.Camera3D;
        public class Main extends Sprite
        {
                private var view:View3D = new View3D();;
                var camera : Camera3D = new Camera3D();

                public function Main()
                {
                        addChild(view);

                        view.camera = camera;
                        view.x = view.y = 100;

                        addEventListener(Event.ENTER_FRAME, onEnterFrame);

                        var materialMovie:MovieClip = new BitmapFromLibrary() 
as MovieClip;
                        var cube:Cube = new 
Cube({width:160,height:160,depth:160, x:0, y:0,
z:(160/2)});
                        cube.cubeMaterials.front = new 
MovieMaterial(materialMovie,
{precision:1,smooth:false});
                        view.scene.addChild(cube);

                        camera.z = -900;
                }

                private function onEnterFrame(ev : Event):void
                {
                        view.render();
                }
        }
}

Reply via email to