Require: Particle system features

Software: Away3D 4.x

laoyu2003, Newbie
Posted: 21 March 2013 05:37 AM   Total Posts: 14

Particle system features in away3d:
- a local data when a particle rebirth
- a global mode paritcle feature, i.e. partlce emitted is in world space
- a better boundingbox for particle mesh

   

CyrilM, Newbie
Posted: 28 March 2013 02:28 PM   Total Posts: 15   [ # 1 ]

Hey,

I’ve worked with the particle system a little bit and you should be able to do what you are looking for without any extra Away3D features.

I’m not sure what you are asking in your first line, but for global position, all you need to do is leave the particle system at (0, 0, 0). Then technically all the particles are in global space. The problem then only becomes the bounding area. The particles will disappear when the origin point (0, 0, 0) is off screen.

What you need to do to solve this is
particleMesh.bounds.fromSphere(new Vector3D(), 100000);
What this does is change the view bounds on the particle system to 100K units. You can actually set this to whatever you want, usually the size of your frustum if you want it visible everywhere.

Hope that helps.

   

laoyu2003, Newbie
Posted: 30 March 2013 09:24 AM   Total Posts: 14   [ # 2 ]
CyrilM - 28 March 2013 02:28 PM

Hey,

I’m not sure what you are asking in your first line, but for global position, all you need to do is leave the particle system at (0, 0, 0). Then technically all the particles are in global space. The problem then only becomes the bounding area. The particles will disappear when the origin point (0, 0, 0) is off screen.

Hope that helps.

The particles emitted in the current particle system is local mode. the entire particle is in fact a mesh. particles’s position is in its local space. If you move the particle mesh around, you’ll see the the particles move along with the mesh.

The only way I found is let the particle follow another object3d, so it can left a trail behind it.

So how to implement global particle? I have tried but failed, because I cannot change the rebirth particle position, i.e., once it was set, it will not be changed unless you change the rebuild the geometry of particles(quoted from LiaoCheng).

What I did was adding a ParticleGlobalNode, it converts the particle from local space to global space. If the particle rebirthed, I cound fetch it’s current position in global space. But, I faced to rebuild the particle geometry, it’s too expensive for flash. I hope somebody can find another way to implement global mode. I think the easies way is to modify ParticleTimeNode, add a particle rebirth position constant. Ofcourse, the particle system should know when to generate new particle. Badly, it fall back to CPU mode.

As to the particle following node, It’s calculated in CPU mode, so it’s not the best way to do global particles.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X