Managing triangles in Mesh.

Software: Away3D 3.x

apalabrados, Newbie
Posted: 16 October 2013 10:13 PM   Total Posts: 13

Hi,

  I have a Mesh which I populate with a set of triangles. Some 3D Objects have a great amount of triangles and when placed on a scene, rendering when object is moved is quite slow.

  Is there any tip or advice I could base on, or even any transformation to reduce the weight of the mesh?

Thanks.

   

Avatar
GoroMatsumoto, Sr. Member
Posted: 17 October 2013 11:53 AM   Total Posts: 166   [ # 1 ]

How big?

   

andreahmed, Member
Posted: 17 October 2013 05:08 PM   Total Posts: 62   [ # 2 ]

You can search for space partitioning algorithms. If its an outdoor engine, you can use OCTree, if the height doesn’t change that much, you can use a Quadtree, if its indoor engine, better to look for PVS, or BSPs.

   

apalabrados, Newbie
Posted: 18 October 2013 04:46 PM   Total Posts: 13   [ # 3 ]

@GoroMatsumoto, My mesh has 188640 triangles. It is an sculpture.

@andreahmed, I do not understand. Could please explain it a little bit more?

I’m developing a Viewer with the basics control for moving the object in the space. When I use the Orbit function, the object takes too long when rotating, moving, etc…..

   

Avatar
GoroMatsumoto, Sr. Member
Posted: 19 October 2013 07:05 AM   Total Posts: 166   [ # 4 ]

I think that It’s not so big.
How do you transform the mesh?
A general way of mesh transformation is:

mesh.newPosX;
mesh.newPosY;
mesh.newPosZ;
mesh.rotationX newRotX;
mesh.rotationY newRotY;
mesh.rotationZ newRotZ


http://linktale.net/dev/away3d-examples-fp11_4_1_1_Beta/src/?code=Intermediate_MonsterHeadShading&size=1200_800
This example demo run with 200,000 over polygons.
Can you watch this demo smoothly?

   

apalabrados, Newbie
Posted: 19 October 2013 04:03 PM   Total Posts: 13   [ # 5 ]

Yes, I can watch it smoothly.

I move the camera with the next code:

private function onEnterFrame(e:Event):void {

  var cameraSpeed:Number = 0.3;
  if (isMoving) {
    camera.panAngle = cameraSpeed*(stage.mouseX - lastMouseX) + lastPanAngle;
    camera.tiltAngle = cameraSpeed*(stage.mouseY - lastMouseY) + lastTiltAngle;
  }
 
  camera.hover();
  View.render();
  }

   

Avatar
GoroMatsumoto, Sr. Member
Posted: 19 October 2013 05:40 PM   Total Posts: 166   [ # 6 ]

Do you use latest version of Away?

As far as I know, “camera.hover()” isn’t in Away3D ver4.
It’s in ver3.6. Maybe 3.6 is CPU based.

   

apalabrados, Newbie
Posted: 21 October 2013 10:49 AM   Total Posts: 13   [ # 7 ]

Hi @GoroMatsumoto,

  You are right, I’m using the 3.6 release.

  I will have to change to 4.1.1. Is there any ebook i could use for learning purposes?

Regards.

   

Avatar
GoroMatsumoto, Sr. Member
Posted: 21 October 2013 02:59 PM   Total Posts: 166   [ # 8 ]

Maybe no books for 4.1.
You can learn it from some tuts and example sources.

Away core 4.1.1
http://away3d.com/download/
https://github.com/away3d/away3d-core-fp11

Example demos:
http://linktale.net/dev/away3d-examples-fp11_4_1_1_Beta/src/

Tutorials:
http://away3d.com/tutorials/

And, the latest has a GUI tool and it’s tutorial videos.
http://awaytools.com/awaybuilder/
This tool is very useful. You can load the model to your scene easily.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X