Let's think about models: Part 3!

Suppose we wanted to have a lot of different outfits for players. If we used a single monolithic model, this would require a separate model for each outfit. If we then wanted to add another piece of equipment such as wands, we'd need a separate model for each combination of equipment, most of which won't even be used, and all of which have something in common!

It is, therefore, necessary to add a way to combine two models together.

Method 1: Just smoosh them together!

The first method is superimposition, where two models have the same ground component. This means that one model could specify locations of some of its components that depend on the components of another model. If it wishes to do so, it must explicitly declare that those components are defined elsewhere, somewhat like the extern keyword in C / C++.

Method 2: a linking point

Another method of combining two models is to specify that the ground component of one model should be some other component of another. Then, for instance, the ground component of a wand might be the point where it is held. Having a player hold it would involve specifying the ground component of the wand model to be at the player's hand.
Superimposition, in fact, is a special case of linking with ground(child) = ground(parent).
Another note is that two models can have a control angle with the same name. This allows, for instance, adjusting clothing to character movement.

Comments

Popular Posts