Animated Figures

By Shamus
on Sep 22, 2006
Filed under:
Projects

I’ve alluded to this a bit over the past few days, but my current non-work project is to make a program for animating 3d characters. At work, I maintain software that does this already, but I didn’t write that part of the code. For the most part, the character animation is driven by Renderware, which a fairly large and popular cross-platform graphics engine. It’s nice to be able to hand off complex tasks to a graphics engine and say “make all of this confusing stuff work and don’t trouble me with the details.” When developing commercial software on a schedule and a budget, it’s just the thing.

But I’m filling in various gaps in my knowledge and so I want to know how to do this myself, from the ground up. This means putting some of my crude, self-taught trigonometry to use. It also means getting some 3d data to work with.

3d character, Vertices, Lines, Triangles
Top: Vertices are the dots that give the figure shape. Bottom: Triangles are lists of points to connect, which will eventually turn this thing into a solid shape.
Unlike my Terrain Project, where my input data was just a couple of bitmaps and a few nice shading tricks, I need real data for this one. I need a low-polygon (less than 5,000 polys) humanoid figure with skeletal info so that the points can be moved around to make the figure walk / run / fall down / etc. I also need a system of scripting body movements so that I’ll know how to adjust the position of the figure to create the illusion of walking. This is a lot of very complex data. In a real game company, it would take between two and five artists to come up with this data. Luckily, I have enough 3d art background that I can make this stuff myself as long as I’m not too picky about quality.

So now I need to decide what 3d program to use to make this stuff. Part of this decision will involve what sorts of 3d files the program can save. 3D models are made up of predictable things. There are points (verticies) and there are triangles (each of which plays connect-the dots with 3 particular points) uv values (information about how the texture lines up on the model) the skeleton (another collection of points, which define all of the joints in the body, where their pivot points are, and how they relate to each other). There is lots of other interesting data, but this is the critical stuff that every program needs before it can draw a 3d model.

Every 3d program has its very own file format, a method for storing all of this stuff. Some are very nice to use. It’s just a list of verices, followed by a list of triangles, etc. Others are more obscure, or have lots of extraneous data mixed in that must be weeded out. Still other files formats are “closed”: Nobody outside of their creators know how they work, so they can’t be read by any external programs. Such as mine. Some are dense, complex, tricky, poorly documented, or otherwise difficult to read. Some are easy to read but don’t preserve the most complex data – the information that ties the body to the skeleton. Since that’s the whole point of the project, I can’t go with any file format that leaves this out. File formats that are both robust AND easy to read do exist, but they are rare and not all programs support them. So, this is going to be tricky.

My budget right now is $0.00, and 3d programs tend to hail from the $500+ price range, so there’s another snag. Even if I do find a program that supports an easy-to-read, well-documented format that has what I need, it might be way out of my price range.

Well, Let’s see…

Truespace

I own a copy of Truespace, so it’s “free”, but I’m not going to use it for this unless I have no other choice. It’s a poor tool for this particular task, and the file format is difficult. It’s nice to know I have this to fall back on, but I’d like to see if I can find a better tool for the job.

Poser

Content Paradise had a promotion where they were giving Poser 5 away for free, and I managed to grab a copy. As of right now the free promotion is over, but they are selling the program for $20. That is $230 less than the usual price. I don’t know what inspired this fire sale, but that’s still a good deal.

Poser isn’t a 3d modeling program per se. It’s for posing very realistic super high-polygon figures. Not really ideal, but it does have moving 3d human models and an export feature. It should at least give me my 3d figures, although I’ll have to look elsewhere for the animations that drive them.

I was able to export one of the low-poly models into 3DS format. (Pictured above) 3DS files are a bit unwieldy. They certainly aren’t a nice neat list of points, triangles, and such. The 3DS file is packed with useless stuff about window layout, light placement, camera settings, and a bunch of crazy stuff that I don’t want or need. Still, the format is documented, so I sit down and spend a few hours implementing my own code to read 3DS files.

At the end of a lot of confusion I discover a nasty little secret: Poser leaves the skeleton off when it exports. Suddenly this animated 3d guy turns into an unmoving statue, and the data to get it moving is gone. Some Googling reveals that this is the case for all formats for all versions of Poser. The program leaves this info out on purpose.

Sigh.

Well, at least I didn’t pay $250 for it.

Blender

I tried Blender, and eventually dismissed it for reasons belabored elsewhere. I really, really did think this was the right program for the job, which is why I gave it so many second chances. It’s open source. It LOOKS impressive. It’s feature-rich. And if you want an open file format, then an open-source program should be the place to go, right?

In the end all those second, third, tenth chances only fueled my rage and led to my intemperate and (I hoipe) uncharacteristic posts. I should have given up much earlier on. It was clear the thing just wasn’t going to cut it and I just had a mental block about the thing. I just couldn’t imagine OS software that was this bad. I must be missing something? Doing something wrong? It can’t be this useless, can it?

Yes. Yes it can. This is not the program you’re looking for. Move along.

Maya

Maya retails for about $400 or so, but Unreal Tournament 2004 came with a special limited version of Maya that had some of the high-end features disabled, and it put an annoying watermark over the 3d viewports. It was like looking at your work through a stenciled window. These programs are tough enough without that visual distraction. Also, I think the export functionality was crippled or removed in this evaluation / learning version.

I like the idea of a learning version, but this isn’t going to meet my needs. The $400 price point is WAY out of my budget, so I have to give this one a pass.

Milkshape

Milkshape is an odd duck. (No offense). Instead of being aimed at professionals, it is aimed at home-brew developers making game mods. Where most 3d programs have export options for various obscure file formats, Milkshape has stuff like, “Export to Doom 3”, “Export to Half-Life”, “Export to Max Payne” and so on.

The interface is alarmingly simple:

Milkshape
Milkshape isn’t fancy. She might not look like much, but she’s got it where it counts. Here you can see I’m adding a skeleton to the model so that it will move. The model is bent oddly because I did something wrong and the skeleton isn’t properly attached yet. When it’s working right, the skeleton will stay inside of the model!

Still, simple is good. Building a full 3d human with this would be really tough. Blender seems geared to very low-poly work, like making models in the 1,000 polygon range. That’s about the polygon budget of games released around 1999 and 2000. However, Milkshape does import 3DS files. So, I can take my non-animated guy from Poser, bring him into Milkshape, and manually re-create the skeleton. It’s dull work, but it will get me where I want to go and save me the time I was going to have to spend modeling a human.

But what about saving? All of this does no good if I can’t save in a format that my program can read. Well, it turns out that Milkshape has a wonderful text-based format. There is documentation on it, but I hardly need it. After a a quick read through a file I can intuit what the numbers mean. It’s all very easy and sensible.

The price point is $25, which is very reasonable. I know this project has a budget of zero, but I think this program is worth $25. Even if it doesn’t pan out, this thing looks to be a labor of love and has more than $25 worth of features. So, I found my 3d program.

After days of work, I’m finally ready to start!

Enjoyed this post? Please share!


is a programmer, an author, and nearly a composer. He works on this site full time. If you’d like to support him, you can do so via Patreon or PayPal.

12There are a dozen comments.

From the Archives:

  1. BeckoningChasm says:

    Good luck with the project, and many thanks for the evaulations you’ve written–this will be a nice guide for those looking to do 3d work.

    As mentioned earlier, I’m perfectly happy with TrueSpace, though I use it in a pretty limited fashion. I suspect if I started pushing it hard I might look elsewhere…this post will be a good starting point.

  2. Will says:

    I remember there was a short interval of time in which I tried to tinker around with creating new weapons for UT. I’ve got an old version of AutoCAD that can export 3D objects in 3DS, but after that point I’m stuck. At first I was creating solid 3D objects until I figured out that the software only supports hollow surfaces. I recreated my basic goeometry using only planes, but now I don’t have the right software (or knowledge) to texture and animate 3D models.

    I wanted to see if I could pull off a decent approximation of the triple-gatling gun seen in Xenosaga. I thought it would be a fun little toy for playing around in UT.

  3. Will says:

    geez… now that’s some botched html…

    That was my other problem… figuring out UScript…

  4. Shamus says:

    I fixed the link for you. :)

    Too bad it didn’t pan out. The gun looks cool.

  5. Will says:

    Thanks. There are few things more embarrassing than screwing up a simple href.

    I may try it again someday. I’ve hit a few tutorials since then, but forking out the cash for some decent 3D software just isn’t gonna fly right now. I had a whole lot of ideas for that gun. I figured I’d just make it stupid-powerful at first while I played around. I’d even considered giving it some if the Karma physics to simulate the massive sustained recoil, but that may be beyond me.

    If I couldn’t get the first-person model looking right, I’d considered adapting it to a stationary turret for AAA. Kind of like a Phalanx on steroids.

  6. Pixy Misa says:

    Maya retails for about $400

    For large values of 400.

  7. Wonderduck says:

    No offense taken.

    How the heck is that little girl carrying that beast of a gun?!?
    Oh wait… it’s anime! Or a videogame. One of the two.

  8. Will says:

    Yeah, it’s videogame, she’s an advanced battle android, and it’s in space. A hat trick.

  9. […] Mike and I have been working on an updated development path for avatar creation. I’ve been using more or less the same system for about a decade now, and we’ve long since begun to outgrow the limitations of the original system. All of this builds on some of the research I’ve done in my own time. […]

  10. Mikkel says:

    Did you try makehuman.org ?
    You can create your mesh very very easy and in any shape. And the mesh is CLEAN (unlike poser, which is garbage like anything coming from that company. They are the only one in their field which shows). You can then use blenders decimater (polygon reducer) if the polygon count is to high. I tried using the decimater on Poser meshes
    but something like that can not be reduced without creating holes etch in the mesh.
    Really I saw your article on Blender and you REALLY need to give it a second try. This product is fabulous.

  11. Anonymous says:

    Poser now has an animator called Poser Mobile, I think. Never used it (or seen it used) but you might look into it if your trying to animate things on poser. :/

  12. Zak McKracken says:

    Ha, another TrueSpace user!
    Actually, you’re the first one I “meet” outside of the Caligary website.
    I think for simple tasks TS is just the thing, but I tried animating a beetle with Version 6.5 once (eight legs, antennae and everything). … wasn’t even able to save and open it correctly at one point and entirely lost my patience with it.
    Funny bit is that I’m in the process of transitioning to blender, and although it is reaaally slow-going, (I’m a geek with little free time, not a professional), I feel like everything is infinitesimally more solid there. Also, I did not have your problems with the tutorials and manuals.

    Then again, it’s 2009 now, and you tried it in 2006. When I first came across blender in 2003 or something, it didn’t even have a real user interface. So you might as well try again.
    No, don’t try again now. They’re just working on version 2.5, and that includes rewriting the interface. So wait until next year, and then try again.

    I think all this goes to show that software for complicated stuff is more complicated than software for simple stuff. If you just want to build a skeleton, it’s not worth learning blender. (You won’t need Photoshop to crop an image — just go with IrfanView). You probably would have had a similar amount of fun with 3Ds max.
    This flatly contradicts my own usage of Blender. I’ve used the compositor for editing images and videos. The very same compositor that looks almost like the one in Truespace 7, by the way (and yes, blender had it first).

One Trackback

  1. By Tuesday, 13 Feb 2007 : Workpress on Tue Feb 13, 2007 at 2:29 pm

    […] Mike and I have been working on an updated development path for avatar creation. I’ve been using more or less the same system for about a decade now, and we’ve long since begun to outgrow the limitations of the original system. All of this builds on some of the research I’ve done in my own time. […]

Leave a Reply

Comments are moderated and may not be posted immediately. Required fields are marked *

*
*

Thanks for joining the discussion. Be nice, don't post angry, and enjoy yourself. This is supposed to be fun.

You can enclose spoilers in <strike> tags like so:
<strike>Darth Vader is Luke's father!</strike>

You can make things italics like this:
Can you imagine having Darth Vader as your <i>father</i>?

You can make things bold like this:
I'm <b>very</b> glad Darth Vader isn't my father.

You can make links like this:
I'm reading about <a href="http://en.wikipedia.org/wiki/Darth_Vader">Darth Vader</a> on Wikipedia!

You can quote someone like this:
Darth Vader said <blockquote>Luke, I am your father.</blockquote>