Thread: New NPC models
View Single Post
  #6  
Old 05-18-2005, 06:39 AM
Windcatcher
Demi-God
 
Join Date: Jan 2002
Posts: 1,175
Default

I did some thinking, and even ship models are animated (billowing sails). Rowboat models, though, (like the ones in Lake Rathe) aren't animated and would be easier to add.

If I had source material that met the requirements of WLD animated models, I could probably find a way to add the ability to use them (that is, convert to WLD on exporting a zone) pretty easily. WLD animated models have the following characteristics:

- bounding box
- bounding sphere
- hierarchical bone structure (skeleton) where each bone has one and only one parent bone (except the root bone, of course)
- each and every polygon is assigned to one and one and only bone (e.g if the left forearm bone was bone 7, then all of the polygons for that part of the body would have a 7 assigned to them)
- only one root bone for the skeleton
- each bone supports orientation and length
- models can be split into heads and bodies, with alternates for each

I can calculate the bounding box and sphere, but it's always better to get those from a source model. KhaN and I were looking at the Quake III file format as a possible source, but there are issues with alternate meshes: Quake III models are split into upper- and lower-torso parts, where EQ models are split into "head" and "rest of body" (though this splitting isn't required -- you can have a single mesh for an entire monster, for instance).

Animations are another issue, but they can be handled separately for the most part. EQ has a core set of animations that apply to all models of a certain type and then has a few animations that are specific to certain models to handle special cases. For instance, simple actions like walking, running, emotes, and most attacks are the same for many models. Some example model classes are:

- bipedal, normal limb length-to-girth ratio (elf, human, erudian, etc.)
- bipedal, alternate limb length-to-girth ratio (dwarf, ogre, troll, etc.)
- feline
- canine
- ursine (in other words, bears or anything similar)
- snakes
- arthropod (spiders, beetles, etc.)
- reptile (alligator, basilisk)
- birds
- dragons

In this sense, once an animation is created for a model class, it can be copied to all models of that class, and that is exactly what EQ does (according to KhaN, this is a common practice). A good example of a special-case animation would be swinging a 2-handed weapon: different models have different arm lengths, and so the animation parameters will have to be tailored to each model to keep the hands in the correct position. In general this is an issue where two limbs (specifically, bones that don't have a direct parent-to-child relationship) have to be synchronized.

If we can acquire some free models that meet these requirements, I think we can get to the point where we are exporting our own models in OpenZone in relatively short order. It's a lot of work making a model (mesh, animations, textures) and is something I'm not capable of doing, but I understand enough of how WLD handles animated models that I'm pretty sure I can have OZ do the conversion given the right source material. Since the client wouldn't copy its existing animations to ours we would have to create the full set of animations, but would only have to do so once -- we could then apply them to any models we make that are of the same class (similar geometry).

One thing I should point out is that there is an alternate animated model type that WLD supports that isn't used for mobs. If you've ever seen the hanging flags in old-world zones that slightly billow in the wind, you've seen this type. Those models are stored as a series of frames -- for example, there might be ten animated frames, and for each frame a complete mesh is stored in the WLD file (with a fragment that tells the client where the frames are and how many there are). It's a horribly inefficient way to store an animated model, which is why it isn't used for mob models, but if we want to create such things as animated flags it's another possibility.

I should also mention that I've created an elf male model in Anim8or and several animation sequences for it (standing 1, standing 2, looking around, walking 1, walking 2, taking damage). The model isn't stellar (and it's not textured or uv-mapped), but the animations are valid for that skeleton (and it should be possible to put that skeleton on any similar model). I also have a partial Anim8or file parser written, so if people want to make models and animations in Anim8or it shouldn't be hard for me to convert them to WLD. Unfortunately Anim8or doesn't support inverse kinematics or telescoping bones so getting the animations right can be difficult, but it's free and pretty easy to learn.

Last edited by Windcatcher; 05-18-2005 at 10:39 PM..
Reply With Quote