Why my test app is chopping?

Software: Away3D 4.x

Hydrus, Newbie
Posted: 12 November 2011 02:49 PM   Total Posts: 2

Hello everyone,

I’ve created a very simple test app with Away3D: an sphere with a earth texture.

I don’t know why but this single primitive is chopping my app and it is not very smooth. Could anyone help me?

((I am using Away3D 4.0))
this is my code:

[SWF(frameRate="60")]
 
public class GettingStartedWithAway3D extends Sprite
 {
  
private var _view View3D;
  private var 
_camera:Camera3D;
  
  private var 
_ctr ObjectContainer3D;
  private var 
_light PointLight;
  
  
[Embed(source="../embeds/earth1024.jpg")
  
  
public function GettingStartedWithAway3D()
  
{
   super
();
   
   
_view = new View3D();
   
   
// Setup camera
   
_camera = new Camera3D();
   
_camera.position.= -500;
   
_camera.0;
   
_camera.170;
   
_camera.= -145;
   
   
_view.camera _camera;
   
   
this.addChild(_view);
   
this.addEventListener(Event.ENTER_FRAME_handleEnterFrame);
   
   
_ctr = new ObjectContainer3D();
   
_view.scene.addChild(_ctr);
   
   
   var 
material2 BitmapMaterial = new BitmapMaterial(new Albedo2().bitmapData);
   
   
_ctr.addChild(new Sphere(material22005030)).0;
   
   
stage.scaleMode StageScaleMode.NO_SCALE;
   
stage.align StageAlign.TOP_LEFT;
   
stage.addEventListener(Event.RESIZEonStageResize);
  
}
  
  
private function onStageResize(event Event) : void
  {
   _view
.width stage.stageWidth;
   
_view.height stage.stageHeight;
  
}
  
  
  
private function _handleEnterFrame(ev Event) : void
  {
   _ctr
.rotationX -= .01;
   
_view.render();
  
}
 } 
   

Avatar
Baush, Sr. Member
Posted: 14 November 2011 04:46 PM   Total Posts: 135   [ # 1 ]

Make sure to use wmode=direct if you use an html page for your test.

Try also adding the awstats class to see the FPS and if it’s running in directx or software mode.

   

Hydrus, Newbie
Posted: 14 November 2011 06:14 PM   Total Posts: 2   [ # 2 ]

Hi Baush!

yes, I did that before. And the problem is still there.
The stats widget tolds me that my single sphere is using over 10k polygons and 379MB of RAM.
Maybe the problem is the huge detail? or the 1024x1024 earth texture? xD

Well, no problem. I’m going to play a little bit more with those values.

Thanks!

   

Avatar
Baush, Sr. Member
Posted: 14 November 2011 06:18 PM   Total Posts: 135   [ # 3 ]

Try initializing your sphere with lower vertex detail:

new Sphere(material2, 200, 16, 16)

1024x1024 is not a big resolution and it should handle it no problem.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X