Trying to set the correct size/distance of an interactive MovieMaterial

Software: Away3D 4.x

jbraccini, Newbie
Posted: 13 July 2011 02:03 PM   Total Posts: 2

Hello people, im back here with some doubts.
I’m developing this website, wich have some planes primitives on stage mapped with some interactive MovieMaterial (meaning, like a web section you can interact in each plane).
The thing is, even if i can set the size of the plane and the distance to the camera to make each plane content readable, there is some method or technique to set the plane in the precise distance and size (or any other property) to see the content in its real size (meaning scaling 100%) ? like if the content was added to the stage instead the plane material.

Anyway, thanks for the time.

Best regards.

J

   

ppalmeida, Newbie
Posted: 13 July 2011 02:11 PM   Total Posts: 2   [ # 1 ]

Hey, jbraccini.
Im a newbie on Away3D but what I did (based on my searchs through the web) is:

The “aspect” of your elements on screen is a mix of three things:

Camera zoom
Camera focus
Elements distance from camera.

So start with this values:

camera.zoom = 10;
camera.focus = 100;

and the objects/primitives on scene 900 pixels away from the camera.
So, you can set camera.z = -900 or myCube.z = 900;

I have a BaseClass3D to start with, similar to BasicView from Papervision3D, where I start a world, a camera and a scene.

package  {
 
 import away3d
.cameras.Camera3D;
 
import away3d.containers.Scene3D;
 
import away3d.containers.View3D;
 
import flash.display.Sprite;
 
import flash.events.Event;
 
 
 public class 
BaseMain3D extends Sprite {
  
  
protected var _world3D:View3D;
  protected var 
_scene:Scene3D;
  protected var 
_camera:Camera3D;
  
  public function 
BaseMain3D() {
   super
();
   
this.stage this.initBase() : this.addEventListener(Event.ADDED_TO_STAGEthis.initBase);
  
}
  
  
private function initBase(e:Event null):void {
   this
.initUI();
   
this.initEngine();
   
this.initScene();
   
this.init();
   
this.addEventListener(Event.ENTER_FRAMErender);
  
}
  
  
// Iniciailizar UserInterface elements
  
protected function initUI():void {
   
  }
  
  
// Inciar engine Away3D
  
protected function initEngine():void {
   this
._scene = new Scene3D();
   
this._camera = new Camera3D();
   
this._camera.zoom 10;
   
this._camera.focus 100;
   
this._camera.0;
   
   
this._world3D = new View3D({scene:this._scenecamera:this._camera});
   
this._world3D.this.stage.stageWidth 2;
   
this._world3D.this.stage.stageHeight 2;
   
this.addChild(this._world3D);
   
  
}
  
  
// Iniciar o Scene
  
protected function initScene():void {
   
  }
  
  
// init geral
  
protected function init():void {
   
  }
  
  
protected function render(e:Event):void {
   this
._world3D.render();
  
}
  
 }

With this values you can start “tunning” your view to obtain the most accurate appearance of your app.

Cheers!

pp

   

jbraccini, Newbie
Posted: 13 July 2011 08:01 PM   Total Posts: 2   [ # 2 ]

Hey man, thanks for the reply.
I have actually a sword of an abstract class, similar to you… and i am also, tweaking those values to get the most accurate aspect i can, but my point asking the question is if there’s some more accurate way to do this, than to be exploring value by value until i get the aspect i look for.

Anyway, if someone had experement with this previously i would appreciate your help.

cheers!

   

teckel, Newbie
Posted: 18 October 2011 09:36 AM   Total Posts: 11   [ # 3 ]

Huuuummm,

try to have also a 1:1 size but, in the version 4, the zoom and focus seem’s to be not exist.

May be they are just moved to anothe class ?

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X