Render object with shadow on top of other object

hey, i want to overlay the buttons and their shadows onto the background. for this, i need to render the buttons, specifically what’s visible and sticking out and its shadows on their own transparent layer. i managed to get a mask of the buttons itself by making the background total black and the buttons emission, but when i try and use a shadow catcher it renders the hidden parts and no shadows.

the buttons with background and the background:


the borked shadowcatcher following youtube guides:


My addon should be able to do this. First, render the background and save it. Then, render the buttons using the shadow catcher, and use the previously rendered background as the background image. You’ll need to modify the compositing node setup to disregard the buttons, and then re-save the image, which should give you the BG with shadows but minus the buttons.

NB. I’ve added features and so the YouTube video is out of date. It will still give you enough info, but the toolshelf in compositing has added features now if you grab it from github.

I really must get around to making an updated video.

nope, same result :confused: