Game Development Reference
In-Depth Information
vertex structure that saves both the origin position and the transformed
position separately.
typedef struct stT3DPOINT{
float x, y, z;
float nx, ny, nz;
}T3DPOINT;
Using this method we can clone the original mesh and geometry while
tracking a uniquely transformed version of the mesh.
Cloning mesh data from scene to scene
It may well be that a character that is not available as a global resource
is nevertheless used across several scenes. We may want to use a
storage system that saves the character once and then references the
character from the original storage. The advantage of such an approach
is that if the character changes in one scene because it is decided that the
costume or mesh should be altered, then the change is seen across all
scenes. Cloning mesh data across scenes leads to a concern about what
part of a character you intend to clone. Potentially a character contains
Mesh data
Surface data
Hierarchy
Motion data
It is conceivable that any combination of these data is cloned. Tracking
this across a development environment becomes quite taxing. Things to
consider are deletions and replacements. Let's consider an example. A
character is used in scene 2 and then cloned in scenes 5 and 7. In scene
5 just the mesh data are cloned, while in scene 7 the motion is cloned to
use on another character. A production decision is made to remove the
character from scene 2. If the character is deleted, then the mesh data in
scene 5 and the motion data in scene 7 will be lost. Since only part of the
resource is used in each scene, we cannot simply switch the main storage
from one scene to another. You will need to implement some kind of
strategy to offer the developer some replacement options. The simplest
option is to switch the character to a global resource, but then it is going
to be using lots of resources unnecessarily. Another method would be to
split the data between the two scenes and lose any information that is not
Search Nedrilad ::




Custom Search