1 The idea
Before eroding, try a gamma on the alpha just before the Merge (a Grade with channels = alpha). Below 1 thins the edge so more background shows; above 1 thickens it. It keeps far more detail than an erode.
In this lab the Grade sits before the Premult, so the edge moves towards the background colour: a brighter background makes it brighter, a darker one darker. Move the Grade after the Premult, right before the Over, and a lower alpha can only make the edge brighter or leave it. Watch the robot’s arm edges.
2 Hands-on in the mini compositor
The first edge fix after despill
Where the numbers come from: Computed in your browser. Saturation, Multiply, Clamp, Invert, Keymix, Copy and Grade are checked against node-based compositing software. Blur, Defocus, Glow, Sharpen, ChromaticAberration, Vignette, LensDistort, Grain, Erode, Toe, the Keyer and Despill are teaching versions, not identical to Nuke’s nodes. Transform here is also a teaching version: bilinear filtering, no concatenation, cropped at the frame edge. Images are our own Blender renders (the green screen is fully code-built; the desert scene uses Gaea 2.3 hills, a Poly Haven CC0 HDRI sky, Poly Haven CC0 rocks and grass, Quixel sand and cliff textures and a Mixamo rig for the robot, with Quixel and Mixamo used in the renders only).