Project Diary: Tanuki Clock Part 1

I’ve always been ambivalent about developer diaries, for a few reasons. First is that it always seems cooler to preserve the mystery and wait until I can say, “look at this thing I made.” Second is that I’ve got a lousy track record in terms of actually finishing projects, and it’s a lot more demoralizing to have to abandon something once you’ve talked about it, rather than letting it drift off unmourned by anyone other than me. And finally, there’s a question of expertise. I hate the idea of presenting anything I do as the “right” way to do it.

But that’s kind of selfish. Any time I’ve tried to take on a new hobby or skill, I’ve used tons of online tutorials, blog posts, YouTube videos, and GitHub repos, all from people who’ve taken the time to share what they’ve learned. Plus, I’ve often run into a frustrating disconnect when looking for information online: tutorials often skip over the details I need, presumably because they’re assumed to be so basic as to be common knowledge.

So I’m going to try to detail my progress making my current project, which is a Raspberry Pi-enabled clock, with a taiko-playing tanuki.

Background

The idea came from hitting an obstacle in the Star Wars/Smuggler’s Run-inspired Raspberry Pi case that I’ve been working on. That was going to use a Raspberry Pi 4 with an attached PiTFT screen from Adafruit. Since I have no real use for a Raspberry Pi, and the appeal was more as a beginning electronics and 3D printing project, I figured the most practical use case for it would be as a game emulator running RetroPie.

Unfortunately, my first attempts to run RetroPie on that machine were abysmal. Even NES games suffered from frame rate issues, and SNES games were so slow as to be unplayable. It was only after looking again at Adafruit’s guide to running games on these PiTFT screens that I found their warning (that I should have caught earlier): it’s not recommended on the 480×320 screens.

I ordered a small HDMI screen that seems to work well, and will be even better for that project, but that left me with an extra display. And a really nice, display, too! Running ScummVM on that setup, watching the first cutscene from Sam & Max Hit the Road on a small, vibrant display, made me as happy as getting a visit from an old friend. So I wanted to use it for something, and figured having a touchscreen on an internet-connected clock/photo frame could make it a useful desk accessory.

The Idea

My first idea was to make an Enchanted Tiki Clock, essentially just a tiki bar-themed 3D printed case for the Pi+screen. When I mentioned it to my fiance, he mimed a tiki drummer announcing the time, similar to the animatronics in the lanai at the actual Enchanted Tiki Room. That made me realize that this could be a perfect intro-to-robotics project as well, giving me an idea of how a simpler electronics project works before jumping full-on into making an animated robot.

I didn’t want to make a direct copy of anything from Disney, so I started looking for general reference online. The most interesting images I found of tiki masks and statues all vaguely reminded me of symbols and facial expressions that I’d thought were significant to Maori culture. So I asked a friend who’s something of a tiki expert for how to find reference on how to distinguish “tiki culture” from its actual cultural significance, so I could avoid stumbling into anything inadvertently offensive. Her recommendation was to avoid it altogether. I think it’s ultimately a wise recommendation: I’m convinced that there is a happy and comfortable middle ground embracing the aesthetic of tiki bars as a separate thing from the actual Polynesian cultures that were haphazardly and clumsily combined to create that aesthetic. But I’m also convinced that I’m not the person best suited to finding that middle ground.

So I went back to something that’s more my comfort zone, combining two of my favorite things: tanuki and taiko drums. Obviously, it’s not any more “my” culture than Hawaiian culture is — or American tiki culture, for that matter — but I’m at least familiar enough with it to know what it’s about.

My first impulse was to make a big figure and fit the screen into its belly, Kuato-style, but that seemed to be stretching the initial idea of “character with a clock embedded” past the point of making sense. So I’m now thinking I’m going to set up the clock as if you were looking through a torii gate.

Character Design

The first step was going to Nomad Sculpt to see if I could make a tanuki character I was happy with. I didn’t want to make a direct copy of Pom Poko, or any of the usual designs, but I also didn’t want to make anything overly unusual. Even if I were skillful enough at sculpting to make it super-detailed or exaggerated, Todd McFarlane-style, I’m just not a huge fan of that look. So I made one that’s cartoony and goofy and I’m pretty happy with it. Since I’m planning to 3D print it, I didn’t go too far with the colors; it’s just to get an initial idea of how it might look when painted.

If you do a Google image search for “tanuki yokai,” you’ll see dozens of example of the traditional versions, and various internet artists’ take on it. One of the most interesting was by Matthew Meyer on his site devoted to yokai, so I made a cartoony one inspired most by that. (I’m aware that taiko drummers typically play one drum at a time, but I took some license and gave him two to honor his tanuki heritage but without taking it too far).

For tutorials on Nomad Sculpt, I highly recommend Eric 3 Dee on YouTube, who’s been making time-lapse and tutorial videos while designing fun, unusual characters. He takes them from the initial sphere all the way to painting and sometimes, 3D printing. I also like the SouthernGFX channel from Glenn Southern, which has a ton of videos about Nomad Sculpt and a similar iPad sculpting app, Forger.

If there’s one key thing to pick up from Eric Lee’s videos, I think it’s his process: starting with the simple shapes, using the move tool to get the basic form, using Voxel Remesh to work in a higher resolution, and repeating to get more and more levels of detail. As I understand it, that’s the standard workflow from ZBrush and then Blender sculpting, but it never made sense to me until I saw it in action. Plus the visualization of remeshing in Nomad makes it easier for me to see what’s actually happening.

Two more Nomad Sculpt tips that might be obvious to everyone, but took me an embarrassingly long time to figure out:

The “turntable” that you so often see at the end of sculpting videos is available from the Nomad Sculpt main menu, a tiny icon in the upper left corner of the screen. (I’d been looking for it in the “export” options, so assumed it didn’t exist).

The “post processing” modes are accessible from the tab that looks like a camera aperture. It’s the easiest and most straightforward implementation of effects that I’ve seen in a 3D package, and as with most features in Nomad Sculpt, its default settings give you good-looking results with the least amount of effort. The “ambient occlusion” effect is most useful, even if you’re not rendering, because it gives a better impression of the seams and depth of the model.

3D Printing

Since everything is still in the proof-of-concept phase, I wanted to try 3D printing parts of my model, to get an idea of how they’d be sized in the real world, and whether any of this will actually work.

Nomad has several export options, all of which are readable by Blender by default. I used the “glTF” export for this model, which was probably overkill for 3D printing, as it includes materials and vertex painting, but it works, and it lets you keep all of the objects in your Nomad Sculpt project separate.

One of the issues that I’ve had with 3D sculpting is that even models as simple as mine end up having way too many polygons to do anything with, like animating or even creating UV maps for texturing. Every tutorial about retopology that I’ve ever seen makes it seem like they managed to take all of the fun and creativity of digital sculpting and turn it into the most tedious and difficult process imaginable. I’ve always been too lazy to even attempt it, which is why I’ve never actually rigged and animated a character.

You don’t necessarily need “clean” topology when 3D printing, since you want a lot of detail, especially if you’re resin printing. But I knew that I was probably going to be doing a lot of cutting, combining, hollowing out, and drilling holes into this guy, so I wanted to future-proof the process to make it as simple as possible.

Tanuki head from Nomad Sculpt

Tanuki head after QuadRemesher

This video from Russell Midfield compares different tools for auto-retopology in Blender, as well as a quick explanation of how to use it in conjunction with the multi-resolution modifier. I don’t understand the multi-resolution modifier yet, but I was most interested in ways to simplify the geometry for printing and modifying. His recommendation was Exoside’s Quad Remesher plug-in, which isn’t cheap, but which is pure magic as far as I can tell. Even my simple, cartoony model was losing a ton of detail with the built-in remeshing tools, but Quad Remesher gave me a much cleaner model that’s a lot easier to work with.

I printed out the tanuki head to get an idea of how the sculpt would translate into a real-world print. The results are above, printed on a Monoprice Voxel FDM printer at “High” resolution (0.12 mm) with PLA. I’m actually pretty happy with it, although I plan to go back with a higher-poly version since I think I was a little too aggressive at trying to get the poly count down.

The biggest issue was getting rid of all the support material. I took off the worst parts with an X-acto knife, then sanded the rough spots with a dremel on lowest speed and sandpaper. That got rid of most of the worst of it, and I’m pretty confident the rest would be covered up by the primer coat if I were to paint it. Note that it’s generally a bad idea to use a dremel on PLA. I used it on the underside of the head, where it’s intended to connect with the neck, and the speed was so high that it melted the plastic and drilled into the head.

Mockup/size test

I did a rough layout and size comparison in Blender, to get an idea of how big everything would need to be. To get the arms to move, the character has to be bigger than I’d wanted. But on the brighter side, a bigger model should theoretically be easier to paint.

One happy accident: I’d been assuming I’d need to do something really clever to fit servos inside the tanuki’s body, and I’ve been trying to picture exactly the combination of arms and levers and connecting pins that would make it move like I want. But last night I tried just scaling up the body to see how big it would need to be to fit them exactly where I want them. As a side effect, he’s a good bit more chonky than my Nomad Sculpt version, but that’s the way he should’ve been in the first place.

Electronics

Testing a wired taiko

I can’t remember ever taking an electronics course, and even if I had, it would’ve been in the days before Arduinos and other microcontrollers were readily available, which is when everything got interesting. So the electronics and wiring side is where I’m still a beginner.

Years ago, I did a workshop with my fiance at a maker space in San Francisco, where we built an Arduino shield with a matrix of LEDs and programmed it to do animated displays. I guess that was a decent introduction, but in a lot of ways, it was a lousy first project because it involved soldering dozens of LEDs to a circuit board. I can’t imagine its inspiring a love of electronics so much as a hatred of soldering.

So all I’ve done on the electronics side at this point is testing the basics: getting LEDs, micro servos, push buttons, and potentiometers controlled by the Pi (and some other boards I have for other projects). So far I’ve been using CircuitPython, which is actually making me reconsider my previous dislike of Python. It’s been a hell of a lot of fun.

So far I’ve been having the most fun with the Adafruit Feather RP2040, which is essentially Adafruit’s equivalent of the Raspberry Pi Pico. I don’t plan on using it for this project in particular, but it’s been fantastic for just learning and experimenting, plugging things into a breadboard and seeing what works. I’d consider it even more appropriate for beginners than working with an Arduino, mostly because of the readability of Python.

Adafruit’s guide to using CircuitPython on the Raspberry Pi is a good starting point.

For this project, I’m just planning on controlling two servos and three LEDs, powering everything from the Raspberry Pi. I haven’t yet done a test of the power draw with everything connected at once, but at least theoretically, it should all be reasonable. For simplicity’s sake — and because it’s intended to be a desk clock — I’m expecting to power it from a USB adapter, and plug the Pi’s audio out into speakers.

One potentially helpful tip: I didn’t have a lot of success using Circuit Python’s servo library with the Raspberry Pi. The example code works, but I couldn’t get anything approaching smooth, more natural-looking movement — it would move to exact angles, but I seemed to have no control over the speed at which it moved from one angle to the next. After spending hours on multiple variations based on the sample, I just assumed that I either had a bad servo, or I was trying to do more with it than the Pi’s GPIO was designed to do. (It’s powerful enough as a computer, but as I understand it, it’s not best suited to controlling lots of servos or motors, which is why specially-made Hats and expander boards exist for it).

Then I used this introductory example from a YouTube channel called Gary Explains. It’s the same introduction to servos along with basic code, with the key difference being that it uses the gpiozero library instead of Adafruit’s. When I tried with his starting code, the servo moved exactly as I’d hoped it would, smoothly making both small and large transitions. It worked perfectly using easing functions, which I can already tell is better for animation. (I did try wiring the servo directly to the Pi instead of going through a breadboard, so I should probably check if that’s the problem before blaming the Adafruit motor library).

Next Steps

I’m still not 100% confident that this is actually going to work, so there’s going to be a good bit more testing involved. Probably the first next step is to make a hollowed-out version of the tanuki body and print it at the correct size, to make sure I can get the electronics to fit. Then verify that the moving parts will actually be able to move.

I’m a little concerned about modeling the torii and its surroundings. I have a clearer idea of what miniatures of real-world objects are “supposed” to look like, and haven’t ever tried making stuff like that in detail. I’m expecting to spend a good amount of time looking at Grant Abbitt’s tutorial videos. He’s got several examples of making “game ready” objects in what I think of as World of Warcraft style.

After that, I’m most concerned about the painting phase. I’ve got no experience painting miniatures, and I tend to be hopeless when it comes to anything that doesn’t have an Undo button.

I’ll keep updating these diary entries with progress reports when/if I make progress. Even if they’re not strictly useful to anyone on the internet, it should be good for my own memory.