Egg "Transform" node cancelled by loader

This is a difficult concept to grasp, so bear with me while I try again. :slight_smile:

An egg file stores vertices in global coordinates. Not local coordinates, like almost every model file format. Global coordinates.

Global coordinates means that the vertex values that appear in the egg file specify the position at which these vertices will be found relative to the global coordinate frame.

<Transform> entries change only the local coordinate frame. They do not change the global coordinate frame, of course. Thus, putting a <Transform> entry in an egg file, without changing the numerical values of the vertex values, means that the vertices will still appear at the same position in the global coordinate frame as they would have been without the <Transform> entry.

See? Since the vertices are defined in global coordinates, the only way to make the vertices (and therefore the cube) appear in another position is to actually change the vertex values. Changing the <Transform> entry only changes the local transform, not the vertices’ global position, and therefore not the cube’s apparent position either.

What does it mean to change the local transform? It means that when the vertex values are converted to local coordinate values for populating the vertex data of the renderable obejct, the vertices are inverse-transformed by the local transform, then the local transform is applied to the parent node. This means that if you do nothing to the transform on the node, the cube’s vertices (and therefore the cube) appear in the same position as if there had been no transform at all, exactly as required by the egg syntax. If, however, you remove the transform on the node, then you have undone half of the equation, and all you see remaining is the inverse transform on the vertices–so the cube appears to have moved in the opposite direction.

Does that make sense? It all comes down to what the numerical values of the vertices mean in the egg file.

David