Memory performance with many objects on scene

Software: Away3D 4.x

King Lion, Newbie
Posted: 30 December 2011 12:08 PM   Total Posts: 2

Good morning guys, i looking for some help to solve what im trying to do… im from Brazil so dont worry about my poor english…

Im trying to build an supermarket witch have some aisles (corridors) with racks where the products will stay on.

I think i cant use models of racks cause there will be differents types of racks, witch different number of shelves, so im building this dynamically with cubes, then you can imagine i have to instantiated to much cubes and positioning theses to build a big supermarket

My problem is when i have a big number of cubes instantiated on my scene, then my memory going more then 300mb, so even with a low number of polligns (3000-4000 with away4) my fps down to 5-10.

So if someone can show me a solution I will be eternally grateful, thank you.

   

Avatar
Matse, Sr. Member
Posted: 30 December 2011 02:36 PM   Total Posts: 149   [ # 1 ]

Not sure this will help but a few advices :

1. re-use the geometry whenever you can : your cubes should all share the same geometry if possible, with just the scale on X/Y/Z changing if needed. You can do that by first creating a cube and then using the clone() function on that cube for every new cube you need.

2. make sure you don’t use different materials unless it’s really needed : re-use the same material everytime you can, this really affects performance. Have a look at that article : http://www.derschmale.com/2011/07/25/building-efficient-content-in-away3d-4-0-sharing-materials-geometries/

3. not sure here as I didn’t play with those yet but maybe using the Merge class (in away3d/tools/) would help.

   

King Lion, Newbie
Posted: 30 December 2011 06:58 PM   Total Posts: 2   [ # 2 ]
Matse - 30 December 2011 02:36 PM

Not sure this will help but a few advices :

1. re-use the geometry whenever you can : your cubes should all share the same geometry if possible, with just the scale on X/Y/Z changing if needed. You can do that by first creating a cube and then using the clone() function on that cube for every new cube you need.

2. make sure you don’t use different materials unless it’s really needed : re-use the same material everytime you can, this really affects performance. Have a look at that article : http://www.derschmale.com/2011/07/25/building-efficient-content-in-away3d-4-0-sharing-materials-geometries/

3. not sure here as I didn’t play with those yet but maybe using the Merge class (in away3d/tools/) would help.


1 - Does clone function instantiate another cube ?

2 - im reusing materials, thanks, and even when i did not use materials the performance still low, in a simple test i got 100k+ poligs with a good fps, i think the problem is memory

3 - not sure what this do but im gonna find out.

waiting for more suggestions, thanks guys !

 

   

Avatar
Matse, Sr. Member
Posted: 31 December 2011 11:55 AM   Total Posts: 149   [ # 3 ]
King Lion - 30 December 2011 06:58 PM

1 - Does clone function instantiate another cube ?

2 - im reusing materials, thanks, and even when i did not use materials the performance still low, in a simple test i got 100k+ poligs with a good fps, i think the problem is memory

3 - not sure what this do but im gonna find out.

waiting for more suggestions, thanks guys !

1 - Yes, it will create a new cube instance that uses the same geometry and material. That’s explained in the link I pointed you to : http://www.derschmale.com/2011/07/25/building-efficient-content-in-away3d-4-0-sharing-materials-geometries/

2 - Ok, good. I’m not familiar enough with Away3D yet to tell, but when I worked with shockwave3d the number of models (meshes) was very important too : you could have a single 20k polygons mesh that would render nice and smooth, while 1000 meshes of 20 polygons would render very slow.
If this is true with Away3D too (I guess it is, although probably not as “big” as it was with shockwave3d) then 3 - (Merging meshes) might really help.

3 - As I said I didn’t play with it yet but it is supposed to turn several meshes into a single one.

I have a hard time trying to picture how you create your scene with just cubes, maybe there would be a better way too.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X