Away3D4 Flint particles branch gets 100% boost by implementing particle pool system

Software: Away3D 4.x

Avatar
SasMaster, Sr. Member
Posted: 15 June 2011 08:38 PM   Total Posts: 127

Well ,just finished implementing my new particle pool buffer for FLINT Away4 branch. I managed to get 100% performance boost.Now you can render some 2000 particles on a descent GPU getting 20-25 FPS per second (Each particle is 1 segment plane,still haven’t tested on Sprite3D).So while this is not pure 50000 massive particles system like that of mrFunkyPants it runs in Away3D wink) .Demos + source code soon in my blog.Those who are interested to test can get the molehill branch from here:https://github.com/sasmaster/Flint

 Signature 

This looks like a job for superman
http://blog.alladvanced.net

   

Concept Z, Sr. Member
Posted: 16 June 2011 03:06 AM   Total Posts: 124   [ # 1 ]

Happy to hear that !

The GitHub Code Version for Away3d 4 branch is from April 05, 2011,still not updated ?

Looking forward to enjoying that !

 Signature 
signature_image

Anyone can cook but only the fearless can be great

   

Avatar
SasMaster, Sr. Member
Posted: 16 June 2011 06:07 AM   Total Posts: 127   [ # 2 ]

I am not sure what you are talking about.Do you mean Away4 fork? Updated yesterday .Also using FLINT you don’t need (even not recommended )to use embedded version of Away.Just link to the updated repo.
Regards.

 Signature 

This looks like a job for superman
http://blog.alladvanced.net

   

Avatar
Sintesis, Newbie
Posted: 22 June 2011 10:45 AM   Total Posts: 7   [ # 3 ]

In WebGL well to manage with this problem! Many objects in minimum draw call
see video

   

Avatar
SasMaster, Sr. Member
Posted: 22 June 2011 10:53 AM   Total Posts: 127   [ # 4 ]

In Flash you can do that too if you write particles framework from scratch (like mcFankyPants did in his 50000 particles demo) But I build on top of existing engines ,that is interfacing them with FLINT .Once Away3D implement a particle batching system on the low level I will be able to utilize it in FLINT and get maximum from it .BTW Flare3D already did it .Check their showcase on built in particle system.I have been working to integrate it with FLINT behaviors now smile

BTW , I would not stake too much on WebGL .Have you heard that Microsoft kicked it out of IE ?

 Signature 

This looks like a job for superman
http://blog.alladvanced.net

   

Avatar
Jeff, Newbie
Posted: 14 September 2011 10:48 AM   Total Posts: 30   [ # 5 ]

Hi SasMaster,

I have a problem using latest Flash release, it seems there is a problem on Away3D4Renderer when disposing the material :

Mesh( particle.image ).material.dispose(false);

I got an error when particules are removed :

Error: Error #3663: Sampler 0 binds an undefined texture.

If I comment this line, everything works of course until no more memory available grin

Regards,

Jeff

   

Avatar
SasMaster, Sr. Member
Posted: 14 September 2011 10:54 AM   Total Posts: 127   [ # 6 ]

Mesh( particle.image )material.dispose(false); is a pure Away3D code.The problem is that when I wrote Away4 FLINT module FP11 was only at the per-release stage .So now I am not sure if someobject3d.material.dispose(false) would work fine with the latest FP.have you tried to call this method in a regular Away3D 4 (latest build) scene? Does it throw something similar ? If it does then the problem with the Away3D if not -it means I have to do some fixes in FLINT.Please make a test on some Away3D object calling dispose(false) unrelated to FLINT and tell me if it works ok.

PS; Please also submit this bug to Richard Lords’s FLINT official forum page:
http://flintparticles.org/forum/

 Signature 

This looks like a job for superman
http://blog.alladvanced.net

   

Avatar
Jeff, Newbie
Posted: 14 September 2011 11:32 AM   Total Posts: 30   [ # 7 ]

I tried on Away3D, material disposal works fine :

var myobj:* = mycontainer.getChildAt(1);
mycontainer.removeChild( myobj );

Mesh( myobj).material.dispose(false);
Mesh( myobj ).dispose(false);

   

Avatar
SasMaster, Sr. Member
Posted: 14 September 2011 11:37 AM   Total Posts: 127   [ # 8 ]

Have you applied a textured material to the particles in flint? Also ,do you use the latest FLINT release ? Please send me to the email your code (via Google Away3D group) and I will try to fix the problem smile

 Signature 

This looks like a job for superman
http://blog.alladvanced.net

   

Avatar
Jeff, Newbie
Posted: 14 September 2011 12:35 PM   Total Posts: 30   [ # 9 ]

Thank you for your support

You are right I think I was not playing with latest branch, and now I’m a bit
lost because I also found richardlord branches ...

https://github.com/sasmaster/Flint/branches
https://github.com/richardlord/Flint/branches

master, localmaster, localmolehill ... could you please tell me which one is the good grin.

and now a new error TypeError: Error #1034: Type Coercion failed: cannot convert Object@6bae539 to away3d.materials.MaterialBase.

I’m using your code example Away4Flint_basic.as by importing this

org.flintparticles.integration.away3d.v4.A3D4Renderer;
org.flintparticles.integration.away3d.v4.initializers.A3D4ApplyMaterial;
org.flintparticles.integration.away3d.v4.initializers.A3D4ApplyMaterialClass;
org.flintparticles.integration.away3d.v4.initializers.A3D4ObjectClass;
org.flintparticles.integration.away3d.v4.initializers.A3D4ObjectClasses;

var appMat:A3D4ApplyMaterial=new A3D4ApplyMaterial( new BitmapMaterial( bitmapMat.clone() ));
_emiter.addInitializer(appMat);

Maybe it could be interesting to have a up to date example ...

   

Avatar
SasMaster, Sr. Member
Posted: 14 September 2011 12:39 PM   Total Posts: 127   [ # 10 ]

smile .Let’s bring some order into this mess. Forget about my fork.It was created during the dev work and MUST NOT be used anymore.You have to Use Richard Lord’s official release :https://github.com/richardlord/Flint/tree/molehill  
Make sure you select the molehill branch.

Hope it helps .Please notify me if you are experiencing any bugs or other issues.

 Signature 

This looks like a job for superman
http://blog.alladvanced.net

   

Avatar
Jeff, Newbie
Posted: 14 September 2011 01:07 PM   Total Posts: 30   [ # 11 ]

Solved ! thank you for your so efficient support !

but there is still an important issue, how to dispose material and mesh when a particle is dead. The particles emitter works fine but also generate an important memory leak ... I have tried to use pooling same result ...

Comments from A3D4Renderer.as :

// We can’t clean up the 3d object here because the particle may not be dead.
// We need to handle disposal elsewhere

so

Mesh( myobj).material.dispose(false);
Mesh( myobj ).dispose(false);

do not work, this is a Flint issue to solve

Regards,

Jeff

   

Avatar
Jeff, Newbie
Posted: 25 September 2011 10:27 PM   Total Posts: 30   [ # 12 ]

Hi all,

I have finally build a simple particles engine to play with ....

The best improvement speed / memory was to use an atlas texture for the alpha and play with UV ( only one material ).

Actually I have 800 particles at 60FPS with scale / alpha / rotation, over 800 frame rate drop.

Than I find this :

http://www.bytearray.org/?p=3431
http://www.starling-framework.org/

A 2D framework with a Particle Engine, then to check performance I put 2 stage3D on the same scene side by side .... mine with 800 particles + Starling with 2000 particles ... still 60FPS ????

   

tomihr, Jr. Member
Posted: 29 September 2011 11:36 AM   Total Posts: 31   [ # 13 ]

Hello is there an example of using Flint particles in the Away3d 4.0, because I can’t find it?
Thanks

   

Avatar
SasMaster, Sr. Member
Posted: 02 October 2011 04:15 PM   Total Posts: 127   [ # 14 ]

You can find the examples for using Away4 and FLINT here:
https://github.com/richardlord/Flint-examples .

Also ,here is small announcement.FLINT is undergoing some major change where the important one-native Stage3D based particle rendering system.
Stay tuned for updates.
Here is a quick demo of the current state:
http://youtu.be/5x8saUN4oPs

To Jeff:
The Starling performance is so good because it an extremely lightweight framework.If you add more calculations to the particles (as is done in FLINT) such as angular velocity,random motion ,acceleration ,dynamic color change ,etc .. you will see the significant fps drop.Let’s say that my new FLINT module (Native Stage3D particles) whose design is pretty same as that of Starling gives around 25FPS for 1300 particles per frame.And that is because there is a lot of math going on the CPU.If you want to optimize try to offload as much of those calculations to the GPU as possible.Additionally vertex batching is the key word here.Loading buffers for each particle is an expensive task.If you send to the GPU all the particles in a single batch you can gain orders of magnitude in performance.But that is already not so simple .See McFunckyPants blog for more details smile

 Signature 

This looks like a job for superman
http://blog.alladvanced.net

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X