2.5D Modular Isometric Geometry: 4D Toroidal Seamless Textures and Footpoint-Anchored Facade Shear
Deriving 4D torus embeddings for tileable procedural noise, dual-basis ground calibration, and footpoint-anchored vertical shear matrices for modular 2.5D levels.
Why Sliced Panoramas Break Modular 2.5D Assembly
Slicing a single wide generative image into reusable 2.5D isometric tiles usually breaks along three seams at once: visible boundary jumps, mismatched ground-grid angles relative to navigation axes, and leaning walls once the ground plane is rescaled. Separating periodic textures, ground-basis alignment, footpoint-anchored facade shear, and port contracts keeps each geometric constraint orthogonal.
Under orthographic / weak-perspective projection with world ground coordinates and elevation , screen coordinates satisfy:
where jointly govern tile tessellation, movement directions, and depth sorting.
4D Torus Embedding for Tileable Procedural Textures
To make an procedural texture match both values and derivatives across opposite edges without post-hoc edge blurring, map onto a 4D torus before evaluating smooth 4D noise :
Keeping both preserves phase orientation (using alone creates mirror-symmetry creases), and setting equalizes spatial frequency along both axes. For existing bitmap seams, a raised-cosine blend zeroes endpoint slope discontinuities.
Dual-Basis Ground Calibration & Footpoint-Anchored Shear
Given measured source ground axes and target engine tile axes (e.g. mapping onto dimetric ), the ground layer transforms via :
Because has only four degrees of freedom, fixing leaves no freedom to preserve the vertical axis . Applying to foreground props tilts vertical walls. Instead, isolate facade/prop layers and anchor the shear at the ground contact footpoint , mapping the measured base-to-top vector onto true screen vertical :
When using sheared Transform2D matrices in engines like Godot, hit-testing must use affine_inverse() rather than orthonormal inverse helpers, while navigation and collision polygons stay defined in world ground coordinates via explicit module contracts:
{
"module": "corridor_straight",
"footprint_units": [4, 2],
"ground_basis_px": [[64, 24], [-64, 24]],
"anchor_px": [256, 288],
"ports": [
{"edge": "west", "offset_units": 1, "width_units": 1},
{"edge": "east", "offset_units": 1, "width_units": 1}
],
"layers": ["ground", "facade", "foreground_occluder"]
}