Skip to content

Instantly share code, notes, and snippets.

Prerequisites:

Terminology: Mesh - a 3d model produced and animated by an artist. Inclusive of all (base) textures and UV maps. Model - a mesh that has been imported to the game and given some attributes; not necessarily 'ready to use'. Object - a game object that is ready to use. May either be a single model or several 'clicked together'. To all intents and purposes an exemplar of an entity. Entity - an instance of an Object as seen by the game.

  1. Meshes are designed / animated in .x format. This exposes a number of features, notably bones that can easily be identified, the ability to manipulate (or add) a basic rig to an object. Meshes are the base renderable type.
@winterdyne
winterdyne / gist:1435789
Created December 5, 2011 22:55
DataVariable class
// Wrapper around basic variable types.
class DataVariable
{
public:
enum VariableType // RTTI encoding.
{
UNKNOWN_TYPE, // Dunno What this is, variable exists but isn't set?
UNKNOWN_VARIABLE, // Variable doesn't exist. Used as an error code.
INTEGER_TYPE, // Integer / char / short.
FLOAT_TYPE, // Float
@winterdyne
winterdyne / PioneerModelNotes.md
Created November 29, 2011 22:06
Pioneer Model Infrastructure Notes

Pioneer Model Infrastructure Notes

Models are built out of meshes by a descriptor, format to be decided. The descriptor will be built by means of a GUI tool. The descriptor can be human readable and for efficiency compiled into pure data form. Where meshes are attached to existing bones, the hierarchy of bones in the attached mesh is attached (by its root) to the receiving bone.

Most meshes are based around bones. The bones are used as named locators within the model, attachment points, and manipulative 'handles'. All meshes are skin meshes. Where no bones are present, a root bone is generated for the mesh at the origin.

Meshes and models can be interrogated to retrieve a bone for direct manipulation or attachment of another mesh.

Pioneer meshes may expose animations. These are added to a list of animations the model can play as it is built. The play call cascades to all member meshes.