In this very short tutorial, I'll show you the Compositing node setup I created to add a black outline around objects rendered on a transparent background in Blender 4.3.
Video Transcript
Hello everyone! In this very short tutorial, I'll show you the Compositing node setup I created to add a black outline around objects rendered on a transparent background in Blender 4.3. This effect is useful for creating logos or icons.
I'll show you the node setup right away so you can copy it and use it in your projects. After that, I'll briefly explain the logic behind this setup.
As you can see, the setup includes a Crypto Matte node. So, before starting the rendering, you need to enable the Crypto Matte Object Render Pass in the View Layer tab of the Properties Editor. This will allow you to use this information in Compositing.
To render objects on a transparent background, you also need to enable the Transparent option in the Film section of the Render tab in the Properties Editor before starting the rendering.

As with many of my other video tutorials, the PDF version of this tutorial is available for free at the link in the description. This is also a great time to subscribe to the channel and enable notifications so you don’t miss upcoming tutorials!
After setting Film Transparent and enabling the Crypto Matte information, we can render the scene and move on to Compositing to add the black outline around the rendered object or objects.
I extract the mask of the object or objects to be processed using a Crypto Matte node. The mask should be taken from the Matte output, which returns the white mask of the specified objects in the list on a black background.

This mask can be immediately sent to a Dilate Erode node with a high value for the Distance field. This will expand the white mask on the black background.

As you may have already guessed, this mask can be used to create borders of other colors or with textures. In my case, I wanted a black outline, so I connected the mask to an Invert Color node, obtaining a black mask on a white background.
To get a black mask on a transparent background and use it as an outline for the objects, in theory, it would be enough to connect the output of Invert Color to a Set Alpha node, then connect the expanded mask from Dilate Erode to the Alpha input of the Set Alpha node. However, the resulting image sometimes has an annoying white outline.

For this reason, I added a Dilate Erode node between Invert Color and Set Alpha, with the Distance field set to -1 or another negative value, slightly shrinking the border applied to the object.
The new Dilate Erode node should be duplicated and inserted, with the same value, between the original Dilate Erode and the Alpha input of the Set Alpha node. This ensures that the black outline and its transparency mask remain consistent.
In any case, by adjusting the value of the first Dilate Erode node, we can increase or decrease the border thickness without any issues.

The final step is to overlay the original render, which was already on a transparent background, onto the black mask we created. To do this, I connect the output of Set Alpha to the first Image input of a new Alpha Over node, then connect the image output from Render Layers to the second Image input of this new Alpha Over node.
As mentioned, the resulting image can be used for logos or icons. Try adding a Pixelate node at the end if you like Pixel Art!


Alright, that’s all for this short tutorial! I hope you found it useful! See you next time!