From 1994 sprites to a game-ready 3D Character in less time than it took to type this

This post follows on from my previous post on Dramatis 3d.

Back in 1994, my friend Andrew Barry, my sister Pamina, and I produced a game we released as Prince of Destruction. It's a long story and I've told bits of it elsewhere.

Nanoc original animation frames

This is Nanoc, the original and most boring of the playable characters in Prince of Destruction. (Ada is by far the most complicated and she was designed to be particularly useful for networked multiplayer.)

And here he is in a browser today…

Nanoc in the biped playground

Anyway, it occurred to me that one thing I'd always wanted to do was bring Prince of Destruction back with better technology, e.g. 3D graphics, and playable on an iPhone. The original game targeted the 16 MHz 68020 Macintosh LC (actually it targeted the Color Mac Classic, which is kind of worse because we designed it for a 512x384 screen and we could have used the extra real estate of the 640x480 8-bit displays that soon became standard).

The problem is that my copy of the source code and data files was backed up on a CD and that CD and all my other backups were literally stolen from my storage locker (along with stuff that was actually valuable) back in around 2018. So it goes. But we still had binaries.

The original game had four playable characters. Nanoc, the barbarian, Ada the wizard, Thysa the rogue, and Silly the elf. These were manually rendered as 90 and 45 degree facing sprites using a carefully assembled 256 color palette, in a number of different poses allowing them to run around, stab things, throw or shoot, and take a hit. Creating these images was an agonizing process because people actually look very boring from directly above, especially when rendered at around 32x32 pixels.

Creating an Image Reference

So, first of all, let's prompt Gemini for an image reference.

Prompting for a Nanoc character reference

To be fair, this is in a chat with a lot of context where I set standard aspect ratios and layouts, specified manga style and strict T-pose. So you'd probably need a prompt with a little more detail for a cold start.

Is this AI Slop?

I use the cheapest Gemini Pro account. I run out of quota after producing about 5 to 10 references (this resets after a few hours). Initially it took me two to three shots to get a good result. This is now working first shot most of the time. The character designs tend to be hackneyed but, um, consider the genre and source material.

So, you can argue this is AI slop, but the first character I built was from my own sketch and the result clearly matched my sketch.

forescene astronaut 1986

This is a sketch I did for my tabletop RPG back in around 1986, later colorized using Studio/32.

loading my astronaut into character builder

This is the final output after creating a reference from the sketch and passing it to Meshy. It's clearly the same character in the same spacesuit, extrapolated from my sketch.

So if you can put together a decent sketch, the rest of this workflow is pretty much doing your bidding, and applying CC0 content such as rigs and animations to your vision using published algorithms.

Now, to upload this into Meshy.ai. I'm not advocating for Meshy over any others but it is the one I've had by far the best results with when modeling characters, and it comes up first in organic search results, under a host of Google ads for products I think or have verified to be borderline useless.

There's no prompt. I upload the image and check texture and then click the big green button.

Building the Mesh

Upload image reference to Meshy

OK so that gives me a 1.5M triangle mesh which is kind of heavy. So I need to reduce it a bit. Again, remesh button, choose method (quads sounds great but no it isn't) and polygon target and click the big green button.

Why not quads? A well-modeled character is all quads, with edge loops that follow the anatomy, so it subdivides and deforms cleanly at the joints. An automatic remesher's quads don't follow the anatomy, so you get quad overhead without the deformation benefit. Forcing quads there is cargo culting. Triangles are fine for now.

Remeshing the initial mesh

That gives me a mesh with slightly over 10k triangles. Here it is zoomed in to show how much detail is left in his hair.

Closeup of Nanoc reduced to 10k triangles

Meshy charges about fifteen money things for enough tokens to make 20 or 30 models in a month. I'm using the first month at a €10/month teaser rate. So far about 80% of my mesh builds have been good on the first shot.

Character Builder

And now for a shameless plug…

OK so now how about rigging this fellow? Well, I could use Meshy's rigging tools but instead I'll use tosijs-3d's Character Builder which is the tech underlying Dramatis 3D.

These screenshots show a development version of Character Builder. It's slightly ahead of what's live as I write this, but it will probably be out of date and obsolete by the time you read this.

Nanoc's legs are messed up

I load the glb downloaded from Meshy into Character Builder. It immediately does a maximum effort rerig and shows him running on horribly deformed legs. Time to fix the mesh targeting.

So let's see how the engine guessed the targets:

guessed targets

The rig is guessed from the mesh geometry, so if the target is wearing heavy clothing or a spacesuit for example it tends to get things like crotch and knee wrong.

corrected targets

Dragging one knee into position and tweaking the crotch target is a few seconds work. But upon inspection the feet are slightly splayed outwards, so we can display more joints for fine-tuning.

foot targets from the side

And now all we need to do is place a sword in his hand. The initial guessed position is pretty good, but a tweak to its position and rotating the blade so the hilt doesn't pass through his thumb, and here we are.

putting a sword in his hand

Looks pretty good. Let's see how well he can swing it. First pick the right animation loop.

picking the right animation loop to preview the sword swing

And then watch it go in slow motion.

Nanoc swings his sword

And now I can test him directly in the Biped Playground.

testing nanoc in biped playground

Cost

So including writing this blog post as I did all this, my time spent was about 90 minutes. I used about 4% of my monthly Meshy quota to build the mesh. I used about 10% of my daily Gemini quota to create the reference. Assuming you pay say €15 per month for Meshy.ai and €25/month for Gemini this is €0.69 worth of services to create a game-ready rigged model.

The real cost is your time and attention. If I weren't blogging about it this would have taken under five minutes of my undivided attention.

Final Thoughts

Are we done yet? Of course not. Nanoc needs to be able to throw battle axes with his off hand. We can import animations and retarget them to our skeleton, but it would be cool if we could flip them laterally to turn a right-handed throw into a left-handed throw.

And of course the Biped Playground needs more features. Stuff to kill and destroy, things to sneak past, items to pick up and drop (you actually put a sword in his hand by dragging it to the right inventory slot—that already works), NPCs to talk with.

The clothing and hair stylist features are still a work in progress. Ideally we could build the character in underwear and bald and let the player customize their look and gear, but we're not there yet. What's there is pretty cool, but I wouldn't want to use it in production yet.

Try it now: it's free and open source and it's all unencumbered

If you're interested in building games that work in VR or flat 3D (and let you jump in and out of VR without losing state) and can ship on iPhone, Android, or Mac, take a look at tosijs-3d.

If you want a tool for creating characters using this workflow that can just be imported directly into threejs, Unity 3D, Unreal Engine, Godot, or even to use as an avatar in VRM tools, you can use the same technology in Dramatis 3D. And all of these (except Godot, sorry) are testable in the tool with a single click, source code provided.

—