Error #3691: Resource limit for this resource type exceeded?

Software: Away3D 4.x

DT, Newbie
Posted: 15 July 2013 03:11 PM   Total Posts: 4

Hi all, I hope someone can help!

I’m new to Away3D so I’m a bit stumped. I’m building a scene for a FPS game, and it’s all loading in fine. When I look at the stats it shows I have a polycount of about 150000 - 200000, which I don’t even know if that’s a lot or not as I’m not from a 3D background. Firstly, would someone be able to let me know if that is a lot, way too much, or acceptable?

Also, as soon as I start looking around the scene, I hit the #3691 error, looking at the polycount as it kills the app it’s around the 250000 mark. Would that be right?

I ask because I read somewhere that the limit was 500000 and I’m not near half of that?

If someone could shed some light on this that would be a great help. It would be good to see where I’m going wrong.

Many thanks in advance. DT

   

iansen, Newbie
Posted: 16 July 2013 08:26 AM   Total Posts: 17   [ # 1 ]

Have you tried profiling SWF to see what kind of resource is using way to much memory?
Your polygon count is quite high…but from what I have read it’s not the polygon count that’s the bottle neck it’s the number of meshes/textures and the way you use them- you should try reusing(cloning) parts of geometry and textures when ever possible.
I’m not an expert on the matter my self… so don’t take this as being 100% right.

I’ve ran into a similar error some time ago and it turned out that I wasn’t disposing of some objects correctly and the memory usage for that type of resource kept going up until the error popped up. I would suggest that you first identify the resource that causing the problem and then take it from there.

   

mattmogford, Newbie
Posted: 16 July 2013 01:42 PM   Total Posts: 23   [ # 2 ]

Adobe Scout can help a lot with problems like this.
I used it to find that I was creating too many texture materials.
If you are re-using a material more than once, try using a dictionary to create it once if it doesn’t exist, and re-use if it does.

var materialDictionary:Dictionary = new Dictionary;
var 
objTextureMaterial:TextureMaterial;

if( 
materialName in materialDictionary )
    
objTextureMaterial materialDictionary[ materialName ];
else
{
    
if( materialName in materialDictionary )
 
objTextureMaterial materialDictionary[ materialName ];
    else
    
{
        objTextureMaterial 
= new TextureMaterial( new BitmapTexturespritesheetObject.bitmap.bitmapData ), truefalsetrue );
 
objTextureMaterial.alphaBlending true;
 
materialDictionary[ materialName ] objTextureMaterial;
    
}
}
     
var sprite:Sprite3D = new Sprite3DobjTextureMaterialspritesheetObject.bitmap.widthspritesheetObject.bitmap.height );
etc... etc... 
   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X