How to hide a volumetric object in the final render but keep the effect it has on the light?

I want the background of this render to be transparent but I’m using a cuboid with principled volume shader to get that diffused red glow effect beneath the main object. The light source is the bottom side of the main object so the light source isn’t directly connected to the volume cube. How do I retain the diffuse effect while hiding the black color of the atmosphere? Is there a better way to get that faint glow with transparency?

Hi. Try ticking Transparent under Properties > Render > Film.
Light Path node may also help here as an input to mix Transparent or Holdout shaders.

Thanks for the reply. I have already checked Transparent option under Film. But the black color of the volume is still rendering since it’s not transparent. As for your second suggestion, could you please elaborate a little more? It’s only been 1.5 weeks since I started using Blender and this is my first time using a 3D program so I still don’t understand every single shader/node and how to use them.

If it’s not an animation you can render just the object without the volume and add an Outer Glow on a copy layer in photoshop. It’s cleaner and you have more control. In blender I’d try to use a Volume Scatter node linked to Worlds volume input. Of course, without the volume container.

Elaborating on #2:
VolumetricAlpha
Just a way, not presented as the way by any means. Enjoy, and please mark as solved if it did.

1 Like

Thanks again for the reply and sorry for asking dumb questions.Your method does make the background transparent but the glow also looks more diffused than what I had before. It doesn’t look as sharp. I tried changing the all the values that I could change and even tried changing the factor for the density to a quadratic gradient but nothing seems to be working.
Edit: Forgot to add that I also tried changing the emitter value but it just made the light brighter/dimmer. I couldn’t adjust the fall off. And as for the light fall off node, it doesn’t seem to be doing anything either.
I have no idea why the glow was so sharp with the vanilla principled volume shader but isn’t with this setup.

Yes, I could use Photoshop but it’d be great if I could learn how to do it in Blender itself. It might come in handy when I do ever decide to do an animation or maybe even something totally different. And I tried plugging the volume scatter node into the world input but it just made the whole scene a reddish tint. I couldn’t control what part of the scene should diffuse the light etc.

Update: I’ve finally found a way to get that sharp glow along with the transparency. @LoboTommy 's method works perfectly. All I had to do was plug the Light fall off with quadratic output into the Density input of the Principled Volume with rest of the setup being the same as in LT’s post. Thanks everyone!