World Space Glow Effect

Hi all, I’m new to panda3d but familiar with several 3d game concepts. One question I have that I can’t seem to figure out from the manual is how to get a specific effect using the particle system.

Basically I’d like to mimic the “World Space Glow” effect used by the env_sprite entity in the Source engine. You can see an example of what I’m talking about here: (scroll to the picture)
developer.valvesoftware.com/wiki/Render_Modes

Basically, it renders the particle on top of all other geometry unless the center point is hidden behind some object (it has a “radius” that it begins to fade out at as well if that makes any sense).

I’m currently using the particle system to draw an alpha-transparent sprite(s) but it still has the z-buffer check so it clips through my model:

How can I get it to render in front of the model (but only when the center “sphere” is visible)?

You can, of course, turn off the z-buffer for your effect with nodePath.setDepthTest(False); then it won’t be clipped by your ship. Of course, it will also be drawn regardless of whether the center point is clipped or not.

I suppose you could also achieve this kind of effect with a small particle and a large bloom filter applied to the entire screen, but it wouldn’t be precisely what you’re describing.

Other than that, you would have to write a custom shader to render the particle. This shader would be written perform the depth test against the particle’s center point only.

David