I know that for transparent object, unity render them from back to front. That make sense, but why I am getting these effect when the explosion is happened behind the smoke?
I use alpha blend for both of them, and it seems that the explosion has completely overwrite the smoke in terms of rendering.
Can it be due to that the explosion is happened after the smoke is poped, In that case, maybe the alpha blend shader of explosion may override the smoke one?
I can’t see your picture (broken link icon) but I’ll take a guess.
Particles can sort per-system or per-particle. I’m not sure if per-system sorting is based on the pivot point or the center, but I suggest that’s probably the culprit here.
Alternatively, I think you can turn on per-particle sorting, but keep in mind that it’s significantly more expensive. Unless you want the systems to be on top of one another or need sorting within a system it’s better to get things working with the per-system sorting. Basically, you want to sort on as broad a level as possible.
Basically I am implementing a smoke bomb effect that emits thick smokes, but the smoke will get overrides by the other particle that suppose to be happened behind the smoke from the camera point of view.
If I want to keep the per-system sorting, do I need to make sure my particle system is scaled large enough? Normally how is a smoke bomb effect should be implemented?
That picture isn’t actually very helpful to me. It’s not clear that the flame is overriding the smoke. It’s clear that both are clipping with the ground. Can you remove the ground plane and show just the particles?
Sorry for the picture, I just noticed that is not very self explanatory! So here attach the side view, basically what happen is when my tank pop out a smoke screen, if explosion or any other particle effect happens behind that smoke, smoke particle will get overridden.
If you see through the smoke form the front, you will see the effect on my previous picture. Here attached the unity cloud build if you want to try out
The explosion is came from the Detonator Explosion Framework, I am not entirely sure how that works but I think the problem is causing by my smoke, I tried to change the explosion to other particle it produce the same effect, also other particles beside the explosion in the scene can “break through” my smoke as well.
Alright, first of all look into ZTest. You haven’t specified it and I’m not sure of the default, and that’s all about what can draw on top of what.
Secondly, I’d suggest trying the default (built-in) alpha-blended particle material, see if that suffers the same thing.
Well after another wave of searching and trying, I still could not solve this problem nicely. I decide to change the render queue of all my particles dynamically by scripting as one of the answer suggested:
It seems to be working so far, but I am just wonder if there is any other elegant way of doing this… I am sure there should be one cause this problem suppose to be simple in my point of view.