Moving lots of items on screen at once

Software: Away3D 4.x

Rob Dodson, Newbie
Posted: 19 January 2012 04:49 PM   Total Posts: 15

Hi guys, I have a really naive question so I apologize in advance for my ignorance.

Now that I’m using Away3D 4 it’s really easy for me to get tons and tons of objects drawn to screen with minimal effort. But as that number of items increases I find it harder to pass them instructions without killing my processor. Right now I either put all my primitives into a Vector which I loop through every frame and tell them to update or if that Vector becomes too large I setup a green thread so I can break up the instructions over several frames. I figure there has to be a better solution than green threads but I’m still pretty new to all this 3D stuff so I’m not sure what that solution would look like. Any advice is greatly appreciated. Thanks!

   

Avatar
Baush, Sr. Member
Posted: 19 January 2012 08:39 PM   Total Posts: 135   [ # 1 ]

Are your objects static (trees) ?

If they are, you may want to try using the Merge tool to create a single mesh from all your objects (or groups) to improve performance.

Otherwise, how much objects are your talking about ?

   

Rob Dodson, Newbie
Posted: 19 January 2012 08:44 PM   Total Posts: 15   [ # 2 ]

I haven’t looked into the Merge tool yet, is there a demo or doc which explains how to use it?

I’m mainly talking about particles though I guess I do have some scenarios where I have items on a timeline which are all moving in the same direction with the same velocity so perhaps those would be good candidates for Merge?

As for the number of particles, lets say it’s a few thousand. Or really any number that is just too big to hit with a big for loop on the enter frame. What kind of strategies, other than green threads, are there to deal with that many items?

   

Avatar
Baush, Sr. Member
Posted: 19 January 2012 08:50 PM   Total Posts: 135   [ # 3 ]

The idea is to minimize the amount of objects to loop through on every frame, so combining 10 particles as 1 should improve a lot, but you won’t get to control them all individually, but the position of the group.

You can fake multiple particles by having for example a Sprite3D with a BitmapData having multiple points drawn on it, instead of individual 3D objects.

Hope this helps

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X