Digital archaeology is an impossible creature

It was pretty cool that my experiments in procedural generation ended up having more audience than I expected, including some nice discussions on reddit and Gamasutra tweeting about my mirror of the article there. But the best thing that came out of it is the fact that I can’t stand looking at its example gif anymore without thinking it’s super bland after a while. Which means I need to get different meshes for different bodyparts working together.

I did have some ideas that would require manually tagging vertices and getting them automatically adjusted in run-time, and started going in that direction doing an Unity custom editor, but using handles ended being more of a pain in the ass than I expected – also, it didn’t really seem like it was going to scale well without a lot of effort being put into an editor for something that I didn’t even know would work.

Since the technical challenge already proved to be quite a handful, I decided to look into alternatives: what if I could actually get segmented models to work well? I tweeted for some references of games that have cool looking segmented 3d models, but didn’t get much feedback. Do you have any? Please tell me!

I can envision something that looks like Devil Daggers working for Bestiarium, especially because (a) pixel art would let me use point filtering and simply have tons of fun with actual old-school palette switching instead of my gradient map technique (that is still kind of wonky), but also because (b) people love pixel art.

While searching for references, I remembered Impossible Creatures, which is a game that I never played because my computer at the time wouldn’t be able to handle it. I was pretty sure it used segmented models to mashup the creatures, so I decided to look up some videos.

Lo and behold, the models and bodyparts actually seem really well blended together. How the hell did they do that?

Enter the Google fu

I obviously started looking for dev logs, but the game is 13 years old, so all my searches had no results. The more videos I watched, the more I could tell the models weren’t segmented. So I just decided there was only one way to go about this: I’d have to see the game for myself.

BUT

I didn’t want to spend 10 bucks in it just to look at the models close-up and add one more title that I would never play to my Steam Wall of Shame. Steam didn’t have a demo, and I gave up on piracy over a decade ago. The official oldschool Microsoft download link was long dead, but after poking around a bit, I could find this Archive.org link for it. Yay!

I could install and run it fine, and could also take a look at the creature editor, and yeah, they have no visible mesh segments. I’d need to look at the meshes outside of the game. Thankfully, there are lots of tools that can capture the render calls to the graphics card and write out the data to OBJ files and such, and they’re great for “dissecting” that kind of thing.

[If you don’t know anything about how real time rendering works, I highly recommend Simon’s articles on that, it’s made super simple and they have awesome animations.]

I’ve used 3DRipperDX, which is totally the one with the less trustworthy-looking page, but worked really well and was simple to operate (aka: it’s the one I could actually get to work and I was already too obsessed by this point to care about malware). A cool thing about the export is that each draw call becomes a different object. Upon opening the capture, I could see that each body part had a different mesh, which indicated that either the models were in fact segmented, or at least different parts had different “materials”. But more importantly, it meant that even having some seams in shading, the models could look good enough.

One question remained though: how could they make sure that the vertices lined up properly? I started getting other captures and checking both composite creatures and “raw” ones, but the “sockets” were slightly different.

I had some pointers to where to go next with my project, but had even less of an idea about how Impossible Creatures actually worked. Where do the models come from? Do they really have all possible combinations? Or do they have some different way of representing the meshes? It came to my mind that maybe there were mod tools that could give me some information.

I’ll keep it short, but basically, this is where I started to proverbially complete commercial segments entirely with my left hand. Being a game over 10 years old, it’s community pretty much vanished with old sites, unpaid hosting, incomplete attempts at comebacks. I found several archive explorers for newer versions of Relic’s engine, but none for IC – it was too old. I spent a night scraping for information about how mods worked, only to find people having the same dead link problems in less-old forums.

It seemed hopeless. I saw tons of links to articles and tutorials about how to mod their game, but all the links were dead. Mind you, this is not solely because me not wanting to spend 10 bucks on the new version of the game (since they have Steam Workshop and guides within the files), but mostly because I couldn’t allow myself to be defeated on my search – if there was still some hope of getting that info, I wanted to find it.

And then… Archive.org saved my ass again. After a dozen cross-searches and broken forum links, I could get to an archived forum post where a guy posted his tutorial on how to create creatures. And there it was. Patches. Bezier patches. This fit my suspicion: they actually had a different way of assembling the models which made it easier for the seams to be joined together. The first part of the magic happened by a plugin, aptly called Boner. The tutorial gave me some insights, but I needed to see it up close.

Cue another night of scavenging for information. I ended up installing gmax again after more than 10 years (which, mind you, needs to be activated by a website that is also no longer online), figuring out how to get that to work, then figuring out how to make the dev tools work with the demo version, downloading mods to see source files… seriously, this is what my Chrome looked like:

In the end, I had the following hypothesis: all the creatures are modelled by patches (fact) and have very similar “sockets” formed by them. The game then adjusts the vertices for the neighboring parts and, being Bézier patches, they automatically adjust the neighboring shapes. From that, the mesh gets generated (also, insta-lod for you there!). The game then uses some masks to blend together the textures and voilá, you have an Impossible Creature. Animation is handled by using the way bones are weighted in one part and transfering that to variations.

I had a lot of bits and pieces, but I couldn’t have a definitive answer. I got to the point of actually looking up the programmers in the game to maybe send them a message on twitter or email.

It was 2 nights being stuck in an XKCD comic.

 

Then I decided to do one last google search… that changed everything. I found, by pure accident, a forum post from a guy from Relic stating that “there is information encoded in the .ebp/sgm files […] that is dropped after combining. This includes what is attached to what limbs, so they essentially become one limb post-combine. Also, the ComboTest exports a triangle mesh, but the stock creatures are made out of bezier patch meshes”.

This was my last search. And it was when I landed on a development diary from IGN where they explain exactly how things work. It’s a pretty interesting read. Answers meant I could stop my spree. Spoiler: I was pretty much right.

I had searched for “devlog”. “Dev blog”. Blog. Lots of terms. Had I searched for the correct one, I’d save a few days of madness. People are scared shitless of Skynet, AI bots are all over the news… but all that I really wanted was semantic search.

I’ve woken up areas of databases that were covered with dust. I’ve installed software old enough to legally get a driver’s license. I’ve discussed with my Librarian wife the ephemerality and organization of data with the amount of stuff that we produce nowadays. I’ve come to the conundrum of adding MORE useless information about a very specific topic to the Internet that will eventually lose itself.

All of that because when I was a kid I wanted to be an archaeologist, and because I didn’t want to spend 10 bucks on a game.

I’ve donated those 10 bucks to Archive.org.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s