Particles with alpha reveal background, not other SOPs?

I have a setup with 3 geos, two of them are just SOPs with phong textures and one has a particle generator. If I give one of the non-particle geos a texture with alpha less than one, I can see the particles and the other geo through it, but if I set the particles’ alpha to less than one, only the background shows through, and they “hide” whatever geometry is behind them. This happens both with a point sprite texture, or if I’m using the particles to copy an SOP with a phong texture. Am I missing a setting somewhere or is this a bug?

Is transparency enabled for all shaders? An easy one to check but might not be the issue. A bit fuzzy on what I did last time I ran into this, maybe also check render priority for the particles?

Thanks, yeah I checked that one, there are a ton of other settings like blend mode I’ve been messing with but no luck.

Now that I look at it again, having an alpha map seems possibly part of the issue too:

  • phong texture with an alpha map correctly reveals another geo behind it
  • phong texture with no alpha map only reveals the background if I turn down alpha
  • particles only reveal the background with or without phong/alpha map/point sprite…
    unless I’m missing some other checkbox!

might also try sorting your particles by distance from camera, that fixed some transparency issues I had once too now that I think about it. I forget if it’s front to back or back to front but try both and see if any makes a dif!

1 Like

like, with the sort SOP or something else? Do you set the camera as the object in there?

hmm, I think I’ve fixed this by going into settings for the render TOP and changing transparency to Alpha-To-Coverage or Order Independent Transparency. It seems like the former mode will always render the texture as translucent, and the latter will always render it as varying between opaque and transparent (like, a 1-bit texture). No idea if that’s right?

Lot of weird variations to play around with, thanks…

Checking this more, it seems like the alpha map is inverted with Alpha-To-Coverage mode with Depth Peel turned off. Or possibly, inverted for every other mode. Trying to find the right TOP to invert the alpha texture and failing right now. :exploding_head: :sweat_smile:

Share an example file and we might be able to walk through it with you.

tree-example.toe (7.5 KB)

Hey, here’s a simplified example. Now that I’m taking a fresh look it this, it seems like the problem may be the inversion I mentioned: if you switch transparency on the render to Alpha-To-Coverage, it seems like the alpha map of the particles in geo3 gets inverted (to what I think is actually correct, looking at the noise I used for it). However, geo1 looks the same in every transparency mode, so it still seems particle related?

Would be great to know both if this is intended behavior, and if there’s a way I can invert the alpha map to try it in the other modes.

Have you read through this to start?
https://docs.derivative.ca/Transparency

Also, for proper transparency (and compositing too) the rule is that your alpha channel always needs to be >= the value of any of your RGB channels. Having your alpha at 0 for the Noise TOPs isn’t going to get you correct result. Likely you want them set to ‘Noise’.
Alpha to Coverage probably isn’t the right path for this one, as that is more useful for very busy scenes, like ones doing huge amounts of particles. It’s a total hack that is useful for very specific situations.

1 Like

Thanks, looking through the docs is helping. I’m getting order independent transparency working since this has some particles and I can’t really manually sort. Still unsure about the “inversion” problem re: the noise texture though…

You lost me a bit at this part - if I change that parameter on the noise, it doesn’t seem to affect anything in the mat or the render? Does that depend on the render mode too?

Well it depends how you have things setup. But the alpha is what controls the transparency amount. However a rule of having proper transparency/compositing is that the alpha value always needs to be >= any of the R,G or B channels. Otherwise they are illegal colors which don’t make sense for transparency or compositing. Having an alpha of zero with RGB >= will result in an additive blend since you’ll get 100% of the background getting added with your foreground.

1 Like