@Janim you can exit this group by going to the group google page and
unsubscribe .

@Jahiro: Do you add and remove the object during the run? What is the RAM
consumption?

On Mon, Apr 11, 2011 at 1:08 PM, Jahiro <[email protected]> wrote:

> Sorry, forgot to mention, this is a Molehill question - I'm using the
> latest Away3D 4 code from SVN.
>
>
> On Apr 11, 2:43 pm, Jahiro <[email protected]> wrote:
> > Hi all,
> >
> > Can anyone advise a performance friendly way to have 500+ Sprite3Ds on
> > screen?
> >
> > I'm adding about 500 Sprite3Ds to my scene to create a cool grass
> > effect - it looks fine, but the performance drops down to about 30fps
> > from 60fps when all the sprites are on the screen. If I point the
> > camera away from the grass, the frame rate jumps back up to 60fps.
> > (and btw, I'm using wmode=direct)
> >
> > Seems odd that Molehill is able to render complex geometry and 3D
> > animations, but struggles with sprites - I'm probably doing something
> > wrong, so I wanted to check if this approach is correct:
> >
> > First, I embed a 30Kb, 256x256 png in my class and call it
> > "MyEmbeddedBmpClass", then basically just run this code about 500
> > times:
> > ~~~
> > var sprite : BitmapData = new MyEmbeddedBmpClass();
> >
> > var bmpMat:BitmapMaterial = new BitmapMaterial(sprite);
> > bmpMat.transparent = true;
> >
> > var sprite3D:Sprite3D = new Sprite3D(bmpMat, 15, 15);
> > sprite3D.position = new Vector3D(100*Math.random(), 100*Math.random(),
> > 100*Math.random());
> > addChild(sprite3D);
> > ~~~
> >
> > Of course, the loop could be more optimised by removing the var
> > delarations, etc but that's not the issue - my problem is a consistent
> > runtime issue, not just a code startup issue.
> >
> > Can anyone advise a more performance friendly way to have 500+
> > Sprite3Ds on screen?
> >
> > Thanks in advance,
> > Jahiro
>



-- 
Michael Ivanov ,Programmer
Neurotech Solutions Ltd.
Flex|Air |3D|Unity|
www.neurotechresearch.com
http://blog.alladvanced.net
Tel:054-4962254
[email protected]
[email protected]

Reply via email to