“View.render()” is low speed right after changing a Mesh.

Software: Away3D 4.x

Avatar
GoroMatsumoto, Sr. Member
Posted: 22 July 2012 01:41 PM   Total Posts: 166

“View.render()” is a bit slow right after changing a Mesh.

I use some Mesh that have about 10,000 polygon each.

In my case and environment,
“View.render()” takes 200-300ms right after changing.
but later, it takes only 1ms.
Can i avoid this?

   

Avatar
GoroMatsumoto, Sr. Member
Posted: 22 July 2012 06:05 PM   Total Posts: 166   [ # 1 ]

Loading & Parsing models is a heavy process too.
But I solved that process with Actionscript Workers.
That’s nicely works.

So, I wonder if the heavy process in View.render() will work in the Worker too.

   

Shegl, Sr. Member
Posted: 22 July 2012 07:26 PM   Total Posts: 134   [ # 2 ]

It’s very intresting but I think worker cant use DirectX..

   

Avatar
GoroMatsumoto, Sr. Member
Posted: 23 July 2012 03:59 AM   Total Posts: 166   [ # 3 ]

Hi, Shegl.
Yes, I tried to make View3D in worker but that did not work.
This problem seems can’t be solved…
I wonder if there are other way.
If anyone know please teach me.
Thanks.

   

Richard Olsson, Administrator
Posted: 23 July 2012 08:09 AM   Total Posts: 1192   [ # 4 ]

Whether or not this can be solved depends on what those 300 milliseconds really are. Are you sure they happen after everything finishes loading/parsing, because in that case we can rule out parser finalization which can sometimes be quite heavy (especially with heavy geometry.)

Basically the only remaining possibility then is that the time is spent uploading assets to the GPU. If you have heavy geometry, and/or textures, it’s reasonable for this to take some time.

Your best bet in this case is to try to upload things across several frames, e.g. by not adding them all to the scene at once, or by manually invoking their upload methods (like myTexture.getTextureForStage3D() and SubGeometry.get***Buffer()) across several frames before then adding them all to the scene at the same time.

   

Avatar
GoroMatsumoto, Sr. Member
Posted: 23 July 2012 09:33 AM   Total Posts: 166   [ # 5 ]

Hi, Richard.
I confirmed the 1st possibility.
Of course, I had confirmed that after ASSET_COMPLETE & addChild(Mesh).
And this time, I tried waiting 300ms with “TIMER” after those.
But that was same result. Even 30sec same too.

So, I try manually uploading.
Thanks for helping.

   

Richard Olsson, Administrator
Posted: 23 July 2012 09:36 AM   Total Posts: 1192   [ # 6 ]

ASSET_COMPLETE is not the event you should be listening for though. The event that will be dispatched after everything has finished loading is RESOURCE_COMPLETE. The asset events are dispatched once after each asset that finishes loading/parsing (e.g. meshes, materials, geometries, textures et c.)

But waiting for 30 seconds should be enough, so your conclusion (and mine) still stands. It’s most probably a GPU upload issue, and there is no way of getting rid of that delay. All you can do is distribute it over several frames as suggested above.

   

Avatar
GoroMatsumoto, Sr. Member
Posted: 23 July 2012 10:11 AM   Total Posts: 166   [ # 7 ]

I didnt know that event.. I should read the doc more.
I try separating my data and upload each. Thanks:)

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X