Question about ParticleSystem


#1

when I Set Particle Extents to (5,5,5), and speed set to constant, I found some strange particles on the left side of the spawn position. It disappear in a very short time. Is any one know about this problem?
Here is the gif . And the lifetime is 5.


#2

I think what happens here is that particles that spawn more to the right of the spawn box returns to the start after they reach the end, and then disappears after their lifetime runs out - and that looks as if new particle spawned and after a short time despawned.


#4

I am agree with you. I try to finger out this problem by rebuild the particle frag shaders, but its too hard to debug
and read the shader program.


#5

I have the same problem with you, Is anyone know how to solve it?


#6

Nope, we can try.
You don’t have to rewrite the whole shader, you can add custom chunk to your material.


#7

It will happen after a lifetime circle. Of course I was add custom chunk to test it.


#8

Try to change color during lifetime, these strange points have start color or not?


#9

This is the color over lifetime. You can test it too, it makes me confused.


#10

Okay, then probably it works this way.

The only think you have to do - is to calc lifetime path length and sub offset of emitter.
But you have to mind about direction… ehhh


#11

oh no , it’s too hard


#12

Then try to play with localVelocity.


#13

Is that in the preview in the editor? I’ve seen weird artifacts that are only in the preview and not in the actual launching of the app.

What happens when you deselect the entity and reselect it again?

Can you share the project as well please?


#14

I have try both in Editor and Runtime, the problem still exists.
This is my test project url : https://playcanvas.com/editor/scene/559792


#15

Hmm… That actually looks like a bug to be honest (good find). It be worth entering an issue in the GitHub repo with a link to the project to show the issue.


#16

I just post the link and issue to the github, thank you for discussion. :grinning:


#17

Try changing the sorting of the particles to something else. Does it still happen then?


#18

Changing it to any other sorting method besides none ‘fixes’ the issue. Does this come at a cost to performance though?


#19

Yeah it’s a bug with gpu particles. It will have an impact on performance because using sorting means particles will now use the cpu instead.


#20

I was noticing this with the particle effect I’m working on right now. It seems that when the sorting method is set to none, any particle that comes in contact with the outer bounding box of the particle system that hasn’t reached the end of it’s lifetime just wraps back around to the opposite side until it’s lifetime ends.


#21

Thank you, if I change the sorting of the particles, it is OK. But I really want to use gpu particles.