- Home /
Opaque particles do not contain transparency
I'm trying to create a group of opaque, black particles. I have a .PNG I am using which contains a black image against a transparent alpha background.
However, when I try to create opaque particles in Unity (using the Particles / Standard Unlit shader), all I can seem to get are these black boxes.
When I change particle emission color, I notice that i can see the desired shape inside the black box, in the specified color, leading me to believe that the alpha channel is simply being interpreted as black.
I have double checked to make sure that the texture's "Alpha Is Transparent" box is checked.
Thank you in advance for the help!
Answer by Namey5 · Feb 24, 2020 at 05:39 AM
Opaque and transparent are complete opposites, therefore you cannot have an opaque material with transparency; it just doesn't really make much sense. All particles are rendered as quads, as such if you set the render mode to opaque, the whole quad will be drawn with whatever texture you have set as the colour. If you wish to have transparency, you'll need to change the rendering mode ('Fade' for traditional alpha blending, 'Cutout' for opaque with a set outline, 'Transparent' for pre-multiplied transparency, etc).
Hi! I appreciate the response. I've tried Fade, Cutout and Transparent, but in every case, the particles simply disappear.
Here is the image I am trying to use for the particle, where the white is all transparent:
I downloaded and looked at your image, and it would appear the alpha channel is fully opaque. I would make sure you've actually written to (and stored) the alpha channel from wherever the image was created; and if that continues to not work, then I would use the inverse of this image and import with alpha as grayscale. From there, you can set the albedo to black by using the main colour.
Actually, I've noticed when I try 'Transparent,' and change the patrticle's albedo from black to any other color, it suddenly appears as intended. However, black simply becomes invisible.
This is because alpha blending works by weighing colours on screen. Pre-multiplied ('Transparent') transparency assumes that you have already blended the alpha before-hand, interpreting lower intensity colours as more transparent. Hence black is interpreted as fully transparent, whereas white is interpreted as fully opaque.