You want to generate a "fantasy world seen through a keyhole" image. You write a detailed prompt describing the magnificent castle, flying dragons, and glowing forests on the other side—and what you get is a black oval frame with a generic landscape inside. The keyhole looks like it was drawn in PowerPoint.
This failure hits 90% of people, and there's only one reason: you described the world inside the hole but completely ignored the hole itself.
The core of keyhole composition isn't "what's inside"—it's how the keyhole's material texture and surrounding absolute darkness frame the world within.
The Target Effect

Notice three layers:
- Outermost: pure black — not gray, but "can't see anything" black
- Middle: keyhole wall material — with scratches, sheen, and physical depth
- Innermost: fantasy world — with depth of field, light sources, and detail
All three layers are essential. Most failed versions only have layers 1 and 3—black frame + landscape—missing layer 2's "physical keyhole," which is why they look like cutouts.
Why "Only Describing Inside" Always Fails
Let's dissect the failing prompt:
❌ A view through a keyhole showing a magical fantasy castle
with dragons and glowing forests.
What's missing:
| Missing element | Resulting problem |
|---|---|
| No keyhole material description | Keyhole becomes a simple black silhouette shape |
No very black background |
Surrounding becomes gray or gradient, insufficient contrast |
No sharp focus |
Interior world goes blurry |
No photographic |
Style drifts toward illustration rather than photo-grade |
Key understanding: AI generating "keyhole viewpoint" needs two independent instruction sets—"outside the door" and "inside the door." Describe only one side, and the other defaults to AI's random choices.
The Solution: Dual-World Description Method
Complete prompt:
Looking through a [MATERIAL] keyhole towards a mythical [WORLD]
dark fantasy, very black background around keyhole, sharp focus,
photographic.
Outer World: 3 Parameters
Parameter 1: Material
The most critical parameter. It determines whether the keyhole has "physical presence."
| Material | Visual | Best for |
|---|---|---|
antique ornate brass |
Carved antique bronze with verdigris | Victorian fantasy, steampunk |
rusty weathered iron |
Rough rust texture with pitting | Post-apocalyptic, horror |
moss-covered stone |
Stone with moss and cracks | Nature fantasy, elf worlds |
polished future-tech glass |
Sleek tech glass with reflections | Cyberpunk, sci-fi |
Parameter 2: very black background
The word very is crucial. Plain black background might produce dark gray. very black forces near-pure-black, creating the "tunnel vision" effect—your eyes have nowhere to look except inside.
Parameter 3: sharp focus, photographic
These ensure the image doesn't artificially blur to "simulate optical limitations." Without them, AI sometimes adds unwanted depth-of-field blur to keyhole views.
Inner World: 3 Parameters
Parameter 1: Scene type
Replace generic "fantasy world" with specifics:
| Scene | Effect |
|---|---|
a floating bioluminescent castle above clouds |
Glowing floating castle |
a valley of ancient sleeping dragons |
Dragon-filled mountain valley |
a sun-drenched enchanted flower forest |
Sunlit magical flower forest |
a neon-drenched cyberpunk megalopolis |
Neon-soaked cyber city |
Parameter 2: dark fantasy mood anchor
dark fantasy tells the AI: this world is beautiful but dangerous. Without it, fantasy scenes may drift to "children's storybook" style.
Alternatives:
bright high fantasy→ bright Lord-of-the-Rings stylewhimsical fairy tale→ storybook stylecosmic horror→ more extreme dark direction
Parameter 3: mythical scale hint
mythical hints at beyond-normal scale. Castles grow taller, dragons larger, forests denser. Remove it and scenes become more "ordinary."
Step-by-Step: Material Selection to Final Output
Step 1: Choose a material + world combination. Beginners: start with antique ornate brass + floating bioluminescent castle—highest success rate.
Step 2: Assemble the prompt:
Looking through an antique ornate brass keyhole towards a mythical
floating bioluminescent castle above clouds, dark fantasy, very
black background around keyhole, sharp focus, photographic.
Step 3: Check three elements in the output:
- ✅ Keyhole walls show material texture (scratches, sheen, or rust)
- ✅ Surrounding area is deep black (not gray or gradient)
- ✅ Interior has depth (layered near-to-far, not flat)
Fine-Tuning: From 60 to 90 Points
Tune 1: Light reflection on keyhole walls
...with faint warm light from the fantasy world reflecting off
the brass edges of the keyhole...
Tune 2: Atmospheric particles
...motes of golden dust dancing in the light beam passing through
the keyhole...
Tune 3: Age marks on the keyhole
...the keyhole rim shows centuries of use: worn metal, tiny
scratches, and the faintest trace of a cobweb in one corner...
For related framing techniques, our letter landscape beach composition guide uses a similar "scene inside a shape" approach.
Alternative Frames
Keyholes are just one form of "frame composition." Other options:
| Frame | Prompt approach | Visual |
|---|---|---|
| Door crack | Looking through a cracked wooden door gap |
Wider view |
| Telescope | Looking through brass telescope eyepiece |
Circular + lens optics |
| Wall hole | Peering through a hole in a crumbling stone wall |
Irregular shape, ruined feel |
| Window | Looking through a frosted window with a clear spot |
Frost texture + clear area contrast |
Choose by need: mystery → keyhole, discovery → wall hole, tech → telescope, warmth → window.
Try different frames in nanobanana pro to compare results side by side.
FAQ
Can the keyhole shape be customized?
Yes. Standard keyholes are round-top, rectangular-bottom. You can use star-shaped keyhole, heart-shaped opening, or cross-shaped slot. But the further from standard keyhole shape, the weaker AI's understanding of "peeping viewpoint"—it may become "a shaped border" rather than "a world seen through a hole."
How do I add an observer's reflection?
Add with a faint reflection of a mysterious eye visible on the polished metal surface. This creates a blurry eye reflection on the metal, adding "someone is watching" narrative tension. Results aren't always precise—may need retries.
What if the black background isn't dark enough?
Two fixes: 1) Change very black to absolute pitch black, OLED-black; 2) After generation, use Levels in Photoshop to crush darks to pure black. Method 2 is more controllable.
Is this good for a series?
Excellent. Keep keyhole material consistent (e.g., always antique brass), change only the interior world for a stylistically unified series. Recommend 4-6 pieces covering different mood themes (fantasy, horror, sci-fi, nature).
How do I control depth inside the keyhole?
Add distance layers in the scene description: with a distant mountain range, a mid-ground forest, and foreground glowing mushrooms. By specifying far-mid-near layers, AI automatically arranges depth. For everything sharp, add everything in sharp focus from front to back.