This is a experimental alpha composite suggestion that I don’t know how to make.
To clarify: My suggestion is partly the “Partially Transparent A and B” but the alpha that has a higher value is only rendered and all pixels under it are masked out.
If anyone has any suggestions where to look or if there exist a similar type of shader/material let me know.
I am thinking that this could be a powerful tool/function when having a lot of low opacity particles like dust or smoke.
I am mainly using Unity, but could be valuable knowing how it works in unreal because I am starting to get quite familiar how it works.
I think what you mean is that one could use variation in literal dust opacity as the driver for final pixel color instead of dust density. (Which is what particle shaders tend to do right now (srcAlpha + oneMinusDstAlpha).
If any shader has a greater than blending option, that might work. But it will probably have some really weird artifacts with any other opacity based item in the scene.
In unity,
BlendOp Max might do something similar to what you are asking.
I have no idea if unreal has something like this, but I imagine if you want to acces source code you could easily write this functionality yourself during blending in the render pipeline.
As I see it you are presenting a method for minimizing overdraw. So never would one particle be drawn over another particle, even though they both are partially transparent?
It looks like he’s going for how Wind Waker handled it’s transparency, where you can’t see particles behind other particles, even if they’re transparent.
Seeing as Chris’ other work seems pretty Wind Waker inspired I’m guessing this is the effect he’s trying to achieve.
@Niels
Those links and comments you added certainly seems related to what I am looking for.
I still haven’t been able to do proper research but I intend to do it, Thank you for digging this for me.
@CellarPhantom
Its not necessarily to optimize, its overlapping of particles I want to get rid of. If it would potentially optimize the render that would be great!
@TheVman
Exactly! the windwaker game seems to have gotten the effect just right. Thanks for showing a clear reference.
Sadly the tutorial do not seem to include that alpha solution:
Yea Wind Waker’s the only game I’ve seen to do such a thing with it’s alpha. Though from what I can tell, they seem to have some system where you can scale the alpha of an entire particle emitter uniformally, rather than having the particles scale individually. All of the particles in the core smoke of the explosion fade alpha at the same time, so I doubt the effect would work correctly if they had staggered lifetimes.
Meanwhile other effects in Wind Waker, such as the debris trails from the explosion seem to have far more typical alpha sorting.
You can see here the debris trails overlapping as their alpha fades.