Transparent object visible in render when its supposed to be invisible

I followed this tutorial in order to make a muzzle flash for a gun.

The muzzle flash sticks to the barrel of the gun, and goes back and forth from emission to transparent.
In my blender file. When the mix shader is 1, the transparent texture is active. When the mix shader is 0, the emission shader is active.

As you can see. In the viewport, the shader is exactly how it should be, but in the render it is visible.
How do I fix this?

Nice, quick video. Wife’s voice; ha! I should try that :slight_smile: Does the effect work without the compositing in Eevee?

First, I would check and set the blend mode to alpha hashed in the properties panel → material tab → settings. From there we can see results and think later on if more adjustment are required

1 Like

I’m using cycles, I think that option only exists in Eevee. But when I did switch to Eevee, that just made the whole thing look jet black.

I though you were using Eevee . My bad :innocent:
I’m wondering what could cause that kind of shadow to appear. It may sound stupid at this point but have you check already if transparent shader color is pure white?
Other way to solve the issue that comes across my mind could be to uncheck diffuse visibility in object tab. That would make the emission shader visible but cycles won’t render shadows for the object itself

Much appreciated!