How to improve updateVertexData speed?

Software: Away3D 4.x

hexvector, Newbie
Posted: 21 July 2011 05:58 AM   Total Posts: 1

For example, the following code:

onEnterFrame(ev:Event):void {

movableObject
.mesh.geometry.subGeometries[0].updateVertexData(_points[_renderBuffer])

I got part of the code from the ShallowWaterDemo.as, however I do not know how they managed to have updateVertexData(...) run so fast: 30 FPS on ~80k polys.

Thanks.

   

hexvector, Newbie
Posted: 23 July 2011 10:04 PM   Total Posts: 1   [ # 1 ]

The slowness seems to stem from the mesh being a merged mesh composed of many distinct meshes, in my case cubes.

updateVertexData is very fast on a single continuous mesh like a plane with a similar number of polys.

It is actually very slow to have a large number of distinct mesh objects render, which is why I merged them. Speed increase from 4FPS to over 60FPS going from distinct mesh to 1 merged mesh.

Of course, now with a merged mesh you lose the ability to animate individual entities quickly.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X