Recently, I've been inspired to create a "bookshelf insert world" ....nook thingy. I still haven't quite figured out what to call it. But I bet you've seen them before - a little diorama box inserted into a bookshelf, offering a tiny window into a tiny library or something like that.
Despite not settling on a good name for it, I have a pretty clear vision for my diorama box.
I want to create a winding medieval street, with views of a castle and mountains in the distance. To do this, I wanted to heavily incorporate forced perspective, shrinking my objects deeper in the box. More on that in a bit.
I also want to make heavy use of dynamic lighting - hidden LEDs to simulate a day-night cycle, flickering flames that turn on during "night-time," and more. I'll run the logic for the lighting using an Arduino, tucked away at the back of the box.
Finally, I want to create an archway facade to cap off the front face of the diorama.
First things first - ideating and sketching.
One of my favorite ways to get ideas flowing is to create a reference image board. This helps me generate ideas for what I want to create, and narrow in on the exact direction I want to take my design. Pinterest and good ol' Google Image search are great tools here.
After getting some good reference material, I made a notebook sketch or two of my planned medieval street. Then, it was time for sketching in Blender.
This was an entirely new process for me, and one I was very excited to try out -- practically half the reason I got excited to begin this project in the first place. In order to give the illusion of great depth in my diorama, I wanted to use forced perspective.
Specifically, objects deeper into the diorama get smaller and smaller. It's hard to describe how this works, but it means traditional geometry gets thrown out of the window. In order to create a forced-perspective cube, you instead create a flattened cuboid thing, with no right angles. When you look at the cuboid thing from the correct (forced) angle, your brain sees it as a cube that is shrinking off into the distance.
Alright, so that's the theory. How to put it in practice?
First, I created a simple Blender scene with a box (my diorama) and a camera. Setting the camera to look directly into the box, I could then duplicate my hand sketch onto the camera's image (shown in orange). Here, I took special care to lay out a horizon and some vanishing lines to help guide my sketch.
With the sketch in place, I could begin creating and dropping in geometry to match the lines of my sketch.
I bounced back and forth between the viewer's "camera" view and a free-camera view, to fit my objects to the box dimensions and the intended sketch lines. It's probably easiest to see what I mean with some images:
After modelling in the first few "house" blocks, I wanted to get a sense for how they looked in the real world (a.k.a. was my forced-perspective technique actually going to work?)
Fortunately, Blender provides the perfect add-on for my needs, called Paper Model. This handy plugin is meant for enabling the creation of (you guessed it) real-world paper models from Blender objects. It takes an object, cuts it apart, and lays it flat, even adding little assembly tabs. You can then print out the resulting flat image, cut it out, band and assembly your paper object.
I made my houses with carton board as a quick first test. I think the forced perspective works! You have to imagine the details of the diorama, but the raw shapes of the houses definitely feel right.
With that validation, let's move on!
Before we get deeper into the finer details, I need a real diorama box. I need somewhere to put the stuff I'm making, as I make it.
The box design is actually non-trivial. I need it to:
Provide me access as I assemble, detail and paint the nooks and crannies of the diorama
Hold (and hide) the Arduino, lighting components, and wiring
Hide any seams from access panels, etc - the interior of the diorama should be seamless
Be relatively sturdy and robust
Ultimately, I came up with a design that uses an open frame, where both side wall panels are completely removeable. This enables me to assemble and paint the various pieces of the model much more easily as I go.
To strengthen the main frame, I added a couple blocks at the corners (which also provide attachment points for the walls), as well as a truss-like ramp to serve as the base for the street. Most of the Arduino and battery stuff should be easy to hide behind the ramp.
Finally, the walls are rabbeted so they slot into the main frame. This should make assembly a lot easier, and help eliminate any light leakage from the corners.
With the diorama box built and ready for action, I wanted to experiment with techniques detailing my models. Using a couple test pieces, this time made from sturdier styrene, I began experimenting.
Using tiny slivers of balsa wood, I added trim to my tiny house. To simulate a first floor built from stacked stone, I used air-dry clay and a tiny flat to carve in some stone shapes. Finally, I used wall spackle to imitate plaster/daub for the second floor.
Painting was fairly straightforward - a mix of base colors, dark washes, and bright dry-brushed highlights. However, I wasn't able to bring out the balsa wood grain like I had hoped with a wash of dark acrylic paint. The stone looked good, though.
For a second test, I tried using acrylic medium instead of spackle for the second floor. However, this proved to be very hard to remove from my balsa wood trim, and impossible to apply without getting it everywhere.
For the real thing, I'm planning on applying acrylic medium first, and laying down my balsa trim as the final step.
Finally, and just for fun, I added a frosted window and a little orange LED. I even wrote a bit of code to make the LED "flicker."
Speaking of code, it's time to get a good handle on the Arduino side of things.
Primarily, I want it to run a couple powerful RGBW LEDs in sequence, slowly fading from "daylight" to "night-time," back to "daylight" again. I also want to turn on some flickering streetlights and window illumination during night-time.
I ended up adding in several "keyframe" light levels, such as dawn, high noon, and dusk, as well as a function to fade and transition between them:
After some troubleshooting and tweaking, I was mostly happy with the day-night cycle. However, one interesting problem remains.
Using the provided Adafruit library for the LED driver, the RGBW LEDs are controlled with discrete integer values. That is, writing a value of 0 to the red channel will turn it off, writing 255 will turn it fully-on, and writing 127 will turn it on at medium (ish) brightness. I think these values are used directly as PWM values, which makes the most sense.
Fading between different brightness levels can be accomplished by simply slowly incrementing (or decrementing) this PWM value.
However, at the lowest brightness levels, the step size is actually quite noticeable. Stepping the PWM value from 2 to 3, for example, creates a noticeable "jump" in brightness - much more noticeable than increasing from 240 to 241.
So, my night cycle currently has noticeable "steps" as the LED slowly dims down to near-total darkness, and back up to dawn. As far as I've been able to figure out, there is no way to interpolate between the steps - you can't write a decimal value to PWM.
For now, however, I'll put that slight annoyance of a problem on the back burner. I have time to figure out a solution while building and painting the model, or anytime afterwards.
I've decided to (mostly) shelve this project at this stage. I have an impending cross-country move and life upheaval coming up soon, and I'll have to put a lot of my project stuff away in boxes temporarily.
However, I haven't lost any passion towards completing this project, and I hope to pick it back up and complete it before the end of 2025.
See you in Part II!