// Calculate 3DS max pivot transform - use geometric space (e.g doesn't effect children nodes only the current node)
geometric_transform = OT * OR * OS;
// Calculate standard maya pivots
return T * Roff * Rp * Rpre * R * Rpost.inverse() * Rp.inverse() * Soff * Sp * S * Sp.inverse();
}
```
# Transform inheritance for FBX Nodes
The goal of below is to explain why they implement this in the first place.
The use case is to make nodes have an option to override their local scaling or to make scaling influenced by orientation, which i would imagine would be useful for when you need to rotate a node and the child to scale based on the orientation rather than setting on the rotation matrix planes.
```cpp
// not modified the formatting here since this code must remain clear
enum TransformInheritance {
Transform_RrSs = 0,
// Parent Rotation * Local Rotation * Parent Scale * Local Scale -- Parent Rotation Offset * Parent ScalingOffset (Local scaling is offset by rotation of parent node)
Transform_RSrs = 1, // Parent Rotation * Parent Scale * Local Rotation * Local Scale -- Parent * Local (normal mode)
Transform_Rrs = 2, // Parent Rotation * Local Rotation * Local Scale -- Node transform scale is the only relevant component
TransformInheritance_MAX // end-of-enum sentinel
};
enum TransformInheritance {
Transform_RrSs = 0,
// Local scaling is offset by rotation of parent node
Transform_RSrs = 1,
// Parent * Local (normal mode)
Transform_Rrs = 2,
// Node transform scale is the only relevant component
TransformInheritance_MAX // end-of-enum sentinel
};
```
# Axis in FBX
Godot has one format for the declared axis
AXIS X, AXIS Y, -AXIS Z
FBX supports any format you can think of. As it has to support Maya and 3DS Max.
#### FBX FILE declares axis dynamically using FBX header
Coord is X
Up is Y
Front is Z
#### GODOT - constant reference point
Coord is X positive,
Y is up positive,
Front is -Z negative
### Explaining MeshGeometry indexing
Reference type declared:
- Direct (directly related to the mapping information type)
- IndexToDirect (Map with key value, meaning depends on the MappingInformationType)
ControlPoint is a vertex
* None The mapping is undetermined.
* ByVertex There will be one mapping coordinate for each surface control point/vertex.
* If you have direct reference type vertices [x]
* If you have IndexToDirect reference type the UV
* ByPolygonVertex There will be one mapping coordinate for each vertex, for every polygon of which it is a part. This means that a vertex will have as many mapping coordinates as polygons of which it is a part. (Sorted by polygon, referencing vertex)
* ByPolygon There can be only one mapping coordinate for the whole polygon.
* One mapping per polygon polygon x has this normal x
* For each vertex of the polygon then set the normal to x
* ByEdge There will be one mapping coordinate for each unique edge in the mesh. This is meant to be used with smoothing layer elements. (Mapping is referencing the edge id)
* AllSame There can be only one mapping coordinate for the whole surface.