Visibility Problem

Software: Away3D 4.x

Zero, Newbie
Posted: 02 November 2012 12:07 PM   Total Posts: 2

Can’t make out if this is an actual bug or not, so i would rather post it here then file a false report.

I have list of cubes made up of PlaneGeometry stored in memory*

the problem is i was iterating through the list every frame and toggling visiblity based on a distance check, after a few cubes would show up i would get

Error #3691: Resource limit for this resource type exceeded
at flash.display3D::Context3D/createVertexBuffer()

now i got passed this by completely removing the object from the scene and re-adding it like a pseudo visible function

if(distance farDistance)
{
    
if (!view.scene.contains(cube))
        
view.scene.addChild(cube);
}
else
{
    
if (view.scene.contains(cube))
        
view.scene.removeChild(cube);

which is not a real fix, but the thing is i shouldn’t have to do this at all, why on visible does it re-create a new vertexBuffer (while not disposing of the previous?), i could see if the object was nonexistent or new yes, but shouldn’t it just remove the buffer from the display list and keep it in memory until disposed?

   

My Wireframe Shoe, Newbie
Posted: 02 November 2012 02:30 PM   Total Posts: 6   [ # 1 ]

This “Visibility Problem” is NOT Away3d problem.

Details:

Namespace path:
“flash.display3D.Context3D” shows,
that it is not an Away3d problem.

   

Zero, Newbie
Posted: 02 November 2012 03:44 PM   Total Posts: 2   [ # 2 ]
My Wireframe Shoe - 02 November 2012 02:30 PM

This “Visibility Problem” is NOT Away3d problem.

Details:

Namespace path:
“flash.display3D.Context3D” shows,
that it is not an Away3d problem.

:1 Ok well it IS an away3D problem.
yes the Context3D is a part of the flash library and yes the error thrown is from the Context3D class, but how the error got thrown is from Away3D exceeding the vertex buffer limit, which is also a memory leak which is an even bigger issue

Away3D handles what gets sent to the Molehill pipeline not the other way around.

I’m not creating 4096 VBO’s I’m only generating around 625 which is 1250 triangle and 2500 vertices and 3750 indices which is well below the limit for flash

if i am not toggling visibility and just rendering it all, it runs fine no problem
which in turn is a problem because it means somewhere down the line in away3d its creating extra vertex buffers, when I’m sure the dev team didn’t intend it to obviously…

 

   

My Wireframe Shoe, Newbie
Posted: 02 November 2012 03:57 PM   Total Posts: 6   [ # 3 ]

Hey, maybe this could help, the same problem decribed here:

“CSG and Resource limit for this resource type exceeded”

http://away3d.com/forum/viewthread/3068/

————————

Richard Olsson - 17 August 2012 02:14 PM

You have too many vertex buffers. You can have 4096 vertex buffers if I’m not mistaken. Vertex buffers are used to store all the vertex attributes in a geometry. Typically you’ll have vertex positions, normals, tangents and UV coordinates, so four vertex buffers per sub-geometry.

You need to dispose unused instances of Geometry, so that the vertex buffers are freed and can be used by the next Geometry that you instantiate.

————————

You need to dispose! :D

~ Find which type is exceeding its limits.

 

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X