Normal method is by looking at an scene, viewing the animation and trying figure out, how to remove all of the foreground material.
Example here from MU108 episode "Teela's Triumph", where Teela walks into the Castle Grayskull.
And just from those two shots, I can extract her, so we can clearly see the hallway that leads into the castle.
For an shot that requires a tad more work; I've also given an example of creating an exterior shot of the entrance to Castle Grayskull.
The screenshots below are from the MU001 episode "The Cosmic Comet" as Evil-Lyn and Beastman are ready to attack the heroes.
I wanted to get a full shot of the angle, without the characters, and while Evil-Lyn never moves, I needed Beastman to move out of the way, which he luckily did.
Thus with acquiring many shots of the rocky entrace-piece on the right side, I was able to construct it. The sky-backdrop unfortunately can't be authentically recreated here, so I take a small leeway here, and use part of the sky from another shot, to create the final outcome.
Usually I only stick to recreating backgrounds where I simply take the character out, without any extra additions, but in this case, I wanted to see how this exterior part of Castle Grayskull's entrance looked.